bug修复

This commit is contained in:
@fawn-nine
2023-09-22 13:57:49 +08:00
parent 036ca42ae9
commit 14e286a7b6

View File

@@ -2,7 +2,7 @@
<el-dialog
:title="!dataForm.splId ? '新增' : '修改'"
:close-on-click-modal="false"
:visible.sync="visible" append-to-body>
:visible.sync="visible" append-to-body @close="resetform">
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()" label-width="80px">
<el-form-item label="标签名称" prop="labelName">
<el-input v-model="dataForm.labelName" placeholder="标签名称"></el-input>
@@ -36,7 +36,7 @@
},
methods: {
methods: {
init (row) {
this.visible = true
this.$nextTick(() => {
@@ -46,7 +46,13 @@
this.dataForm.labelName = row.labelName
}
})
},
},
// 关闭弹窗
resetform() {
this.visible = false
this.dataForm.splId = 0
console.log('重置id')
},
// 表单提交
dataFormSubmit () {
this.$refs['dataForm'].validate((valid) => {
@@ -68,6 +74,7 @@
onClose: () => {
this.visible = false
this.$emit('refreshDataList')
this.resetform()
}
})
} else {
@@ -91,6 +98,7 @@
onClose: () => {
this.visible = false
this.$emit('refreshDataList')
this.resetform()
}
})
} else {