feat: <template>

<template>
This commit is contained in:
cgd_mac 2021-12-24 15:28:36 +08:00
parent 11f392000c
commit 86f4712c05
1 changed files with 12 additions and 10 deletions

View File

@ -140,7 +140,9 @@ export default {
computed: {}, computed: {},
// data // data
watch: { watch: {
tableData: function() { tableData: {
deep: true,
handler: function() {
let sum = 0 let sum = 0
this.tableData.forEach(element => { this.tableData.forEach(element => {
if (element.totalScore) { if (element.totalScore) {
@ -150,6 +152,7 @@ export default {
}) })
this.form.totalScore = sum this.form.totalScore = sum
} }
}
}, },
// //
methods: { methods: {
@ -181,7 +184,6 @@ export default {
if (t1.topicType === t2.topicType) { if (t1.topicType === t2.topicType) {
this.$set(this.tableData[t1Index], 'topicNum', t2.topicNum) this.$set(this.tableData[t1Index], 'topicNum', t2.topicNum)
this.$set(this.tableData[t1Index], 'topicScore', t2.topicScore) this.$set(this.tableData[t1Index], 'topicScore', t2.topicScore)
} }
}) })
}) })