⏪: 删除提交的手风琴案例
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user