Skip to content

Commit

Permalink
feat: types优化
Browse files Browse the repository at this point in the history
  • Loading branch information
hongxinzz committed Oct 10, 2022
1 parent ef3e006 commit 3351155
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 20 deletions.
1 change: 1 addition & 0 deletions src/components/Form/src/helper.ts
Expand Up @@ -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()

Expand Down
2 changes: 1 addition & 1 deletion src/components/Infotip/src/Infotip.vue
Expand Up @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion src/components/Menu/src/Menu.vue
Expand Up @@ -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()
Expand Down
20 changes: 2 additions & 18 deletions src/store/modules/app.ts
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions src/types/layout.d.ts
@@ -0,0 +1 @@
export type LayoutType = 'classic' | 'topLeft' | 'top' | 'cutMenu'
16 changes: 16 additions & 0 deletions 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
}

0 comments on commit 3351155

Please sign in to comment.