DataV component library based on Vue and React, mainly used to build large screen, data display page (data visualization) installation: NPM install @jiaminghi/data-view uses (main.js) // Will automatically register all components as global components 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: {// An example method to update data updateHandler () {const {config} = this /** * only this is invalid * the memory address to which config points has not changed * the component cannot detect data changes */ this.config.value = 90 this.config.lineDash = [10, 4] /** * Use ES6 extension operator to generate new props object */ this.config = {... this.config } } } } </script>Copy the code