: 删除提交的手风琴案例

This commit is contained in:
就眠儀式
2022-05-25 19:52:41 +08:00
parent 62ba847924
commit 1531321951
7 changed files with 14 additions and 153 deletions

View File

@@ -75,11 +75,12 @@
}
.layui-iconpicker-list li {
display: inline-block;
vertical-align: top;
display: inline-block;
width: 60px;
margin: 0 5px 5px 0;
padding: 5px;
overflow: hidden;
border: 1px solid #eee;
border-radius: 2px;
cursor: pointer;

View File

@@ -74,16 +74,21 @@ const close = function (index: number, id: any) {
}
childrens.value.splice(index, 1);
if (active.value === id) {
const nextChildren = childrens.value[index === childrens.value.length ? 0 : index];
const nextChildren =
childrens.value[index === childrens.value.length ? 0 : index];
change(nextChildren && nextChildren.props ? nextChildren.props.id : "");
}
emit("close", id);
};
watch(slotsChange, function () {
childrens.value = [];
setItemInstanceBySlot((slot.default && slot.default()) as VNode[]);
}, { immediate: true });
watch(
slotsChange,
function () {
childrens.value = [];
setItemInstanceBySlot((slot.default && slot.default()) as VNode[]);
},
{ immediate: true }
);
provide("active", active);
provide("slotsChange", slotsChange);