解决 cl-switch 异常问题

This commit is contained in:
icssoa 2024-02-20 18:21:20 +08:00
parent 01858011c9
commit 5066bd0691
2 changed files with 12 additions and 8 deletions

View File

@ -36,14 +36,18 @@ export default defineComponent({
watch(
() => props.modelValue,
(val) => {
// 首次获取类型
if (activeValue.value === undefined) {
if (isBoolean(props.modelValue)) {
activeValue.value = true;
inactiveValue.value = false;
} else {
activeValue.value = props.activeValue;
inactiveValue.value = props.inactiveValue;
}
}
nextTick(() => {
status.value = val;
});
},
{
immediate: true

View File

@ -13,8 +13,8 @@ export default (): Merge<ModuleConfig, CrudOptions> => {
label: "CRUD",
description: "快速增删改查及一系列辅助组件",
author: "COOL",
version: "1.0.2",
updateTime: "2024-02-19",
version: "1.0.3",
updateTime: "2024-02-20",
demo: "/demo/crud",
// 组件全注册