commit
d1736af6da
@ -1,9 +1,12 @@
|
|||||||
import Table from './src/Table.vue'
|
import Table from './src/Table.vue'
|
||||||
|
import { ElTable } from 'element-plus'
|
||||||
|
import { TableSetPropsType } from '@/types/table'
|
||||||
|
|
||||||
export interface TableExpose {
|
export interface TableExpose {
|
||||||
setProps: (props: Recordable) => void
|
setProps: (props: Recordable) => void
|
||||||
setColumn: (columnProps: TableSetPropsType[]) => void
|
setColumn: (columnProps: TableSetPropsType[]) => void
|
||||||
selections: Recordable[]
|
selections: Recordable[]
|
||||||
|
elTableRef: ComponentRef<typeof ElTable>
|
||||||
}
|
}
|
||||||
|
|
||||||
export { Table }
|
export { Table }
|
||||||
|
|||||||
@ -1,104 +0,0 @@
|
|||||||
import { useCache } from '@/hooks/web/useCache'
|
|
||||||
|
|
||||||
const { wsCache } = useCache()
|
|
||||||
|
|
||||||
export type LayoutType = 'classic' | 'topLeft' | 'top' | 'cutMenu'
|
|
||||||
|
|
||||||
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
|
|
||||||
}
|
|
||||||
export interface AppState {
|
|
||||||
breadcrumb: boolean
|
|
||||||
breadcrumbIcon: boolean
|
|
||||||
collapse: boolean
|
|
||||||
uniqueOpened: boolean
|
|
||||||
hamburger: boolean
|
|
||||||
screenfull: boolean
|
|
||||||
size: boolean
|
|
||||||
locale: boolean
|
|
||||||
tagsView: boolean
|
|
||||||
tagsViewIcon: boolean
|
|
||||||
logo: boolean
|
|
||||||
fixedHeader: boolean
|
|
||||||
greyMode: boolean
|
|
||||||
pageLoading: boolean
|
|
||||||
layout: LayoutType
|
|
||||||
title: string
|
|
||||||
userInfo: string
|
|
||||||
isDark: boolean
|
|
||||||
currentSize: ElememtPlusSize
|
|
||||||
sizeMap: ElememtPlusSize[]
|
|
||||||
mobile: boolean
|
|
||||||
footer: boolean
|
|
||||||
theme: ThemeTypes
|
|
||||||
}
|
|
||||||
|
|
||||||
export const appModules: AppState = {
|
|
||||||
userInfo: 'userInfo', // 登录信息存储字段-建议每个项目换一个字段,避免与其他项目冲突
|
|
||||||
sizeMap: ['default', 'large', 'small'],
|
|
||||||
mobile: false, // 是否是移动端
|
|
||||||
title: import.meta.env.VITE_APP_TITLE, // 标题
|
|
||||||
pageLoading: false, // 路由跳转loading
|
|
||||||
|
|
||||||
breadcrumb: true, // 面包屑
|
|
||||||
breadcrumbIcon: false, // 面包屑图标
|
|
||||||
collapse: false, // 折叠菜单
|
|
||||||
uniqueOpened: true, // 是否只保持一个子菜单的展开
|
|
||||||
hamburger: true, // 折叠图标
|
|
||||||
screenfull: true, // 全屏图标
|
|
||||||
size: true, // 尺寸图标
|
|
||||||
locale: true, // 多语言图标
|
|
||||||
tagsView: true, // 标签页
|
|
||||||
tagsViewIcon: false, // 是否显示标签图标
|
|
||||||
logo: true, // logo
|
|
||||||
fixedHeader: true, // 固定toolheader
|
|
||||||
footer: true, // 显示页脚
|
|
||||||
greyMode: false, // 是否开始灰色模式,用于特殊悼念日
|
|
||||||
|
|
||||||
layout: wsCache.get('layout') || 'topLeft', // layout布局
|
|
||||||
isDark: wsCache.get('isDark') || false, // 是否是暗黑模式
|
|
||||||
currentSize: wsCache.get('default') || 'default', // 组件尺寸
|
|
||||||
theme: wsCache.get('theme') || {
|
|
||||||
// 主题色
|
|
||||||
elColorPrimary: '#409eff',
|
|
||||||
// 左侧菜单边框颜色
|
|
||||||
leftMenuBorderColor: 'inherit',
|
|
||||||
// 左侧菜单背景颜色
|
|
||||||
leftMenuBgColor: '#001529',
|
|
||||||
// 左侧菜单浅色背景颜色
|
|
||||||
leftMenuBgLightColor: '#0f2438',
|
|
||||||
// 左侧菜单选中背景颜色
|
|
||||||
leftMenuBgActiveColor: 'var(--el-color-primary)',
|
|
||||||
// 左侧菜单收起选中背景颜色
|
|
||||||
leftMenuCollapseBgActiveColor: 'var(--el-color-primary)',
|
|
||||||
// 左侧菜单字体颜色
|
|
||||||
leftMenuTextColor: '#bfcbd9',
|
|
||||||
// 左侧菜单选中字体颜色
|
|
||||||
leftMenuTextActiveColor: '#fff',
|
|
||||||
// logo字体颜色
|
|
||||||
logoTitleTextColor: '#fff',
|
|
||||||
// logo边框颜色
|
|
||||||
logoBorderColor: 'inherit',
|
|
||||||
// 头部背景颜色
|
|
||||||
topHeaderBgColor: '#fff',
|
|
||||||
// 头部字体颜色
|
|
||||||
topHeaderTextColor: 'inherit',
|
|
||||||
// 头部悬停颜色
|
|
||||||
topHeaderHoverColor: '#f6f6f6',
|
|
||||||
// 头部边框颜色
|
|
||||||
topToolBorderColor: '#eee'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,32 +0,0 @@
|
|||||||
import { useCache } from '@/hooks/web/useCache'
|
|
||||||
import zhCn from 'element-plus/es/locale/lang/zh-cn'
|
|
||||||
import en from 'element-plus/es/locale/lang/en'
|
|
||||||
|
|
||||||
const { wsCache } = useCache()
|
|
||||||
|
|
||||||
export const elLocaleMap = {
|
|
||||||
'zh-CN': zhCn,
|
|
||||||
en: en
|
|
||||||
}
|
|
||||||
export interface LocaleState {
|
|
||||||
currentLocale: LocaleDropdownType
|
|
||||||
localeMap: LocaleDropdownType[]
|
|
||||||
}
|
|
||||||
|
|
||||||
export const localeModules: LocaleState = {
|
|
||||||
currentLocale: {
|
|
||||||
lang: wsCache.get('lang') || 'zh-CN',
|
|
||||||
elLocale: elLocaleMap[wsCache.get('lang') || 'zh-CN']
|
|
||||||
},
|
|
||||||
// 多语言
|
|
||||||
localeMap: [
|
|
||||||
{
|
|
||||||
lang: 'zh-CN',
|
|
||||||
name: '简体中文'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
lang: 'en',
|
|
||||||
name: 'English'
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
@ -0,0 +1,52 @@
|
|||||||
|
export type ComponentName =
|
||||||
|
| 'Radio'
|
||||||
|
| 'RadioButton'
|
||||||
|
| 'Checkbox'
|
||||||
|
| 'CheckboxButton'
|
||||||
|
| 'Input'
|
||||||
|
| 'Autocomplete'
|
||||||
|
| 'InputNumber'
|
||||||
|
| 'Select'
|
||||||
|
| 'Cascader'
|
||||||
|
| 'Switch'
|
||||||
|
| 'Slider'
|
||||||
|
| 'TimePicker'
|
||||||
|
| 'DatePicker'
|
||||||
|
| 'Rate'
|
||||||
|
| 'ColorPicker'
|
||||||
|
| 'Transfer'
|
||||||
|
| 'Divider'
|
||||||
|
| 'TimeSelect'
|
||||||
|
| 'SelectV2'
|
||||||
|
| 'InputPassword'
|
||||||
|
| 'Editor'
|
||||||
|
|
||||||
|
export type ColProps = {
|
||||||
|
span?: number
|
||||||
|
xs?: number
|
||||||
|
sm?: number
|
||||||
|
md?: number
|
||||||
|
lg?: number
|
||||||
|
xl?: number
|
||||||
|
tag?: string
|
||||||
|
}
|
||||||
|
|
||||||
|
export type ComponentOptions = {
|
||||||
|
label?: string
|
||||||
|
value?: FormValueType
|
||||||
|
disabled?: boolean
|
||||||
|
key?: string | number
|
||||||
|
children?: ComponentOptions[]
|
||||||
|
options?: ComponentOptions[]
|
||||||
|
} & Recordable
|
||||||
|
|
||||||
|
export type ComponentOptionsAlias = {
|
||||||
|
labelField?: string
|
||||||
|
valueField?: string
|
||||||
|
}
|
||||||
|
|
||||||
|
export type ComponentProps = {
|
||||||
|
optionsAlias?: ComponentOptionsAlias
|
||||||
|
options?: ComponentOptions[]
|
||||||
|
optionsSlot?: boolean
|
||||||
|
} & Recordable
|
||||||
@ -0,0 +1,4 @@
|
|||||||
|
import { ElementPlusSize } from './elementPlus'
|
||||||
|
export interface ConfigGlobalTypes {
|
||||||
|
size?: ElementPlusSize
|
||||||
|
}
|
||||||
@ -0,0 +1,7 @@
|
|||||||
|
export type contextMenuSchema = {
|
||||||
|
disabled?: boolean
|
||||||
|
divided?: boolean
|
||||||
|
icon?: string
|
||||||
|
label: string
|
||||||
|
command?: (item: contextMenuSchema) => void
|
||||||
|
}
|
||||||
@ -1,4 +1,4 @@
|
|||||||
declare interface DescriptionsSchema {
|
export interface DescriptionsSchema {
|
||||||
span?: number // 占多少分
|
span?: number // 占多少分
|
||||||
field: string // 字段名
|
field: string // 字段名
|
||||||
label?: string // label名
|
label?: string // label名
|
||||||
@ -0,0 +1,3 @@
|
|||||||
|
export type ElementPlusSize = 'default' | 'small' | 'large'
|
||||||
|
|
||||||
|
export type ElementPlusInfoType = 'success' | 'info' | 'warning' | 'danger'
|
||||||
@ -1,4 +1,4 @@
|
|||||||
declare interface IconTypes {
|
export interface IconTypes {
|
||||||
size?: number
|
size?: number
|
||||||
color?: string
|
color?: string
|
||||||
icon: string
|
icon: string
|
||||||
@ -1,4 +1,4 @@
|
|||||||
declare interface TipSchema {
|
export interface TipSchema {
|
||||||
label: string
|
label: string
|
||||||
keys?: string[]
|
keys?: string[]
|
||||||
}
|
}
|
||||||
@ -0,0 +1 @@
|
|||||||
|
export type LayoutType = 'classic' | 'topLeft' | 'top' | 'cutMenu'
|
||||||
@ -1,9 +1,9 @@
|
|||||||
declare interface Language {
|
export interface Language {
|
||||||
el: Recordable
|
el: Recordable
|
||||||
name: string
|
name: string
|
||||||
}
|
}
|
||||||
|
|
||||||
declare interface LocaleDropdownType {
|
export interface LocaleDropdownType {
|
||||||
lang: LocaleType
|
lang: LocaleType
|
||||||
name?: string
|
name?: string
|
||||||
elLocale?: Language
|
elLocale?: Language
|
||||||
@ -1,4 +1,4 @@
|
|||||||
declare interface QrcodeLogo {
|
export interface QrcodeLogo {
|
||||||
src?: string
|
src?: string
|
||||||
logoSize?: number
|
logoSize?: number
|
||||||
bgColor?: string
|
bgColor?: string
|
||||||
@ -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
|
||||||
|
}
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue