Browse Source

修复编译

main
李金 6 months ago
parent
commit
d896d11fcf
  1. 4
      src/components/config-provider/index.tsx
  2. 4
      src/components/glass/index.tsx
  3. 2
      src/components/icon/picker/PickerPanel.tsx
  4. 1
      src/pages/dashboard/index.tsx
  5. 25
      tsconfig.json

4
src/components/config-provider/index.tsx

@ -1,11 +1,11 @@
import { ConfigProvider as AntdConfigProvider, ConfigProviderProps as AntdConfigProviderProps } from 'antd' import { ConfigProvider as AntdConfigProvider, ConfigProviderProps as AntdConfigProviderProps } from 'antd'
import { AntdToken, ThemeAppearance, useAntdToken, useThemeMode } from 'antd-style'
import { AntdToken, ThemeAppearance, useThemeMode } from 'antd-style'
import type { OverrideToken } from 'antd/es/theme/interface' import type { OverrideToken } from 'antd/es/theme/interface'
import type { FC, ReactNode } from 'react' import type { FC, ReactNode } from 'react'
import { ThemeProvider, createProAntdTheme, getProToken } from '@/theme' import { ThemeProvider, createProAntdTheme, getProToken } from '@/theme'
export const useProAntdTheme = (appearance: ThemeAppearance) => { export const useProAntdTheme = (appearance: ThemeAppearance) => {
const token = useAntdToken()
// const token = useAntdToken()
const themeConfig = createProAntdTheme(appearance) const themeConfig = createProAntdTheme(appearance)
const controlToken: Partial<AntdToken> = { const controlToken: Partial<AntdToken> = {

4
src/components/glass/index.tsx

@ -27,10 +27,10 @@ const Glass = (props: IClassProps) => {
) )
} }
export const withGlass = (Component: React.Component | React.FC | JSX.Element | React.ReactNode) => (props) => {
export const withGlass = (Component: any) => (props) => {
return ( return (
<Glass enabled={props.enabled}> <Glass enabled={props.enabled}>
<Component {...props} />
<Component {...props as any} />
</Glass> </Glass>
) )
} }

2
src/components/icon/picker/PickerPanel.tsx

@ -25,7 +25,7 @@ const PickerPanel = () => {
<Flexbox distribution={'space-between'} horizontal align={'center'}> <Flexbox distribution={'space-between'} horizontal align={'center'}>
<Flexbox horizontal align={'center'} gap={8}> <Flexbox horizontal align={'center'} gap={8}>
<IconItem {...icon as any} /> <IconItem {...icon as any} />
<div>{getIconName(icon)}</div>
<div>{getIconName(icon as any)}</div>
</Flexbox> </Flexbox>
<Button size={'small'} type={'link'} onClick={resetIcon}> <Button size={'small'} type={'link'} onClick={resetIcon}>

1
src/pages/dashboard/index.tsx

@ -19,6 +19,7 @@ const Index = () => {
) )
} }
// @ts-ignore
export const Route = createFileRoute('/dashboard')({ export const Route = createFileRoute('/dashboard')({
component: Index, component: Index,
}) })

25
tsconfig.json

@ -2,10 +2,13 @@
"compilerOptions": { "compilerOptions": {
"target": "ES2020", "target": "ES2020",
"useDefineForClassFields": true, "useDefineForClassFields": true,
"lib": ["ES2020", "DOM", "DOM.Iterable"],
"lib": [
"ES2020",
"DOM",
"DOM.Iterable"
],
"module": "ESNext", "module": "ESNext",
"skipLibCheck": true, "skipLibCheck": true,
/* Bundler mode */ /* Bundler mode */
"moduleResolution": "bundler", "moduleResolution": "bundler",
"allowImportingTsExtensions": true, "allowImportingTsExtensions": true,
@ -13,7 +16,6 @@
"isolatedModules": true, "isolatedModules": true,
"noEmit": true, "noEmit": true,
"jsx": "react-jsx", "jsx": "react-jsx",
/* Linting */ /* Linting */
"noImplicitAny": false, "noImplicitAny": false,
"strict": true, "strict": true,
@ -21,14 +23,21 @@
"noUnusedParameters": true, "noUnusedParameters": true,
"noFallthroughCasesInSwitch": true, "noFallthroughCasesInSwitch": true,
"allowSyntheticDefaultImports": true, "allowSyntheticDefaultImports": true,
/* Type checking */ /* Type checking */
"strictNullChecks": true, "strictNullChecks": true,
"files": [ "./src/**/*.d.ts"],
// "files": [ "./src/**/*.d.ts"],
"paths": { "paths": {
"@/*": ["./src/*"]
"@/*": [
"./src/*"
]
} }
}, },
"include": ["./src"],
"references": [{ "path": "./tsconfig.node.json" }]
"include": [
"./src"
],
"references": [
{
"path": "./tsconfig.node.json"
}
]
} }
Loading…
Cancel
Save