Blame view

admin-web-master/canvas-container/config/mixin/toolMixin.js 575 Bytes
3f535f30   杨鑫   '初始'
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
  /*
   * 列表搜索的 mixin
   */
  import { mapGetters, mapMutations } from 'vuex'
  
  /* eslint-disable */
  export const tool = {
    computed: {
      ...mapGetters([
        'activeComponent',
        'componentsData'
      ])
    },
    methods: {
      ...mapMutations({
        setComponentsData: 'SET_COMPONENTSDATA'
      })
    },
    beforeDestroy(){
  
    },
    watch: {
      'activeComponent.componentContent': {
        handler (newVal, oldVal) {
          console.log(newVal)
          // localStorage.setItem('componentsData', JSON.stringify(this.componentsData))
        },
        deep: true
      }
    }
  }