Browse Source

修复编译

main
李金 5 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 { AntdToken, ThemeAppearance, useAntdToken, useThemeMode } from 'antd-style'
import { AntdToken, ThemeAppearance, useThemeMode } from 'antd-style'
import type { OverrideToken } from 'antd/es/theme/interface'
import type { FC, ReactNode } from 'react'
import { ThemeProvider, createProAntdTheme, getProToken } from '@/theme'
export const useProAntdTheme = (appearance: ThemeAppearance) => {
const token = useAntdToken()
// const token = useAntdToken()
const themeConfig = createProAntdTheme(appearance)
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 (
<Glass enabled={props.enabled}>
<Component {...props} />
<Component {...props as any} />
</Glass>
)
}

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

@ -25,7 +25,7 @@ const PickerPanel = () => {
<Flexbox distribution={'space-between'} horizontal align={'center'}>
<Flexbox horizontal align={'center'} gap={8}>
<IconItem {...icon as any} />
<div>{getIconName(icon)}</div>
<div>{getIconName(icon as any)}</div>
</Flexbox>
<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')({
component: Index,
})

25
tsconfig.json

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