Commit 3eb89c51 by chenwq

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

修复 handleClose 方法在对话框关闭时参数传递不一致的问题,确保点击关闭按钮和取消按钮时都传递正确的参数给父组件。
1 parent 9ce27299
<!-- 盘点 --> <!-- 盘点 -->
<template> <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"> <div class="gl-form-page gl-form-min">
<el-form ref="allocationNumForm" size="small" :model="infoForm" :rules="formRules" label-width="154px"> <el-form ref="allocationNumForm" size="small" :model="infoForm" :rules="formRules" label-width="154px">
<el-form-item label="调拨数量:" prop="allocationNum"> <el-form-item label="调拨数量:" prop="allocationNum">
...@@ -38,18 +38,18 @@ export default { ...@@ -38,18 +38,18 @@ export default {
}, },
allocationInfo: { allocationInfo: {
type: Object, type: Object,
default: () => {} default: () => { }
} }
}, },
watch: {}, watch: {},
created() {}, created() { },
components: {}, components: {},
computed: {}, computed: {},
mounted() {}, mounted() { },
methods: { methods: {
handleUpgradeNum(newVal) { handleUpgradeNum(newVal) {
...@@ -66,8 +66,8 @@ export default { ...@@ -66,8 +66,8 @@ export default {
}) })
}, },
handleClose(info) { handleClose(info, isClose = false) {
this.$emit('dialogClose', info) 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!