Quellcode durchsuchen

types: 调整类型

kailong321200875 vor 2 Jahren
Ursprung
Commit
24c8af9183

+ 2 - 0
src/components/Icon/index.ts

@@ -1,3 +1,5 @@
 import Icon from './src/Icon.vue'
 
+export type { IconTypes } from './src/types'
+
 export { Icon }

+ 0 - 0
src/types/icon.ts → src/components/Icon/src/types/index.ts


+ 2 - 0
src/components/Infotip/index.ts

@@ -1,3 +1,5 @@
 import Infotip from './src/Infotip.vue'
 
+export type { InfoTipSchema } from './src/types'
+
 export { Infotip }

+ 1 - 1
src/types/infoTip.ts → src/components/Infotip/src/types/index.ts

@@ -1,4 +1,4 @@
-export interface TipSchema {
+export interface InfoTipSchema {
   label: string
   keys?: string[]
 }

+ 2 - 0
src/components/LocaleDropdown/index.ts

@@ -1,3 +1,5 @@
 import LocaleDropdown from './src/LocaleDropdown.vue'
 
+export type { Language, LocaleDropdownType } from './src/types'
+
 export { LocaleDropdown }

+ 0 - 0
src/types/localeDropdown.ts → src/components/LocaleDropdown/src/types/index.ts


+ 2 - 0
src/components/Qrcode/index.ts

@@ -1,3 +1,5 @@
 import Qrcode from './src/Qrcode.vue'
 
+export type { QrcodeLogo } from './src/types'
+
 export { Qrcode }

+ 1 - 1
src/components/Qrcode/src/Qrcode.vue

@@ -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嵌套

+ 0 - 0
src/types/qrcode.ts → src/components/Qrcode/src/types/index.ts


+ 3 - 2
src/components/Table/src/types.ts → src/components/Table/src/types/index.ts

@@ -1,6 +1,6 @@
 import { Pagination, TableColumn } from '@/types/table'
 
-export type TableProps = {
+export interface TableProps {
   pageSize?: number
   currentPage?: number
   // 是否多选
@@ -23,4 +23,5 @@ export type TableProps = {
   headerAlign?: 'left' | 'center' | 'right'
   data?: Recordable
   expand?: boolean
-} & Recordable
+  [key: string]: any
+}

+ 1 - 2
src/hooks/web/useIcon.ts

@@ -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)

+ 0 - 3
src/store/modules/app.ts

@@ -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()
 

+ 1 - 1
src/store/modules/locale.ts

@@ -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()
 

+ 0 - 16
src/types/theme.ts

@@ -1,16 +0,0 @@
-export type 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
-}

+ 17 - 0
types/global.d.ts

@@ -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
+  }
 }