diff --git a/docs/examples/components/Spin.tsx b/docs/examples/components/Spin.tsx index 57b8315..d661e75 100644 --- a/docs/examples/components/Spin.tsx +++ b/docs/examples/components/Spin.tsx @@ -43,7 +43,7 @@ const Spin = ({ className, ...restProps }: SpinProps) => { // 全局注册,内部会做缓存优化 const wrapSSR = useStyleRegister( { theme, token, hashId, path: [prefixCls] }, - () => [genSpinStyle(prefixCls, token, hashId)], + () => [genSpinStyle(prefixCls, token)], ); return wrapSSR( diff --git a/docs/examples/ssr-hydrate-file.tsx b/docs/examples/ssr-hydrate-file.tsx index 4ba2fc0..0be6fba 100644 --- a/docs/examples/ssr-hydrate-file.tsx +++ b/docs/examples/ssr-hydrate-file.tsx @@ -27,7 +27,7 @@ export default function App() { // debugger; hydrateRoot( container, - + , ); diff --git a/docs/examples/ssr-hydrate-inline.tsx b/docs/examples/ssr-hydrate-inline.tsx index ee91e0c..09c0330 100644 --- a/docs/examples/ssr-hydrate-inline.tsx +++ b/docs/examples/ssr-hydrate-inline.tsx @@ -37,7 +37,7 @@ export default function App() { // debugger; hydrateRoot( container, - + , ); diff --git a/package.json b/package.json index b857104..3030290 100644 --- a/package.json +++ b/package.json @@ -44,7 +44,7 @@ "@emotion/hash": "^0.8.0", "@emotion/unitless": "^0.7.5", "classnames": "^2.3.1", - "csstype": "3.1.2", + "csstype": "^3.1.3", "rc-util": "^5.35.0", "stylis": "^4.0.13" }, diff --git a/src/hooks/useStyleRegister.tsx b/src/hooks/useStyleRegister.tsx index cfae0de..d2474a9 100644 --- a/src/hooks/useStyleRegister.tsx +++ b/src/hooks/useStyleRegister.tsx @@ -40,7 +40,7 @@ export type CSSProperties = Omit< export type CSSPropertiesWithMultiValues = { [K in keyof CSSProperties]: | CSSProperties[K] - | Extract[] + | readonly Extract[] | { [SKIP_CHECK]?: boolean; [MULTI_VALUE]?: boolean; @@ -50,7 +50,7 @@ export type CSSPropertiesWithMultiValues = { export type CSSPseudos = { [K in CSS.Pseudos]?: CSSObject }; -type ArrayCSSInterpolation = CSSInterpolation[]; +type ArrayCSSInterpolation = readonly CSSInterpolation[]; export type InterpolationPrimitive = | null