Skip to content

Commit

Permalink
fix: type error
Browse files Browse the repository at this point in the history
  • Loading branch information
tangjinzhou committed Jan 5, 2024
1 parent 61c0d0c commit 2eed8e6
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 10 deletions.
8 changes: 4 additions & 4 deletions components/_util/cssinjs/hooks/useStyleRegister/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,17 +42,17 @@ export type CSSProperties = Omit<CSS.PropertiesFallback<number | string>, 'anima
export type CSSPropertiesWithMultiValues = {
[K in keyof CSSProperties]:
| CSSProperties[K]
| Extract<CSSProperties[K], string>[]
| readonly Extract<CSSProperties[K], string>[]
| {
[SKIP_CHECK]: boolean;
[SKIP_CHECK]?: boolean;
[MULTI_VALUE]?: boolean;
value: CSSProperties[K] | Extract<CSSProperties[K], string>[];
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;

Expand Down
2 changes: 1 addition & 1 deletion components/_util/type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export interface PropOptions<T = any, D = T> {
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 = <T>(comp: T) => {
const c = comp as any;
Expand Down
2 changes: 1 addition & 1 deletion components/menu/src/hooks/useMenuContext.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export interface MenuContextProps {
inlineCollapsed: Ref<boolean>;
theme?: ComputedRef<MenuTheme>;

siderCollapsed?: ComputedRef<boolean>;
siderCollapsed?: Ref<boolean>;

// // Mode
mode: Ref<MenuMode>;
Expand Down
6 changes: 3 additions & 3 deletions components/vc-picker/panels/TimePanel/TimeUnitColumn.tsx
Original file line number Diff line number Diff line change
@@ -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;
Expand All @@ -24,7 +24,7 @@ export default defineComponent<TimeUnitColumnProps>({
setup(props) {
const { open } = useInjectPanel();

const ulRef = ref<HTMLUListElement>(null);
const ulRef = shallowRef<HTMLElement>(null);
const liRefs = ref<Map<number, HTMLElement | null>>(new Map());
const scrollRef = ref<Function>();

Expand All @@ -33,7 +33,7 @@ export default defineComponent<TimeUnitColumnProps>({
() => {
const li = liRefs.value.get(props.value!);
if (li && open.value !== false) {
scrollTo(ulRef.value!, li.offsetTop, 120);
scrollTo(ulRef.value, li.offsetTop, 120);
}
},
);
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 2eed8e6

Please sign in to comment.