diff --git a/components/_util/warning.ts b/components/_util/warning.ts index 73387fd81..463e2de50 100644 --- a/components/_util/warning.ts +++ b/components/_util/warning.ts @@ -9,7 +9,7 @@ type Warning = (valid: boolean, component: string, message?: string) => void; let warning: Warning = noop; if (process.env.NODE_ENV !== 'production') { warning = (valid, component, message) => { - vcWarning(valid, `[antd: ${component}] ${message}`); + vcWarning(valid, `[antdv: ${component}] ${message}`); // StrictMode will inject console which will not throw warning in React 17. if (process.env.NODE_ENV === 'test') { diff --git a/components/anchor/Anchor.tsx b/components/anchor/Anchor.tsx index 8450ef270..4eeb4dc0f 100644 --- a/components/anchor/Anchor.tsx +++ b/components/anchor/Anchor.tsx @@ -104,7 +104,7 @@ export default defineComponent({ const activeLink = ref(null); const getContainer = computed(() => { const { getContainer } = props; - return getContainer || getTargetContainer.value || getDefaultContainer; + return getContainer || getTargetContainer?.value || getDefaultContainer; }); // func... const getCurrentAnchor = (offsetTop = 0, bounds = 5) => { diff --git a/components/config-provider/hooks/useConfigInject.ts b/components/config-provider/hooks/useConfigInject.ts index fa2435438..f22813689 100644 --- a/components/config-provider/hooks/useConfigInject.ts +++ b/components/config-provider/hooks/useConfigInject.ts @@ -6,10 +6,10 @@ export default (name: string, props: Record) => { renderEmpty: () => null, }); const prefixCls = computed(() => configProvider.getPrefixCls(name, props.prefixCls)); - const direction = computed(() => props.direction ?? configProvider.direction.value); + const direction = computed(() => props.direction ?? configProvider.direction?.value); const iconPrefixCls = computed(() => props.iconPrefixCls ?? configProvider.iconPrefixCls.value); const rootPrefixCls = computed(() => configProvider.getPrefixCls()); - const autoInsertSpaceInButton = computed(() => configProvider.autoInsertSpaceInButton.value); + const autoInsertSpaceInButton = computed(() => configProvider.autoInsertSpaceInButton?.value); const renderEmpty = configProvider.renderEmpty; const space = configProvider.space; const pageHeader = configProvider.pageHeader; @@ -18,19 +18,19 @@ export default (name: string, props: Record) => { const getPopupContainer = configProvider.getPopupContainer; const dropdownMatchSelectWidth = computed( - () => props.dropdownMatchSelectWidth ?? configProvider.dropdownMatchSelectWidth.value, + () => props.dropdownMatchSelectWidth ?? configProvider.dropdownMatchSelectWidth?.value, ); const virtual = computed( () => (props.virtual === undefined - ? configProvider.virtual.value !== false + ? configProvider.virtual?.value !== false : props.virtual !== false) && dropdownMatchSelectWidth.value !== false, ); - const size = computed(() => props.size || configProvider.componentSize.value); + const size = computed(() => props.size || configProvider.componentSize?.value); const autocomplete = computed( - () => props.autocomplete ?? configProvider.input.value?.autocomplete, + () => props.autocomplete ?? configProvider.input?.value?.autocomplete, ); - const disabled = computed(() => props.disabled || configProvider.componentDisabled.value); + const disabled = computed(() => props.disabled || configProvider.componentDisabled?.value); const csp = computed(() => props.csp ?? configProvider.csp); return { configProvider, diff --git a/components/divider/index.tsx b/components/divider/index.tsx index 0dda26ba6..2eedacac7 100644 --- a/components/divider/index.tsx +++ b/components/divider/index.tsx @@ -46,7 +46,7 @@ const Divider = defineComponent({ const prefixCls = prefixClsRef.value; return { [prefixCls]: true, - [hashId.value]: true, + [hashId.value]: !!hashId.value, [`${prefixCls}-${type}`]: true, [`${prefixCls}-dashed`]: !!dashed, [`${prefixCls}-plain`]: !!plain, diff --git a/components/dropdown/dropdown-button.tsx b/components/dropdown/dropdown-button.tsx index c1b5927fa..fbfae9745 100644 --- a/components/dropdown/dropdown-button.tsx +++ b/components/dropdown/dropdown-button.tsx @@ -62,7 +62,7 @@ export default defineComponent({ disabled, trigger: disabled ? [] : trigger, placement, - getPopupContainer: getPopupContainer.value, + getPopupContainer: getPopupContainer?.value, onVisibleChange: handleVisibleChange, mouseEnterDelay, mouseLeaveDelay, diff --git a/components/dropdown/dropdown.tsx b/components/dropdown/dropdown.tsx index 38306e194..f7a27657c 100644 --- a/components/dropdown/dropdown.tsx +++ b/components/dropdown/dropdown.tsx @@ -148,7 +148,7 @@ const Dropdown = defineComponent({ arrow: !!arrow, alignPoint, prefixCls: prefixCls.value, - getPopupContainer: getPopupContainer.value, + getPopupContainer: getPopupContainer?.value, transitionName: transitionName.value, trigger: triggerActions, onVisibleChange: handleVisibleChange, diff --git a/components/grid/demo/flex-align.vue b/components/grid/demo/flex-align.vue index 965462870..ecbf174c4 100644 --- a/components/grid/demo/flex-align.vue +++ b/components/grid/demo/flex-align.vue @@ -19,7 +19,7 @@ Child elements vertically aligned.