数据字典1打开(值为'1'),数据字典2打开(值为'1'),将toSpc开关关闭,holdAction的值要设置false;这条就不对了,
数据字典1打开(值为'1'),数据字典2打开(值为'1'),toSpc开关打开,holdAction的值应该是null;
数据字典1打开(值为'1'),数据字典2打开(值为'1'),toSpc开关关闭,holdAction的值应该是false;
数据字典1打开(值为'1'),数据字典2打开(值为'0'),toSpc开关关闭,holdAction的值原来是什么就是什么;
数据字典1打开(值为'1'),数据字典2打开(值为'0'),toSpc开关打开,holdAction的值应该是null;
数据字典1打开(值为'0'),holdAction的值原来是什么就是什么;
声明:数据字典1打开(值为'1'),toSpc开关打开,我会在页面初始化的时候将holdAction值设为 false
一、数据字典1打开(值为'1'),数据字典2打开(值为'1')
数据字典1打开(值为'1'),数据字典2打开(值为'1'),toSpc开关打开,初始holdAction值为 false ,将toSpc开关关闭,holdAction的值应为 false ;
数据字典1打开(值为'1'),数据字典2打开(值为'1'),toSpc开关关闭,初始holdAction值为 null ,将toSpc开关打开,holdAction的值应为null;
数据字典1打开(值为'1'),数据字典2打开(值为'1'),toSpc开关关闭,初始holdAction值为 true ,将toSpc开关打开,holdAction的值应为null;
数据字典1打开(值为'1'),数据字典2打开(值为'1'),toSpc开关关闭,初始holdAction值为 false ,将toSpc开关打开,holdAction的值应为null;
数据字典1打开(值为'1'),数据字典2打开(值为'1'),toSpc开关打开,初始holdAction值为 false ,将toSpc开关关闭,holdAction的值应为 false ;再将toSpc开关打开,holdAction的值应为 null ;
数据字典1打开(值为'1'),数据字典2打开(值为'1'),toSpc开关关闭,初始holdAction值为 null ,将toSpc开关打开,holdAction的值应为 null ;再将toSpc开关关闭,holdAction的值应为 false ;
数据字典1打开(值为'1'),数据字典2打开(值为'1'),toSpc开关关闭,初始holdAction值为 true ,将toSpc开关打开,holdAction的值应为 null ;再将toSpc开关关闭,holdAction的值应为 false ;
数据字典1打开(值为'1'),数据字典2打开(值为'1'),toSpc开关关闭,初始holdAction值为 false ,将toSpc开关打开,holdAction的值应为 null ;再将toSpc开关关闭,holdAction的值应为 false ;
二、数据字典1打开(值为'1'),数据字典2关闭(值为其他),holdAction初始有值(true或false)
数据字典1打开(值为'1'),数据字典2关闭(值为其他),toSpc开关打开,初始holdAction有值(false),将toSpc开关关闭,holdAction的值应为false;
数据字典1打开(值为'1'),数据字典2关闭(值为其他),toSpc开关关闭,初始holdAction有值(true),将toSpc开关打开,holdAction的值应为null;
数据字典1打开(值为'1'),数据字典2关闭(值为其他),toSpc开关关闭,初始holdAction有值(false),将toSpc开关打开,holdAction的值应为null;
数据字典1打开(值为'1'),数据字典2关闭(值为其他),toSpc开关打开,初始holdAction有值(false),将toSpc开关关闭,holdAction的值应为false;再将toSpc开关打开,holdAction的值应为null;
数据字典1打开(值为'1'),数据字典2关闭(值为其他),toSpc开关关闭,初始holdAction有值(true),将toSpc开关打开,holdAction的值应为null;再将toSpc开关关闭,holdAction的值应为null;
数据字典1打开(值为'1'),数据字典2关闭(值为其他),toSpc开关关闭,初始holdAction有值(false),将toSpc开关打开,holdAction的值应为null;再将toSpc开关关闭,holdAction的值应为null;
三、数据字典1打开(值为'1'),数据字典2关闭(值为其他),holdAction初始无值(null,字段已隐藏)
数据字典1打开(值为'1'),数据字典2关闭(值为其他),toSpc开关打开,初始holdAction无值(null),将toSpc开关关闭,holdAction的值应为null;
数据字典1打开(值为'1'),数据字典2关闭(值为其他),toSpc开关关闭,初始holdAction无值(null),将toSpc开关打开,holdAction的值应为null;
数据字典1打开(值为'1'),数据字典2关闭(值为其他),toSpc开关打开,初始holdAction无值(null),将toSpc开关关闭,holdAction的值应为null;再将toSpc开关打开,holdAction的值应为null;
数据字典1打开(值为'1'),数据字典2关闭(值为其他),toSpc开关关闭,初始holdAction无值(null),将toSpc开关打开,holdAction的值应为null;再将toSpc开关关闭,holdAction的值应为null;
四、数据字典1关闭(值为其他),总的来说,数据字典1关闭的时候,toSpc开关不联动更新holdAction值
数据字典1关闭(值为其他),toSpc开关打开,初始holdAction值为null,将toSpc开关关闭,holdAction的值应为null;
数据字典1关闭(值为其他),toSpc开关打开,初始holdAction值为true,将toSpc开关关闭,holdAction的值应为true;
数据字典1关闭(值为其他),toSpc开关打开,初始holdAction值为false,将toSpc开关关闭,holdAction的值应为false;
数据字典1关闭(值为其他),toSpc开关关闭,初始holdAction值为null,将toSpc开关打开,holdAction的值应为null;
数据字典1关闭(值为其他),toSpc开关关闭,初始holdAction值为true,将toSpc开关打开,holdAction的值应为true;
数据字典1关闭(值为其他),toSpc开关关闭,初始holdAction值为false,将toSpc开关打开,holdAction的值应为false;
数据字典1关闭(值为其他),toSpc开关打开,初始holdAction值为null,将toSpc开关关闭,holdAction的值应为null;再将toSpc开关打开,holdAction的值应为null;
数据字典1关闭(值为其他),toSpc开关打开,初始holdAction值为true,将toSpc开关关闭,holdAction的值应为true;再将toSpc开关打开,holdAction的值应为true;
数据字典1关闭(值为其他),toSpc开关打开,初始holdAction值为false,将toSpc开关关闭,holdAction的值应为false;再将toSpc开关打开,holdAction的值应为false;
数据字典1关闭(值为其他),toSpc开关关闭,初始holdAction值为null,将toSpc开关打开,holdAction的值应为null;再将toSpc开关关闭,holdAction的值应为null;
数据字典1关闭(值为其他),toSpc开关关闭,初始holdAction值为true,将toSpc开关打开,holdAction的值应为true;再将toSpc开关关闭,holdAction的值应为true;
数据字典1关闭(值为其他),toSpc开关关闭,初始holdAction值为false,将toSpc开关打开,holdAction的值应为false;再将toSpc开关关闭,holdAction的值应为false;
// 页面初始化
const initPage = () => {
if (ext1 === '1' && toSpc === true) {
holdAction.value = false;
}
};
// toSpc 切换事件
const onToSpcChange = (value: boolean) => {
if (ext1 !== '1') return;
if (value === true) {
// 打开 toSpc → 设为 null
holdAction.value = null;
} else if (ext3 === '1') {
// 关闭 toSpc,且 ext3='1' → 设为 false
holdAction.value = false;
}
// 其他情况:ext3≠'1' 时关闭 toSpc,不联动
};