components目录与pages目录同级。
- index.json
{
"usingComponents": {
"table-view": "/components/miniprogram-table-component/miniprogram_dist/index"
},
"navigationBarTitleText": "标题",
"enablePullDownRefresh": false,
"disableScroll": false
}
- idnex.js
data: {
tableHeader: [
{
prop:'schoolName',
width: 200,
label: '院校名称',
},
{
prop:'schoolLevel',
width: 150,
label: '院校层次',
},
{
prop:'name',
width: 300,
label: '绑定专业',
},
],
stripe: true,
border: true,
outBorder: true,
rows:[{"name":"专业","schoolName":"学校","schoolLevel":"层级"},{"name":"专业","schoolName":"学校","schoolLevel":"层级"}],
keyword:''
},
index.wxml
<table-view
headers="{{ tableHeader }}"
data="{{ rows }}"
stripe="{{ stripe }}"
border="{{ border }}"
/>
网友评论