فهرست منبع

feat: types优化

hongxinzz 2 سال پیش
والد
کامیت
33511553cd

+ 1 - 0
src/components/Form/src/helper.ts

@@ -3,6 +3,7 @@ import type { Slots } from 'vue'
 import { getSlot } from '@/utils/tsxHelper'
 import { PlaceholderMoel } from './types'
 import { FormSchema } from '@/types/form'
+import { ColProps } from '@/types/components'
 
 const { t } = useI18n()
 

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

@@ -3,7 +3,7 @@ import { PropType } from 'vue'
 import { Highlight } from '@/components/Highlight'
 import { useDesign } from '@/hooks/web/useDesign'
 import { propTypes } from '@/utils/propTypes'
-import { TipSchema } from '@/types/infoTip';
+import { TipSchema } from '@/types/infoTip'
 
 const { getPrefixCls } = useDesign()
 

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

@@ -3,11 +3,11 @@ import { computed, defineComponent, unref, PropType } from 'vue'
 import { ElMenu, ElScrollbar } from 'element-plus'
 import { useAppStore } from '@/store/modules/app'
 import { usePermissionStore } from '@/store/modules/permission'
-import type { LayoutType } from '@/config/app'
 import { useRenderMenuItem } from './components/useRenderMenuItem'
 import { useRouter } from 'vue-router'
 import { isUrl } from '@/utils/is'
 import { useDesign } from '@/hooks/web/useDesign'
+import { LayoutType } from '@/types/layout'
 
 const { getPrefixCls } = useDesign()
 

+ 2 - 18
src/store/modules/app.ts

@@ -4,27 +4,11 @@ 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()
 
-type LayoutType = 'classic' | 'topLeft' | 'top' | 'cutMenu'
-
-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
-}
 interface AppState {
   breadcrumb: boolean
   breadcrumbIcon: boolean

+ 1 - 0
src/types/layout.d.ts

@@ -0,0 +1 @@
+export type LayoutType = 'classic' | 'topLeft' | 'top' | 'cutMenu'

+ 16 - 0
src/types/theme.d.ts

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