Commit add52167 by chenwq

refactor(storeCredit): 优化selectStore组件初始化逻辑

移除watch监听dialogVisible的冗余逻辑,直接在mounted中调用init
添加v-if条件渲染避免不必要的组件渲染
1 parent 0e2ed548
......@@ -151,7 +151,7 @@
<el-button v-if="!isWatchPage" type="primary" @click="handleConfirm" size="medium">确定</el-button>
</GLFooter>
<select-store :dialogVisible.sync="relateStoreVisible" :storeSelected="selectedList" :merchantInfo="configForm" @handleRelateStoreConfirm="handleRelateStoreConfirm" @handleRelateStoreClose="handleRelateStoreClose" />
<select-store v-if="relateStoreVisible" :dialogVisible.sync="relateStoreVisible" :storeSelected="selectedList" :merchantInfo="configForm" @handleRelateStoreConfirm="handleRelateStoreConfirm" @handleRelateStoreClose="handleRelateStoreClose" />
<!-- <points-config :configParams.sync="configParams" :merchantId="configForm.merchantId" @confirm="changeRowConfig" /> -->
<import-err-dialog :importObj.sync="importObj" />
......
......@@ -111,12 +111,13 @@ export default {
// required: true
// }
},
watch: {
dialogVisible(n) {
if (n) this.init()
}
},
// watch: {
// dialogVisible(n) {
// if (n) this.init()
// }
// },
mounted() {
this.init()
},
methods: {
init() {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!