This commit is contained in:
2024-09-24 17:04:44 +08:00
parent 6cd84e0021
commit 30528311c1
77 changed files with 2251 additions and 1361 deletions

View File

@@ -16,7 +16,9 @@ const _sfc_main = defineComponent({
},
setup(__props) {
const props = __props;
const { accordion, activeValues, emit, collapseTransition } = inject("layCollapse");
const { accordion, activeValues, emit, collapseTransition } = inject(
"layCollapse"
);
let isShow = computed(() => {
return activeValues.value.includes(props.id);
});
@@ -32,7 +34,10 @@ const _sfc_main = defineComponent({
} else {
activeValues.value.push(props.id);
}
emit("update:modelValue", accordion ? activeValues.value[0] || null : activeValues.value);
emit(
"update:modelValue",
accordion ? activeValues.value[0] || null : activeValues.value
);
emit("change", props.id, !_isShow, activeValues.value);
};
return (_ctx, _cache) => {