mirror of
https://github.com/cool-team-official/cool-admin-vue.git
synced 2024-11-01 14:10:27 +08:00
解决 cl-switch 异常问题
This commit is contained in:
parent
01858011c9
commit
5066bd0691
@ -36,14 +36,18 @@ export default defineComponent({
|
|||||||
watch(
|
watch(
|
||||||
() => props.modelValue,
|
() => props.modelValue,
|
||||||
(val) => {
|
(val) => {
|
||||||
if (isBoolean(props.modelValue)) {
|
// 首次获取类型
|
||||||
activeValue.value = true;
|
if (activeValue.value === undefined) {
|
||||||
inactiveValue.value = false;
|
if (isBoolean(props.modelValue)) {
|
||||||
|
activeValue.value = true;
|
||||||
|
inactiveValue.value = false;
|
||||||
|
} else {
|
||||||
|
activeValue.value = props.activeValue;
|
||||||
|
inactiveValue.value = props.inactiveValue;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
nextTick(() => {
|
status.value = val;
|
||||||
status.value = val;
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
immediate: true
|
immediate: true
|
||||||
|
@ -13,8 +13,8 @@ export default (): Merge<ModuleConfig, CrudOptions> => {
|
|||||||
label: "CRUD",
|
label: "CRUD",
|
||||||
description: "快速增删改查及一系列辅助组件",
|
description: "快速增删改查及一系列辅助组件",
|
||||||
author: "COOL",
|
author: "COOL",
|
||||||
version: "1.0.2",
|
version: "1.0.3",
|
||||||
updateTime: "2024-02-19",
|
updateTime: "2024-02-20",
|
||||||
demo: "/demo/crud",
|
demo: "/demo/crud",
|
||||||
|
|
||||||
// 组件全注册
|
// 组件全注册
|
||||||
|
Loading…
Reference in New Issue
Block a user