1.npm安装 npm install @jiaminghi/data-view
2.在main.js中引入
import dataV from '@jiaminghi/data-view'
Vue.use(dataV)
3.在项目中写入
<dv-scroll-board
:config="optionDept"
style="width: 278px; height: 380px"
/>
4.在data中定义
optionDept: {
label: {
color: "#000000",
},
data: [],
rowNum: 10, //表格行数
headerHeight: 35,
headerBGC: "#ffffff", //表头
oddRowBGC: "#ffffff", //奇数行
evenRowBGC: "#ffffff", //偶数行
// index: true,
columnWidth: [200, 200],
align: ["left", "right"],
waitTime: 10, //轮播速度
},
5.对接接口数据
.then(