Merge remote-tracking branch 'origin/main' into feat-v4

This commit is contained in:
tangjinzhou 2023-05-03 13:50:14 +08:00
commit 0df6abe3a7
4 changed files with 8 additions and 10 deletions

View File

@ -160,8 +160,6 @@ export default defineComponent({
const { offsetTop, targetOffset } = props;
setCurrentActiveLink(link);
const container = getContainer.value();
const scrollTop = getScroll(container, true);
const sharpLinkMatch = sharpMatcherRegx.exec(link);
if (!sharpLinkMatch) {
return;
@ -171,6 +169,8 @@ export default defineComponent({
return;
}
const container = getContainer.value();
const scrollTop = getScroll(container, true);
const eleOffsetTop = getOffsetTop(targetElement, container);
let y = scrollTop + eleOffsetTop;
y -= targetOffset !== undefined ? targetOffset : offsetTop || 0;

View File

@ -100,6 +100,7 @@ const InputNumber = defineComponent({
};
return () => {
const { hasFeedback, isFormItemInput, feedbackIcon } = formItemInputContext;
const id = props.id ?? formItemContext.id.value;
const {
class: className,
bordered,
@ -110,7 +111,7 @@ const InputNumber = defineComponent({
prefix = slots.prefix?.(),
valueModifiers = {},
...others
} = { ...attrs, ...props } as InputNumberProps & HTMLAttributes;
} = { ...attrs, ...props, id } as InputNumberProps & HTMLAttributes;
const preCls = prefixCls.value;

View File

@ -78,10 +78,7 @@ const handleClick: MenuProps['onClick'] = e => {
console.log('click', e);
};
watch(
() => openKeys,
val => {
console.log('openKeys', val);
},
);
watch(openKeys, val => {
console.log('openKeys', val);
});
</script>

View File

@ -37,7 +37,7 @@ function fillSlots<RecordType>(columns: ColumnsType<RecordType>, contextSlots: R
() => [column.title as any],
);
}
if ('children' in cloneColumn) {
if ('children' in cloneColumn && Array.isArray(cloneColumn.children)) {
cloneColumn.children = fillSlots(cloneColumn.children, contextSlots);
}