🐛(dropdown): 根据 issues 修复 dropdown 内容切换宽度计算不正确的问题
This commit is contained in:
parent
cc1f6de1b5
commit
b9f258f645
@ -573,7 +573,7 @@ onClickOutside(dropdownRef, (e) => {
|
|||||||
hide();
|
hide();
|
||||||
});
|
});
|
||||||
|
|
||||||
const onlyChildRenderFunc = () => {
|
const onlyChildRenderFunc = computed(() => {
|
||||||
const slotContent = slots.default ? slots.default() : [];
|
const slotContent = slots.default ? slots.default() : [];
|
||||||
const transformedSlotContent = slotContent.map((vnode) =>
|
const transformedSlotContent = slotContent.map((vnode) =>
|
||||||
cloneVNode(
|
cloneVNode(
|
||||||
@ -592,8 +592,8 @@ const onlyChildRenderFunc = () => {
|
|||||||
);
|
);
|
||||||
|
|
||||||
children.value = transformedSlotContent;
|
children.value = transformedSlotContent;
|
||||||
return h(Fragment, children.value);
|
return () => h(Fragment, children.value);
|
||||||
};
|
});
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
if (props.updateAtScroll) {
|
if (props.updateAtScroll) {
|
||||||
|
@ -27,7 +27,7 @@ function add(arg1: number, arg2: number) {
|
|||||||
arg2 = Number(arg2.toString().replace(".", ""));
|
arg2 = Number(arg2.toString().replace(".", ""));
|
||||||
}
|
}
|
||||||
return (arg1 + arg2) / m;
|
return (arg1 + arg2) / m;
|
||||||
};
|
}
|
||||||
//减法
|
//减法
|
||||||
function sub(arg1: number, arg2: number) {
|
function sub(arg1: number, arg2: number) {
|
||||||
var r1, r2, m, c;
|
var r1, r2, m, c;
|
||||||
@ -57,5 +57,5 @@ function sub(arg1: number, arg2: number) {
|
|||||||
arg2 = Number(arg2.toString().replace(".", ""));
|
arg2 = Number(arg2.toString().replace(".", ""));
|
||||||
}
|
}
|
||||||
return (arg1 - arg2) / m;
|
return (arg1 - arg2) / m;
|
||||||
};
|
}
|
||||||
export { add, sub };
|
export { add, sub };
|
||||||
|
Loading…
Reference in New Issue
Block a user