biwork-ui
v1.0.8
Published
```shell npm install biwork-ui -S ```
Downloads
223
Readme
#biwork-ui
Install
npm install biwork-ui -S
全局安装注册使用 npm i biwork-ui -S,
main.js引入使用 import biworkUi from "biwork-ui/lib/my-component.umd.js"; Vue.use(biworkUi);
页面使用所需要的组件
<elDataGrid :tableData="data"></elDataGrid>
<selectTree :treeData="treeData" :label="'请选择'"></selectTree>
- 数据结构示例
//elDataGrid
需要每一行有唯一key值
data: {
columns: [
{ prop: "lie1", label: "列1" },
{ prop: "lie2", label: "列2" },
{ prop: "lie3", label: "列3" },
{ prop: "lie4", label: "列4" },
{ prop: "lie5", label: "列5" },
],
rows: [
{
key: "1",
lie1: "",
lie2: "",
lie3: "",
lie4: "",
lie5: "",
},
{
key: "2",
lie1: "",
lie2: "",
lie3: "",
lie4: "",
lie5: "",
},
{
key: "3",
lie1: "",
lie2: "",
lie3: "",
lie4: "",
lie5: "",
},
],
};
//下拉树数据
treeData: [
{
label: "一级 1",
children: [
{
label: "二级 1-1",
children: [
{
label: "三级 1-1-1",
},
],
},
],
},
{
label: "一级 2",
children: [
{
label: "二级 2-1",
children: [
{
label: "三级 2-1-1",
},
],
},
{
label: "二级 2-2",
children: [
{
label: "三级 2-2-1",
},
],
},
],
},
{
label: "一级 3",
children: [
{
label: "二级 3-1",
children: [
{
label: "三级 3-1-1",
},
],
},
{
label: "二级 3-2",
children: [
{
label: "三级 3-2-1",
},
],
},
],
},
],