diff --git a/components/_util/cssinjs/hooks/useStyleRegister/index.tsx b/components/_util/cssinjs/hooks/useStyleRegister/index.tsx index e96603238..d264d0744 100644 --- a/components/_util/cssinjs/hooks/useStyleRegister/index.tsx +++ b/components/_util/cssinjs/hooks/useStyleRegister/index.tsx @@ -42,17 +42,17 @@ export type CSSProperties = Omit, 'anima export type CSSPropertiesWithMultiValues = { [K in keyof CSSProperties]: | CSSProperties[K] - | Extract[] + | readonly Extract[] | { - [SKIP_CHECK]: boolean; + [SKIP_CHECK]?: boolean; [MULTI_VALUE]?: boolean; - value: CSSProperties[K] | Extract[]; + value: CSSProperties[K] | CSSProperties[K][]; }; }; export type CSSPseudos = { [K in CSS.Pseudos]?: CSSObject }; -type ArrayCSSInterpolation = CSSInterpolation[]; +type ArrayCSSInterpolation = readonly CSSInterpolation[]; export type InterpolationPrimitive = null | undefined | boolean | number | string | CSSObject; diff --git a/components/_util/type.ts b/components/_util/type.ts index 0965d15ae..ed5541d4e 100644 --- a/components/_util/type.ts +++ b/components/_util/type.ts @@ -33,7 +33,7 @@ export interface PropOptions { declare type VNodeChildAtom = VNode | string | number | boolean | null | undefined | void; // eslint-disable-next-line no-undef -export type VueNode = VNodeChildAtom | VNodeChildAtom[] | JSX.Element; +export type VueNode = VNodeChildAtom | VNodeChildAtom[] | VNode; export const withInstall = (comp: T) => { const c = comp as any; diff --git a/components/menu/src/hooks/useMenuContext.ts b/components/menu/src/hooks/useMenuContext.ts index 71e3c1a75..d6ff2b9c5 100644 --- a/components/menu/src/hooks/useMenuContext.ts +++ b/components/menu/src/hooks/useMenuContext.ts @@ -32,7 +32,7 @@ export interface MenuContextProps { inlineCollapsed: Ref; theme?: ComputedRef; - siderCollapsed?: ComputedRef; + siderCollapsed?: Ref; // // Mode mode: Ref; diff --git a/components/vc-picker/panels/TimePanel/TimeUnitColumn.tsx b/components/vc-picker/panels/TimePanel/TimeUnitColumn.tsx index 6058639c1..de70c157e 100644 --- a/components/vc-picker/panels/TimePanel/TimeUnitColumn.tsx +++ b/components/vc-picker/panels/TimePanel/TimeUnitColumn.tsx @@ -1,7 +1,7 @@ import { scrollTo, waitElementReady } from '../../utils/uiUtil'; import { useInjectPanel } from '../../PanelContext'; import classNames from '../../../_util/classNames'; -import { ref, onBeforeUnmount, watch, defineComponent, nextTick } from 'vue'; +import { ref, onBeforeUnmount, watch, defineComponent, nextTick, shallowRef } from 'vue'; export type Unit = { label: any; @@ -24,7 +24,7 @@ export default defineComponent({ setup(props) { const { open } = useInjectPanel(); - const ulRef = ref(null); + const ulRef = shallowRef(null); const liRefs = ref>(new Map()); const scrollRef = ref(); @@ -33,7 +33,7 @@ export default defineComponent({ () => { const li = liRefs.value.get(props.value!); if (li && open.value !== false) { - scrollTo(ulRef.value!, li.offsetTop, 120); + scrollTo(ulRef.value, li.offsetTop, 120); } }, ); diff --git a/package.json b/package.json index 0ca195a75..4acf7b64e 100644 --- a/package.json +++ b/package.json @@ -129,7 +129,6 @@ "@vitejs/plugin-vue-jsx": "^2.0.0", "@vue/babel-plugin-jsx": "^1.0.0", "@vue/cli-plugin-eslint": "^5.0.0", - "@vue/compiler-sfc": "^3.2.0", "@vue/eslint-config-prettier": "^8.0.0", "@vue/eslint-config-typescript": "^11.0.0", "@vue/test-utils": "^2.0.2",