Commit 55df8fc4 by xinla

watch: \{[\r.\w\b\n]([ .\b\w]+)\((.+)\) watch: {

  $1:{
        deep: true,
        handler($2)
1 parent ef4b7e08
...@@ -48,10 +48,13 @@ export default { ...@@ -48,10 +48,13 @@ export default {
}, },
computed: {}, computed: {},
watch: { watch: {
series() { series: {
this.$nextTick(() => { deep: true,
this.drawChart() handler(val) {
}) this.$nextTick(() => {
this.drawChart()
})
},
}, },
}, },
created() {}, created() {},
......
...@@ -49,10 +49,13 @@ export default { ...@@ -49,10 +49,13 @@ export default {
}, },
computed: {}, computed: {},
watch: { watch: {
series() { series: {
this.$nextTick(() => { deep: true,
this.drawChart() handler() {
}) this.$nextTick(() => {
this.drawChart()
})
},
}, },
}, },
created() {}, created() {},
......
...@@ -36,8 +36,11 @@ export default { ...@@ -36,8 +36,11 @@ export default {
}, },
computed: {}, computed: {},
watch: { watch: {
series() { series: {
this.drawChart() deep: true,
handler() {
this.drawChart()
},
}, },
}, },
created() {}, created() {},
......
...@@ -39,9 +39,13 @@ export default { ...@@ -39,9 +39,13 @@ export default {
}, },
}, },
watch: { watch: {
routes() { routes: {
this.searchPool = this.generateRoutes(this.routes) deep: true,
handler() {
this.searchPool = this.generateRoutes(this.routes)
},
}, },
searchPool(list) { searchPool(list) {
this.initFuse(list) this.initFuse(list)
}, },
......
...@@ -41,11 +41,17 @@ export default { ...@@ -41,11 +41,17 @@ export default {
} }
}, },
watch: { watch: {
selected(val) { selected: {
this.setSelected() deep: true,
handler(val) {
this.setSelected()
},
}, },
list(val) { list: {
this.setSelected() deep: true,
handler(val) {
this.setSelected()
},
}, },
}, },
computed: { computed: {
......
...@@ -40,11 +40,17 @@ export default { ...@@ -40,11 +40,17 @@ export default {
} }
}, },
watch: { watch: {
selected(val) { selected: {
this.setSelected() deep: true,
handler(val) {
this.setSelected()
},
}, },
list(val) { list: {
this.setSelected() deep: true,
handler(val) {
this.setSelected()
},
}, },
}, },
computed: { computed: {
......
...@@ -117,11 +117,17 @@ export default { ...@@ -117,11 +117,17 @@ export default {
} }
}, },
watch: { watch: {
selected(val) { selected: {
this.setSelected() deep: true,
handler(val) {
this.setSelected()
},
}, },
list(val) { list: {
this.setSelected() deep: true,
handler(val) {
this.setSelected()
},
}, },
}, },
computed: { computed: {
......
...@@ -90,11 +90,17 @@ export default { ...@@ -90,11 +90,17 @@ export default {
} }
}, },
watch: { watch: {
selected(val) { selected: {
this.setSelected() deep: true,
handler(val) {
this.setSelected()
},
}, },
list(val) { list: {
this.setSelected() deep: true,
handler(val) {
this.setSelected()
},
}, },
}, },
computed: { computed: {
......
...@@ -37,12 +37,18 @@ export default { ...@@ -37,12 +37,18 @@ export default {
} }
}, },
watch: { watch: {
tags(tags) { tags: {
this.form.tagList = tags.map((t) => t.tagId) deep: true,
handler(tags) {
this.form.tagList = tags.map((t) => t.tagId)
},
}, },
users(users) { users: {
this.form.emplList = users.map((u) => u.businessId) deep: true,
this.$refs.form.validateField('emplList') handler(users) {
this.form.emplList = users.map((u) => u.businessId)
this.$refs.form.validateField('emplList')
},
}, },
}, },
created() { created() {
......
...@@ -26,13 +26,16 @@ export default { ...@@ -26,13 +26,16 @@ export default {
} }
}, },
watch: { watch: {
searchDate(dateRange) { searchDate: {
if (!dateRange || dateRange.length !== 2) { deep: true,
this.query.beginTime = '' handler(dateRange) {
this.query.endTime = '' if (!dateRange || dateRange.length !== 2) {
} else { this.query.beginTime = ''
;[this.query.beginTime, this.query.endTime] = dateRange this.query.endTime = ''
} } else {
;[this.query.beginTime, this.query.endTime] = dateRange
}
},
}, },
}, },
created() { created() {
......
...@@ -246,13 +246,16 @@ export default { ...@@ -246,13 +246,16 @@ export default {
} }
}, },
watch: { watch: {
searchDate(dateRange) { searchDate: {
if (!dateRange || dateRange.length !== 2) { deep: true,
this.query.beginTime = '' handler(dateRange) {
this.query.endTime = '' if (!dateRange || dateRange.length !== 2) {
} else { this.query.beginTime = ''
;[this.query.beginTime, this.query.endTime] = dateRange this.query.endTime = ''
} } else {
;[this.query.beginTime, this.query.endTime] = dateRange
}
},
}, },
// 如果实际群码弹出框关闭,刷新数据 // 如果实际群码弹出框关闭,刷新数据
realCodeDialog(val) { realCodeDialog(val) {
......
...@@ -173,13 +173,16 @@ export default { ...@@ -173,13 +173,16 @@ export default {
} }
}, },
watch: { watch: {
searchDate(dateRange) { searchDate: {
if (!dateRange || dateRange.length !== 2) { deep: true,
this.query.beginTime = '' handler(dateRange) {
this.query.endTime = '' if (!dateRange || dateRange.length !== 2) {
} else { this.query.beginTime = ''
;[this.query.beginTime, this.query.endTime] = dateRange this.query.endTime = ''
} } else {
;[this.query.beginTime, this.query.endTime] = dateRange
}
},
}, },
// 如果实际群码弹出框关闭,刷新数据 // 如果实际群码弹出框关闭,刷新数据
// realCodeDialog(val) { // realCodeDialog(val) {
......
...@@ -14,8 +14,11 @@ export default { ...@@ -14,8 +14,11 @@ export default {
}) })
}, },
watch: { watch: {
Datas() { Datas: {
this.initEchart() deep: true,
handler() {
this.initEchart()
},
}, },
}, },
props: ['Datas'], props: ['Datas'],
......
...@@ -28,10 +28,13 @@ export default { ...@@ -28,10 +28,13 @@ export default {
}, },
computed: {}, computed: {},
watch: { watch: {
series() { series: {
this.$nextTick(() => { deep: true,
this.drawChart() handler() {
}) this.$nextTick(() => {
this.drawChart()
})
},
}, },
}, },
created() {}, created() {},
......
...@@ -86,10 +86,13 @@ export default { ...@@ -86,10 +86,13 @@ export default {
}, },
}, },
watch: { watch: {
init() { init: {
this.dataList = this.init deep: true,
this.setEnableList() handler() {
this.setDisableList() this.dataList = this.init
this.setEnableList()
this.setDisableList()
},
}, },
}, },
data() { data() {
......
...@@ -321,21 +321,25 @@ export default { ...@@ -321,21 +321,25 @@ export default {
}, },
}, },
watch: { watch: {
baseData(val) { baseData: {
if (val) { deep: true,
this.attachments = [] handler(val) {
if (val.length) { if (val) {
this.attachments = this.setEditList(val) this.attachments = []
} else { if (val.length) {
this.attachments.push({ this.attachments = this.setEditList(val)
msgType: '4', } else {
...materialField, this.attachments.push({
}) msgType: '4',
...materialField,
})
}
// this.$forceUpdate()
} }
// this.$forceUpdate() },
}
}, },
attachments: { attachments: {
deep: true,
immediate: true, immediate: true,
handler(val) { handler(val) {
this.setShow() this.setShow()
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!