Skip to content

Commit

Permalink
types: 调整类型
Browse files Browse the repository at this point in the history
  • Loading branch information
kailong321200875 committed Jun 26, 2023
1 parent de0cb43 commit 24c8af9
Show file tree
Hide file tree
Showing 15 changed files with 32 additions and 26 deletions.
2 changes: 2 additions & 0 deletions src/components/Icon/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import Icon from './src/Icon.vue'

export type { IconTypes } from './src/types'

export { Icon }
File renamed without changes.
2 changes: 2 additions & 0 deletions src/components/Infotip/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import Infotip from './src/Infotip.vue'

export type { InfoTipSchema } from './src/types'

export { Infotip }
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export interface TipSchema {
export interface InfoTipSchema {
label: string
keys?: string[]
}
2 changes: 2 additions & 0 deletions src/components/LocaleDropdown/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import LocaleDropdown from './src/LocaleDropdown.vue'

export type { Language, LocaleDropdownType } from './src/types'

export { LocaleDropdown }
File renamed without changes.
2 changes: 2 additions & 0 deletions src/components/Qrcode/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import Qrcode from './src/Qrcode.vue'

export type { QrcodeLogo } from './src/types'

export { Qrcode }
2 changes: 1 addition & 1 deletion src/components/Qrcode/src/Qrcode.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { cloneDeep } from 'lodash-es'
import { propTypes } from '@/utils/propTypes'
import { useDesign } from '@/hooks/web/useDesign'
import { isString } from '@/utils/is'
import { QrcodeLogo } from '@/types/qrcode'
import { QrcodeLogo } from '@/components/Qrcode'
const props = defineProps({
// img 或者 canvas,img不支持logo嵌套
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Pagination, TableColumn } from '@/types/table'

export type TableProps = {
export interface TableProps {
pageSize?: number
currentPage?: number
// 是否多选
Expand All @@ -23,4 +23,5 @@ export type TableProps = {
headerAlign?: 'left' | 'center' | 'right'
data?: Recordable
expand?: boolean
} & Recordable
[key: string]: any
}
3 changes: 1 addition & 2 deletions src/hooks/web/useIcon.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { h } from 'vue'
import type { VNode } from 'vue'
import { Icon } from '@/components/Icon'
import { IconTypes } from '@/types/icon'
import { Icon, IconTypes } from '@/components/Icon'

export const useIcon = (props: IconTypes): VNode => {
return h(Icon, props)
Expand Down
3 changes: 0 additions & 3 deletions src/store/modules/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@ import { defineStore } from 'pinia'
import { store } from '../index'
import { setCssVar, humpToUnderline } from '@/utils'
import { ElMessage } from 'element-plus'
import { ElementPlusSize } from '@/types/elementPlus'
import { useCache } from '@/hooks/web/useCache'
import { LayoutType } from '@/types/layout'
import { ThemeTypes } from '@/types/theme'

const { wsCache } = useCache()

Expand Down
2 changes: 1 addition & 1 deletion src/store/modules/locale.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { store } from '../index'
import zhCn from 'element-plus/es/locale/lang/zh-cn'
import en from 'element-plus/es/locale/lang/en'
import { useCache } from '@/hooks/web/useCache'
import { LocaleDropdownType } from '@/types/localeDropdown'
import { LocaleDropdownType } from '@/components/LocaleDropdown'

const { wsCache } = useCache()

Expand Down
16 changes: 0 additions & 16 deletions src/types/theme.ts

This file was deleted.

17 changes: 17 additions & 0 deletions types/global.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,21 @@ declare global {
code: string
data: T extends any ? T : T & any
}

declare interface ThemeTypes {
elColorPrimary?: string
leftMenuBorderColor?: string
leftMenuBgColor?: string
leftMenuBgLightColor?: string
leftMenuBgActiveColor?: string
leftMenuCollapseBgActiveColor?: string
leftMenuTextColor?: string
leftMenuTextActiveColor?: string
logoTitleTextColor?: string
logoBorderColor?: string
topHeaderBgColor?: string
topHeaderTextColor?: string
topHeaderHoverColor?: string
topToolBorderColor?: string
}
}

0 comments on commit 24c8af9

Please sign in to comment.