This commit is contained in:
helloDy
2024-03-29 14:14:21 +08:00
parent df2df6ed7a
commit caf614ca35
6 changed files with 27 additions and 7 deletions

View File

@@ -2,15 +2,17 @@
* @Author: zwq
* @Date: 2021-11-18 14:16:25
* @LastEditors: DY
* @LastEditTime: 2024-03-13 13:54:01
* @LastEditTime: 2024-03-27 13:47:24
* @Description:
-->
<template>
<el-drawer
:visible.sync="visible"
:show-close="false"
:wrapper-closable="isdetail"
:wrapper-closable="true"
class="drawer"
:before-close="beforeClose"
@closed="$emit('destroy')"
size="60%">
<small-title slot="title" :no-padding="true">
{{ isdetail ? '详情' : !dataForm.id ? '新增' : '编辑' }}
@@ -262,6 +264,15 @@ export default {
},
mounted() {},
methods: {
beforeClose(done) {
if (!this.isdetail) {
this.$confirm('确认关闭?')
.then(_ => {
done();
})
.catch(_ => {});
}
},
clearArea() {
this.$set(this.dataForm, 'area', 0)
this.$set(this.dataForm, 'weight', 0)

View File

@@ -26,7 +26,8 @@
<add-or-update
v-if="addOrUpdateVisible"
ref="addOrUpdate"
@refreshDataList="getDataList" />
@refreshDataList="getDataList"
@destroy="addOrUpdateVisible = false" />
</div>
</template>