Commit 3eb89c51 by chenwq

fix(allocationNumDialog): 修复对话框关闭时参数传递错误

修复 handleClose 方法在对话框关闭时参数传递不一致的问题,确保点击关闭按钮和取消按钮时都传递正确的参数给父组件。
1 parent 9ce27299
<!-- 盘点 -->
<template>
<GLDialog title="调拨" :visible.sync="allocationNumVisible" :before-close="e => handleClose(undefined, 'close')" class="allocationNumDailog" okText="确定" @onCancel="handleClose" @onOk="handleAddConfirm">
<GLDialog title="调拨" :visible.sync="allocationNumVisible" :before-close="e => handleClose(undefined, true)" class="allocationNumDailog" okText="确定" @onCancel="e => handleClose(e, true)" @onOk="handleAddConfirm">
<div class="gl-form-page gl-form-min">
<el-form ref="allocationNumForm" size="small" :model="infoForm" :rules="formRules" label-width="154px">
<el-form-item label="调拨数量:" prop="allocationNum">
......@@ -38,18 +38,18 @@ export default {
},
allocationInfo: {
type: Object,
default: () => {}
default: () => { }
}
},
watch: {},
created() {},
created() { },
components: {},
computed: {},
mounted() {},
mounted() { },
methods: {
handleUpgradeNum(newVal) {
......@@ -66,8 +66,8 @@ export default {
})
},
handleClose(info) {
this.$emit('dialogClose', info)
handleClose(info, isClose = false) {
this.$emit('dialogClose', isClose ? undefined : info)
}
}
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!