docs: update

This commit is contained in:
就眠儀式
2022-03-19 22:09:43 +08:00
parent fda2d11b20
commit ade18232bd
3 changed files with 10 additions and 2 deletions

View File

@@ -39,7 +39,10 @@ const showHandle = function () {
// 普通折叠面板 --> 展开
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);
};
</script>

View File

@@ -59,7 +59,11 @@ const beforeLeave = (el: any) => {
el.dataset.oldPaddingBottom = el.style.paddingBottom;
el.dataset.oldOverflow = el.style.overflow;
var computedStyle = getComputedStyle(el, null);
el.style.height = el.scrollHeight - parseInt(computedStyle.paddingTop) - parseInt(computedStyle.paddingBottom) + "px";
el.style.height =
el.scrollHeight -
parseInt(computedStyle.paddingTop) -
parseInt(computedStyle.paddingBottom) +
"px";
el.style.overflow = "hidden";
};