【issues/7986】插槽方式弹窗中取消该数据checkbox的选中状态,需要点击第二次才生效

pull/8191/head
JEECG 2025-04-24 09:24:48 +08:00
parent 04a3764f00
commit 3f0597a0f6
1 changed files with 10 additions and 4 deletions

View File

@ -1,7 +1,7 @@
<!--职务选择组件--> <!--职务选择组件-->
<template> <template>
<div class="JSelectPosition"> <div class="JSelectPosition">
<JSelectBiz @handleOpen="handleOpen" :loading="loadingEcho" v-bind="attrs"></JSelectBiz> <JSelectBiz @handleOpen="handleOpen" :loading="loadingEcho" v-bind="attrs" @change="(changeValue) => $emit('update:value', changeValue)"></JSelectBiz>
<!-- update-begin--author:liaozhiyang---date:20240515---forQQYUN-9260必填模式下会影响到弹窗内antd组件的样式 --> <!-- update-begin--author:liaozhiyang---date:20240515---forQQYUN-9260必填模式下会影响到弹窗内antd组件的样式 -->
<a-form-item> <a-form-item>
<PositionSelectModal @register="regModal" @getSelectResult="setValue" v-bind="getBindValue"></PositionSelectModal> <PositionSelectModal @register="regModal" @getSelectResult="setValue" v-bind="getBindValue"></PositionSelectModal>
@ -70,9 +70,15 @@
/** /**
* 监听组件值 * 监听组件值
*/ */
watchEffect(() => { // update-begin--author:liaozhiyang---date:20250423---forpull/8014checkbox
props.value && initValue(); watch(
}); () => props.value,
() => {
props.value && initValue();
},
{ deep: true }
);
// update-end--author:liaozhiyang---date:20250423---forpull/8014checkbox
/** /**
* 监听selectValues变化 * 监听selectValues变化