You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
575 B
31 lines
575 B
/*
|
|
* 列表搜索的 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
|
|
}
|
|
}
|
|
}
|