dataV组件库基于Vue和React,主要用于构建大屏,数据展示页面即(数据可视化)
安装:
npm install @jiaminghi/data-view
使用(main.js)
import dataV from '@jiaminghi/data-view'
Vue.use(dataV)
页面中:
<template>
<div class="update-demo">
<dv-percent-pond :config="config" style="width:200px;height:100px;" />
</div>
</template>
<script>
export default {
name: 'UpdateDemo',
data () {
return {
config: {
value: 66,
lineDash: [10, 2]
}
}
},
methods: {
updateHandler () {
const { config } = this
this.config.value = 90
this.config.lineDash = [10, 4]
this.config = { ...this.config }
}
}
}
</script>