doc.830efa52.js 10 KB

1
  1. import{e as n,o as m,b,G as c,F as e,g as i,l as a,H as h,a as g,D as C}from"./@vue.e84e1286.js";import{p as u}from"./preview.2bfe2f00.js";import"./bus.f1893518.js";import"./mitt.550594b0.js";/* empty css */import"./index.c8cfbd6c.js";import"./vue-router.54876e93.js";const v={__name:"demo1",setup(p){const o=[{date:"2022-05-12",name:"\u540E\u88D4",address:"\u738B\u8005\u5CE1\u8C37\u4E0B\u5854\u65C1"},{date:"2022-06-13",name:"\u9C81\u73ED",address:"\u5728\u901B\u8857"},{date:"2022-07-14",name:"\u5B59\u5C1A\u9999",address:"\u5728\u6253\u7EA2buff"},{date:"2022-08-15",name:"\u72C4\u4EC1\u6770",address:"\u5728\u63A8\u5854"}];return(_,d)=>{const t=n("m-table-column"),s=n("m-table");return m(),b(s,{data:o},{default:c(()=>[e(t,{prop:"date",label:"\u65E5\u671F"}),e(t,{prop:"name",label:"\u59D3\u540D"}),e(t,{prop:"address",label:"\u5730\u5740"})]),_:1})}}},w={__name:"demo2",setup(p){const o=[{date:"2022-05-12",name:"\u540E\u88D4",address:"\u738B\u8005\u5CE1\u8C37\u4E0B\u5854\u65C1"},{date:"2022-06-13",name:"\u9C81\u73ED",address:"\u5728\u901B\u8857"},{date:"2022-07-14",name:"\u5B59\u5C1A\u9999",address:"\u5728\u6253\u7EA2buff"},{date:"2022-08-15",name:"\u72C4\u4EC1\u6770",address:"\u5728\u63A8\u5854"}];return(_,d)=>{const t=n("m-table-column"),s=n("m-table");return m(),b(s,{data:o,stripe:""},{default:c(()=>[e(t,{prop:"date",label:"\u65E5\u671F"}),e(t,{prop:"name",label:"\u59D3\u540D"}),e(t,{prop:"address",label:"\u5730\u5740"})]),_:1})}}},x={__name:"demo3",setup(p){const o=[{date:"2022-05-12",name:"\u540E\u88D4",address:"\u738B\u8005\u5CE1\u8C37\u4E0B\u5854\u65C1"},{date:"2022-06-13",name:"\u9C81\u73ED",address:"\u5728\u901B\u8857"},{date:"2022-07-14",name:"\u5B59\u5C1A\u9999",address:"\u5728\u6253\u7EA2buff"},{date:"2022-08-15",name:"\u72C4\u4EC1\u6770",address:"\u5728\u63A8\u5854"}];return(_,d)=>{const t=n("m-table-column"),s=n("m-table");return m(),b(s,{data:o,border:""},{default:c(()=>[e(t,{prop:"date",label:"\u65E5\u671F"}),e(t,{prop:"name",label:"\u59D3\u540D"}),e(t,{prop:"address",label:"\u5730\u5740"})]),_:1})}}};const $=a("p",{class:"pb-10"},"\u81EA\u5B9A\u4E49\u884C\u6837\u5F0F:",-1),y={class:"mt-40"},k=a("p",{class:"pb-10"},"\u81EA\u5B9A\u4E49\u5217\u6837\u5F0F:",-1),D={class:"mt-40"},R=a("p",{class:"pb-10"},"\u81EA\u5B9A\u4E49\u5355\u5143\u683C\u6837\u5F0F:",-1),B={__name:"demo4",setup(p){const o=[{date:"2022-05-12",name:"\u540E\u88D4",address:"\u738B\u8005\u5CE1\u8C37\u4E0B\u5854\u65C1"},{date:"2022-06-13",name:"\u9C81\u73ED",address:"\u5728\u901B\u8857"},{date:"2022-07-14",name:"\u5B59\u5C1A\u9999",address:"\u5728\u6253\u7EA2buff"},{date:"2022-08-15",name:"\u72C4\u4EC1\u6770",address:"\u5728\u63A8\u5854"}],_=[{date:"2022-05-12",name:"\u540E\u88D4",address:"\u738B\u8005\u5CE1\u8C37\u4E0B\u5854\u65C1"},{date:"2022-06-13",name:"\u9C81\u73ED",address:"\u5728\u901B\u8857",cellClassName:{date:"table-info-cell-date",name:"table-info-cell-name",address:"table-info-cell-address"}},{date:"2022-07-14",name:"\u5B59\u5C1A\u9999",address:"\u5728\u6253\u7EA2buff"},{date:"2022-08-15",name:"\u72C4\u4EC1\u6770",address:"\u5728\u63A8\u5854"},{date:"2022-08-15",name:"\u9A6C\u53EF\u6CE2\u7F57",address:"\u5728\u75AF\u72C2\u8F93\u51FA",cellClassName:{name:"table-info-cell-name"}}],d=(t,s)=>s===1?"warning-row":s===3?"success-row":"";return(t,s)=>{const l=n("m-table-column"),r=n("m-table");return m(),i(h,null,[a("div",null,[$,e(r,{data:o,border:"",rowClassName:d},{default:c(()=>[e(l,{prop:"date",label:"\u65E5\u671F"}),e(l,{prop:"name",label:"\u59D3\u540D"}),e(l,{prop:"address",label:"\u5730\u5740"})]),_:1})]),a("div",y,[k,e(r,{data:o,border:""},{default:c(()=>[e(l,{prop:"date",label:"\u65E5\u671F"}),e(l,{prop:"name",label:"\u59D3\u540D",className:"table-error-column"}),e(l,{prop:"address",label:"\u5730\u5740"})]),_:1})]),a("div",D,[R,e(r,{data:_,border:""},{default:c(()=>[e(l,{prop:"date",label:"\u65E5\u671F"}),e(l,{prop:"name",label:"\u59D3\u540D"}),e(l,{prop:"address",label:"\u5730\u5740"})]),_:1})])],64)}}},T={__name:"demo5",setup(p){const o=[{date:"2022-05-12",name:"\u540E\u88D4",address:"\u738B\u8005\u5CE1\u8C37\u4E0B\u5854\u65C1"},{date:"2022-06-13",name:"\u9C81\u73ED",address:"\u5728\u901B\u8857"},{date:"2022-07-14",name:"\u5B59\u5C1A\u9999",address:"\u5728\u6253\u7EA2buff"},{date:"2022-08-15",name:"\u72C4\u4EC1\u6770",address:"\u5728\u63A8\u5854"},{date:"2022-07-14",name:"\u5B59\u5C1A\u9999",address:"\u5728\u6253\u7EA2buff"},{date:"2022-08-15",name:"\u72C4\u4EC1\u6770",address:"\u5728\u63A8\u5854"}];return(_,d)=>{const t=n("m-table-column"),s=n("m-table");return m(),b(s,{data:o,height:"200"},{default:c(()=>[e(t,{prop:"date",label:"\u65E5\u671F"}),e(t,{prop:"name",label:"\u59D3\u540D"}),e(t,{prop:"address",label:"\u5730\u5740"})]),_:1})}}},V={style:{"margin-top":"20px"}},F=C("\u53D6\u6D88\u9009\u62E9"),O={__name:"demo9",setup(p){const o=g(null),_=[{date:"2022-05-12",name:"\u540E\u88D4",address:"\u738B\u8005\u5CE1\u8C37\u4E0B\u5854\u65C1"},{date:"2022-06-13",name:"\u9C81\u73ED",address:"\u5728\u901B\u8857"},{date:"2022-07-14",name:"\u5B59\u5C1A\u9999",address:"\u5728\u6253\u7EA2buff"},{date:"2022-08-15",name:"\u72C4\u4EC1\u6770",address:"\u5728\u63A8\u5854"}],d=s=>{console.log(s)},t=()=>{o.value.clearCurrentRow()};return(s,l)=>{const r=n("m-table-column"),f=n("m-table"),N=n("m-button");return m(),i(h,null,[e(f,{ref_key:"singleTableRef",ref:o,data:_,"highlight-current-row":"",onOnCurrentChange:d},{default:c(()=>[e(r,{type:"index",width:"55"}),e(r,{prop:"date",label:"\u65E5\u671F"}),e(r,{prop:"name",label:"\u59D3\u540D"}),e(r,{prop:"address",label:"\u5730\u5740"})]),_:1},512),a("div",V,[e(N,{onClick:t},{default:c(()=>[F]),_:1})])],64)}}},E={__name:"demo10",setup(p){const o=[{id:111,date:"2022-05-12",name:"\u540E\u88D4",address:"\u738B\u8005\u5CE1\u8C37\u4E0B\u5854\u65C1"},{id:222,date:"2022-06-13",name:"\u9C81\u73ED",address:"\u5728\u901B\u8857"},{id:333,date:"2022-07-14",name:"\u5B59\u5C1A\u9999",address:"\u5728\u6253\u7EA2buff"},{id:444,date:"2022-08-15",name:"\u72C4\u4EC1\u6770",address:"\u5728\u63A8\u5854"}],_=d=>{console.log(d)};return(d,t)=>{const s=n("m-table-column"),l=n("m-table");return m(),b(l,{data:o,onOnSelectionChange:_},{default:c(()=>[e(s,{type:"selection",width:"55"}),e(s,{prop:"date",label:"\u65E5\u671F"}),e(s,{prop:"name",label:"\u59D3\u540D"}),e(s,{prop:"address",label:"\u5730\u5740"})]),_:1})}}},G={class:"markdown-body"},H=a("h1",null,"Table \u8868\u683C",-1),S=a("h4",null,"\u7528\u4E8E\u5C55\u793A\u591A\u6761\u7ED3\u6784\u7C7B\u4F3C\u7684\u6570\u636E\uFF0C\u53EF\u5BF9\u6570\u636E\u8FDB\u884C\u6392\u5E8F\u3001\u7B5B\u9009\u3001\u5BF9\u6BD4\u6216\u5176\u4ED6\u81EA\u5B9A\u4E49\u64CD\u4F5C\u3002",-1),j=a("br",null,null,-1),q=a("h2",null,"\u57FA\u7840\u8868\u683C",-1),z=a("h4",null,"\u57FA\u7840\u7684\u8868\u683C\u5C55\u793A\u7528\u6CD5\u3002",-1),A={class:"source"},I=a("h2",null,"\u6591\u9A6C\u7EB9",-1),J=a("h4",null,"stripe\u5C5E\u6027\u53EF\u4EE5\u521B\u5EFA\u5E26\u6591\u9A6C\u7EB9\u7684\u8868\u683C\u3002\u5B83\u63A5\u53D7\u4E00\u4E2ABoolean\uFF0C\u9ED8\u8BA4\u4E3Afalse\uFF0C\u8BBE\u7F6E\u4E3Atrue\u5373\u4E3A\u542F\u7528\u3002",-1),K={class:"source"},L=a("h2",null,"\u5E26\u8FB9\u6846",-1),M=a("h4",null,"\u6DFB\u52A0\u8868\u683C\u7684\u8FB9\u6846\u7EBF\u3002\u53EF\u4EE5\u4F7F\u7528border\u5C5E\u6027\uFF0C\u5B83\u63A5\u53D7\u4E00\u4E2ABoolean\uFF0C\u8BBE\u7F6E\u4E3Atrue\u5373\u53EF\u542F\u7528\u3002",-1),P={class:"source"},Q=a("h2",null,"\u7279\u5B9A\u6837\u5F0F",-1),U=a("h4",null,"\u884C\uFF1A\u901A\u8FC7\u5C5E\u6027 rowClassName \u53EF\u4EE5\u7ED9\u67D0\u4E00\u884C\u6307\u5B9A\u4E00\u4E2A\u6837\u5F0F\u540D\u79F0\u3002",-1),W=a("h4",null,"\u5217\uFF1A\u901A\u8FC7\u7ED9\u5217 columns \u8BBE\u7F6E\u5B57\u6BB5 className \u53EF\u4EE5\u7ED9\u67D0\u4E00\u5217\u6307\u5B9A\u4E00\u4E2A\u6837\u5F0F\u3002",-1),X=a("h4",null,"\u5355\u5143\u683C\uFF1A\u901A\u8FC7\u7ED9\u6570\u636E data \u8BBE\u7F6E\u5B57\u6BB5 cellClassName \u53EF\u4EE5\u7ED9\u4EFB\u610F\u4E00\u4E2A\u5355\u5143\u683C\u6307\u5B9A\u6837\u5F0F\u3002",-1),Y={class:"source"},Z=a("h2",null,"\u56FA\u5B9A\u8868\u5934",-1),ee=a("h4",null,"\u901A\u8FC7\u8BBE\u7F6E\u5C5E\u6027 height \u7ED9\u8868\u683C\u6307\u5B9A\u9AD8\u5EA6\u540E\uFF0C\u4F1A\u81EA\u52A8\u56FA\u5B9A\u8868\u5934\u3002\u5F53\u7EB5\u5411\u5185\u5BB9\u8FC7\u591A\u65F6\u53EF\u4EE5\u4F7F\u7528\u3002",-1),ae={class:"source"},te=a("h2",null,"\u5355\u9009",-1),se=a("h4",null,"\u901A\u8FC7\u8BBE\u7F6E\u5C5E\u6027 highlight-current-row\uFF0C\u53EF\u4EE5\u9009\u4E2D\u67D0\u4E00\u884C\u3002",-1),oe=a("h4",null,"\u5F53\u9009\u62E9\u65F6\uFF0C\u89E6\u53D1\u4E8B\u4EF6 @on-current-change\uFF0C\u53EF\u4EE5\u81EA\u5B9A\u4E49\u64CD\u4F5C\uFF0C\u4E8B\u4EF6\u8FD4\u56DE\u4E24\u4E2A\u503C currentRow \u548C oldCurrentRow\uFF0C\u5206\u522B\u4E3A\u5F53\u524D\u884C\u7684\u6570\u636E\u548C\u4E0A\u4E00\u6B21\u9009\u62E9\u7684\u6570\u636E\u3002",-1),ne=a("h4",null,"\u5982\u679C\u9700\u8981\u663E\u793A\u7D22\u5F15\uFF0C\u53EF\u4EE5\u589E\u52A0\u4E00\u5217 m-table-column\uFF0C\u8BBE\u7F6Etype\u5C5E\u6027\u4E3Aindex\u5373\u53EF\u663E\u793A\u4ECE 1 \u5F00\u59CB\u7684\u7D22\u5F15\u53F7",-1),le={class:"source"},de=a("h2",null,"\u591A\u9009",-1),_e=a("h4",null,"\u9009\u62E9\u591A\u884C\u6570\u636E\u65F6\u4F7F\u7528 Checkbox\u3002\u4F20\u5165\u6570\u636E\u5217\u8868\u6BCF\u9879\u9700\u6307\u5B9A\u552F\u4E00id\u3002",-1),ce=a("h4",null,"\u624B\u52A8\u6DFB\u52A0\u4E00\u4E2Ael-table-column\uFF0C\u6307\u5B9A type: \u2018selection\u2019\uFF0C\u5373\u53EF\u81EA\u52A8\u5F00\u542F\u591A\u9009\u529F\u80FD\u3002",-1),re=a("h4",null,"@on-selection-change\uFF0C\u53EA\u8981\u9009\u4E2D\u9879\u53D1\u751F\u53D8\u5316\u65F6\u5C31\u4F1A\u89E6\u53D1\uFF0C\u8FD4\u56DE\u503C\u4E3A selection\uFF0C\u5DF2\u9009\u9879\u3002",-1),me={class:"source"},ge={__name:"doc",setup(p,{expose:o}){return o({frontmatter:{}}),(d,t)=>(m(),i("div",G,[H,S,j,q,z,a("div",A,[e(v)]),e(u,{compName:"table",demoName:"demo1"}),I,J,a("div",K,[e(w)]),e(u,{compName:"table",demoName:"demo2"}),L,M,a("div",P,[e(x)]),e(u,{compName:"table",demoName:"demo3"}),Q,U,W,X,a("div",Y,[e(B)]),e(u,{compName:"table",demoName:"demo4"}),Z,ee,a("div",ae,[e(T)]),e(u,{compName:"table",demoName:"demo5"}),te,se,oe,ne,a("div",le,[e(O)]),e(u,{compName:"table",demoName:"demo9"}),de,_e,ce,re,a("div",me,[e(E)]),e(u,{compName:"table",demoName:"demo10"})]))}};export{ge as default};