feat(components): 优化对话框组件并添加关闭功能

- 在 RenderDialog 组件中添加 close 方法,用于关闭对话框
- 优化 knowledgeForm 组件的代码结构和样式
- 在 knowledgeForm 组件中添加对 visible 属性的监听,以同步更新父组件的状态- 修复 knowledgeForm 组件中的保存逻辑
This commit is contained in:
陈昱达
2025-04-27 18:44:34 +08:00
parent 9285c3b2f8
commit 08b7c6c14e
2 changed files with 74 additions and 21 deletions

View File

@@ -74,10 +74,11 @@ export default {
this.$emit('confirm')
// this.$emit('update:visible', false)
},
close() {
this.cancel()
},
handleBeforeClose() {
this.beforeClose
? this.beforeClose()
: (this.$emit('cancel'), this.$emit('update:visible', false))
this.beforeClose ? this.beforeClose() : this.cancel()
}
},
created() {},