Browse Source

refactor(components): 简化 ShowDialogWrap 组件的 onOkHandle 方法

- 移除了对子组件 okClick 方法的复杂调用逻辑
- 直接调用 onOk 方法并传入 null 作为参数
- 这种简化使代码更加清晰,并且减少了潜在的错误和复杂性
master
lizw-2015 7 months ago
parent
commit
51c2b39277
  1. 8
      src/components/ShowDialogWrap.vue

8
src/components/ShowDialogWrap.vue

@ -25,7 +25,6 @@
</template>
<script>
import _ from 'lodash'
import { markRaw } from 'vue'
import ElementDialogResize from '@/components/element-dialog-resize'
export default {
@ -74,12 +73,7 @@ export default {
})
},
onOkHandle() {
if (typeof this.$refs.childCmpRef['okClick'] === 'function') {
const data = this.$refs.childCmpRef['okClick']()
if (data) {
this.onOk(data)
}
}
this.onOk(null)
},
onClose() {
this.isShow = false

Loading…
Cancel
Save