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

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

View File

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

View File

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

View File

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