@mc-markets/ui 1.0.34 → 1.0.37
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +0 -614
- package/dist/{packages/index.d.ts → index.d.ts} +2 -1
- package/dist/index.js +4 -3
- package/dist/node_modules/@babel/parser/typings/babel-parser.d.ts +235 -0
- package/dist/node_modules/@babel/types/lib/index.d.ts +3308 -0
- package/dist/node_modules/@ctrl/tinycolor/dist/conversion.d.ts +61 -0
- package/dist/node_modules/@ctrl/tinycolor/dist/css-color-names.d.ts +4 -0
- package/dist/node_modules/@ctrl/tinycolor/dist/format-input.d.ts +37 -0
- package/dist/node_modules/@ctrl/tinycolor/dist/from-ratio.d.ts +14 -0
- package/dist/node_modules/@ctrl/tinycolor/dist/index.d.ts +207 -0
- package/dist/node_modules/@ctrl/tinycolor/dist/interfaces.d.ts +46 -0
- package/dist/node_modules/@ctrl/tinycolor/dist/public_api.d.ts +11 -0
- package/dist/node_modules/@ctrl/tinycolor/dist/random.d.ts +24 -0
- package/dist/node_modules/@ctrl/tinycolor/dist/readability.d.ts +46 -0
- package/dist/node_modules/@ctrl/tinycolor/dist/to-ms-filter.d.ts +5 -0
- package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.d.mts +514 -0
- package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.d.mts +327 -0
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.d.mts +103 -0
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.d.mts +47 -0
- package/dist/node_modules/@types/lodash/common/array.d.ts +2137 -0
- package/dist/node_modules/@types/lodash/common/collection.d.ts +1938 -0
- package/dist/node_modules/@types/lodash/common/common.d.ts +287 -0
- package/dist/node_modules/@types/lodash/common/date.d.ts +23 -0
- package/dist/node_modules/@types/lodash/common/function.d.ts +1455 -0
- package/dist/node_modules/@types/lodash/common/lang.d.ts +1700 -0
- package/dist/node_modules/@types/lodash/common/math.d.ts +405 -0
- package/dist/node_modules/@types/lodash/common/number.d.ts +131 -0
- package/dist/node_modules/@types/lodash/common/object.d.ts +2643 -0
- package/dist/node_modules/@types/lodash/common/seq.d.ts +210 -0
- package/dist/node_modules/@types/lodash/common/string.d.ts +788 -0
- package/dist/node_modules/@types/lodash/common/util.d.ts +1220 -0
- package/dist/node_modules/@types/lodash/index.d.ts +21 -0
- package/dist/node_modules/@vue/compiler-core/dist/compiler-core.d.ts +1093 -0
- package/dist/node_modules/@vue/compiler-dom/dist/compiler-dom.d.ts +45 -0
- package/dist/node_modules/@vue/reactivity/dist/reactivity.d.ts +756 -0
- package/dist/node_modules/@vue/runtime-core/dist/runtime-core.d.ts +1839 -0
- package/dist/node_modules/@vue/runtime-dom/dist/runtime-dom.d.ts +1397 -0
- package/dist/node_modules/@vue/shared/dist/shared.d.ts +335 -0
- package/dist/node_modules/@vueuse/core/index.d.ts +4536 -0
- package/dist/node_modules/@vueuse/core/node_modules/vue-demi/lib/index.d.ts +22 -0
- package/dist/node_modules/@vueuse/shared/index.d.ts +1072 -0
- package/dist/node_modules/@vueuse/shared/node_modules/vue-demi/lib/index.d.ts +22 -0
- package/dist/node_modules/async-validator/dist-types/index.d.ts +43 -0
- package/dist/node_modules/async-validator/dist-types/interface.d.ts +135 -0
- package/dist/node_modules/csstype/index.d.ts +21297 -0
- package/dist/node_modules/dayjs/index.d.ts +429 -0
- package/dist/node_modules/dayjs/locale/index.d.ts +11 -0
- package/dist/node_modules/dayjs/locale/types.d.ts +33 -0
- package/dist/node_modules/element-plus/es/index.d.ts +26960 -0
- package/dist/node_modules/element-plus/es/utils/vue3.3.polyfill.d.ts +34 -0
- package/dist/node_modules/memoize-one/dist/memoize-one.d.ts +7 -0
- package/dist/node_modules/vue/dist/vue.d.mts +7 -0
- package/dist/style.css +1 -1
- package/dist/{packages/styles → styles}/theme-config.d.ts +0 -2
- package/dist/types/auto-imports.d.ts +84 -0
- package/dist/types/components.d.ts +55 -0
- package/package.json +5 -2
- package/packages/styles/element/form.scss +27 -0
- package/packages/styles/index.scss +5 -4
- package/packages/styles/theme-config.ts +0 -24
- package/packages/styles/variables.scss +130 -137
- package/USAGE.md +0 -383
- package/dist/src/main.d.ts +0 -0
- package/dist/src/utils/theme.d.ts +0 -66
- package/dist/vite.config.d.ts +0 -2
- /package/dist/{packages/components → components}/Alert/Alert.vue.d.ts +0 -0
- /package/dist/{packages/components → components}/Alert/index.d.ts +0 -0
- /package/dist/{packages/components → components}/Banner/Banner.vue.d.ts +0 -0
- /package/dist/{packages/components → components}/Banner/index.d.ts +0 -0
- /package/dist/{packages/components → components}/DatePicker/DatePicker.vue.d.ts +0 -0
- /package/dist/{packages/components → components}/DatePicker/index.d.ts +0 -0
- /package/dist/{packages/components → components}/Dialog/index.vue.d.ts +0 -0
- /package/dist/{packages/components → components}/Empty/Empty.vue.d.ts +0 -0
- /package/dist/{packages/components → components}/Empty/index.d.ts +0 -0
- /package/dist/{packages/components → components}/Icon/index.d.ts +0 -0
- /package/dist/{packages/components → components}/Icon/types.d.ts +0 -0
- /package/dist/{packages/components → components}/Notification/Notification.vue.d.ts +0 -0
- /package/dist/{packages/components → components}/Notification/index.d.ts +0 -0
- /package/dist/{packages/components → components}/Pagination/Pagination.vue.d.ts +0 -0
- /package/dist/{packages/components → components}/Pagination/index.d.ts +0 -0
- /package/dist/{packages/components → components}/Tab/Tab.vue.d.ts +0 -0
- /package/dist/{packages/components → components}/Tab/TabPane.vue.d.ts +0 -0
- /package/dist/{packages/components → components}/Tooltips/Tooltips.vue.d.ts +0 -0
- /package/dist/{packages/components → components}/Tooltips/index.d.ts +0 -0
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
/* prettier-ignore */
|
|
3
|
+
// @ts-nocheck
|
|
4
|
+
// Generated by unplugin-auto-import
|
|
5
|
+
export {}
|
|
6
|
+
declare global {
|
|
7
|
+
const EffectScope: typeof import('vue')['EffectScope']
|
|
8
|
+
const acceptHMRUpdate: typeof import('pinia')['acceptHMRUpdate']
|
|
9
|
+
const computed: typeof import('vue')['computed']
|
|
10
|
+
const createApp: typeof import('vue')['createApp']
|
|
11
|
+
const createPinia: typeof import('pinia')['createPinia']
|
|
12
|
+
const customRef: typeof import('vue')['customRef']
|
|
13
|
+
const defineAsyncComponent: typeof import('vue')['defineAsyncComponent']
|
|
14
|
+
const defineComponent: typeof import('vue')['defineComponent']
|
|
15
|
+
const defineStore: typeof import('pinia')['defineStore']
|
|
16
|
+
const effectScope: typeof import('vue')['effectScope']
|
|
17
|
+
const getActivePinia: typeof import('pinia')['getActivePinia']
|
|
18
|
+
const getCurrentInstance: typeof import('vue')['getCurrentInstance']
|
|
19
|
+
const getCurrentScope: typeof import('vue')['getCurrentScope']
|
|
20
|
+
const h: typeof import('vue')['h']
|
|
21
|
+
const inject: typeof import('vue')['inject']
|
|
22
|
+
const isProxy: typeof import('vue')['isProxy']
|
|
23
|
+
const isReactive: typeof import('vue')['isReactive']
|
|
24
|
+
const isReadonly: typeof import('vue')['isReadonly']
|
|
25
|
+
const isRef: typeof import('vue')['isRef']
|
|
26
|
+
const mapActions: typeof import('pinia')['mapActions']
|
|
27
|
+
const mapGetters: typeof import('pinia')['mapGetters']
|
|
28
|
+
const mapState: typeof import('pinia')['mapState']
|
|
29
|
+
const mapStores: typeof import('pinia')['mapStores']
|
|
30
|
+
const mapWritableState: typeof import('pinia')['mapWritableState']
|
|
31
|
+
const markRaw: typeof import('vue')['markRaw']
|
|
32
|
+
const nextTick: typeof import('vue')['nextTick']
|
|
33
|
+
const onActivated: typeof import('vue')['onActivated']
|
|
34
|
+
const onBeforeMount: typeof import('vue')['onBeforeMount']
|
|
35
|
+
const onBeforeRouteLeave: typeof import('vue-router')['onBeforeRouteLeave']
|
|
36
|
+
const onBeforeRouteUpdate: typeof import('vue-router')['onBeforeRouteUpdate']
|
|
37
|
+
const onBeforeUnmount: typeof import('vue')['onBeforeUnmount']
|
|
38
|
+
const onBeforeUpdate: typeof import('vue')['onBeforeUpdate']
|
|
39
|
+
const onDeactivated: typeof import('vue')['onDeactivated']
|
|
40
|
+
const onErrorCaptured: typeof import('vue')['onErrorCaptured']
|
|
41
|
+
const onMounted: typeof import('vue')['onMounted']
|
|
42
|
+
const onRenderTracked: typeof import('vue')['onRenderTracked']
|
|
43
|
+
const onRenderTriggered: typeof import('vue')['onRenderTriggered']
|
|
44
|
+
const onScopeDispose: typeof import('vue')['onScopeDispose']
|
|
45
|
+
const onServerPrefetch: typeof import('vue')['onServerPrefetch']
|
|
46
|
+
const onUnmounted: typeof import('vue')['onUnmounted']
|
|
47
|
+
const onUpdated: typeof import('vue')['onUpdated']
|
|
48
|
+
const provide: typeof import('vue')['provide']
|
|
49
|
+
const reactive: typeof import('vue')['reactive']
|
|
50
|
+
const readonly: typeof import('vue')['readonly']
|
|
51
|
+
const ref: typeof import('vue')['ref']
|
|
52
|
+
const resolveComponent: typeof import('vue')['resolveComponent']
|
|
53
|
+
const setActivePinia: typeof import('pinia')['setActivePinia']
|
|
54
|
+
const setMapStoreSuffix: typeof import('pinia')['setMapStoreSuffix']
|
|
55
|
+
const shallowReactive: typeof import('vue')['shallowReactive']
|
|
56
|
+
const shallowReadonly: typeof import('vue')['shallowReadonly']
|
|
57
|
+
const shallowRef: typeof import('vue')['shallowRef']
|
|
58
|
+
const storeToRefs: typeof import('pinia')['storeToRefs']
|
|
59
|
+
const toRaw: typeof import('vue')['toRaw']
|
|
60
|
+
const toRef: typeof import('vue')['toRef']
|
|
61
|
+
const toRefs: typeof import('vue')['toRefs']
|
|
62
|
+
const triggerRef: typeof import('vue')['triggerRef']
|
|
63
|
+
const unref: typeof import('vue')['unref']
|
|
64
|
+
const useAttrs: typeof import('vue')['useAttrs']
|
|
65
|
+
const useAuth: typeof import('../utils/composables/useAuth')['default']
|
|
66
|
+
const useCssModule: typeof import('vue')['useCssModule']
|
|
67
|
+
const useCssVars: typeof import('vue')['useCssVars']
|
|
68
|
+
const useGlobalProperties: typeof import('../utils/composables/useGlobalProperties')['default']
|
|
69
|
+
const useLink: typeof import('vue-router')['useLink']
|
|
70
|
+
const useMainPage: typeof import('../utils/composables/useMainPage')['default']
|
|
71
|
+
const useMenu: typeof import('../utils/composables/useMenu')['default']
|
|
72
|
+
const useRoute: typeof import('vue-router')['useRoute']
|
|
73
|
+
const useRouter: typeof import('vue-router')['useRouter']
|
|
74
|
+
const useSlots: typeof import('vue')['useSlots']
|
|
75
|
+
const watch: typeof import('vue')['watch']
|
|
76
|
+
const watchEffect: typeof import('vue')['watchEffect']
|
|
77
|
+
const watchPostEffect: typeof import('vue')['watchPostEffect']
|
|
78
|
+
const watchSyncEffect: typeof import('vue')['watchSyncEffect']
|
|
79
|
+
}
|
|
80
|
+
// for type re-export
|
|
81
|
+
declare global {
|
|
82
|
+
// @ts-ignore
|
|
83
|
+
export type { Component, ComponentPublicInstance, ComputedRef, InjectionKey, PropType, Ref, VNode } from 'vue'
|
|
84
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
export {}
|
|
4
|
+
|
|
5
|
+
declare module '@vue/runtime-core' {
|
|
6
|
+
export interface GlobalComponents {
|
|
7
|
+
CForm: typeof import('./../components/CForm/index.vue')['default']
|
|
8
|
+
ColSetting: typeof import('./../components/proTable/components/ColSetting.vue')['default']
|
|
9
|
+
proTable: typeof import('./../components/proTable/index.vue')['default']
|
|
10
|
+
Dialog: typeof import('./../components/Dialog/index.vue')['default']
|
|
11
|
+
ElBacktop: typeof import('element-plus/es')['ElBacktop']
|
|
12
|
+
ElBreadcrumb: typeof import('element-plus/es')['ElBreadcrumb']
|
|
13
|
+
ElBreadcrumbItem: typeof import('element-plus/es')['ElBreadcrumbItem']
|
|
14
|
+
ElButton: typeof import('element-plus/es')['ElButton']
|
|
15
|
+
ElConfigProvider: typeof import('element-plus/es')['ElConfigProvider']
|
|
16
|
+
ElDescriptions: typeof import('element-plus/es')['ElDescriptions']
|
|
17
|
+
ElDescriptionsItem: typeof import('element-plus/es')['ElDescriptionsItem']
|
|
18
|
+
ElDialog: typeof import('element-plus/es')['ElDialog']
|
|
19
|
+
ElDrawer: typeof import('element-plus/es')['ElDrawer']
|
|
20
|
+
ElDropdown: typeof import('element-plus/es')['ElDropdown']
|
|
21
|
+
ElDropdownItem: typeof import('element-plus/es')['ElDropdownItem']
|
|
22
|
+
ElDropdownMenu: typeof import('element-plus/es')['ElDropdownMenu']
|
|
23
|
+
ElEmpty: typeof import('element-plus/es')['ElEmpty']
|
|
24
|
+
ElForm: typeof import('element-plus/es')['ElForm']
|
|
25
|
+
ElFormItem: typeof import('element-plus/es')['ElFormItem']
|
|
26
|
+
ElIcon: typeof import('element-plus/es')['ElIcon']
|
|
27
|
+
ElImage: typeof import('element-plus/es')['ElImage']
|
|
28
|
+
ElInput: typeof import('element-plus/es')['ElInput']
|
|
29
|
+
ElMenu: typeof import('element-plus/es')['ElMenu']
|
|
30
|
+
ElMenuItem: typeof import('element-plus/es')['ElMenuItem']
|
|
31
|
+
ElPagination: typeof import('element-plus/es')['ElPagination']
|
|
32
|
+
ElSubMenu: typeof import('element-plus/es')['ElSubMenu']
|
|
33
|
+
ElSwitch: typeof import('element-plus/es')['ElSwitch']
|
|
34
|
+
ElTable: typeof import('element-plus/es')['ElTable']
|
|
35
|
+
ElTableColumn: typeof import('element-plus/es')['ElTableColumn']
|
|
36
|
+
ElTag: typeof import('element-plus/es')['ElTag']
|
|
37
|
+
ElTreeSelect: typeof import('element-plus/es')['ElTreeSelect']
|
|
38
|
+
ElUpload: typeof import('element-plus/es')['ElUpload']
|
|
39
|
+
Grid: typeof import('./../components/Grid/index.vue')['default']
|
|
40
|
+
GridItem: typeof import('./../components/Grid/components/GridItem.vue')['default']
|
|
41
|
+
NotAllowed: typeof import('./../components/NotAllowed/index.vue')['default']
|
|
42
|
+
PageHeader: typeof import('./../components/PageHeader/index.vue')['default']
|
|
43
|
+
PageMain: typeof import('./../components/PageMain/index.vue')['default']
|
|
44
|
+
Pagination: typeof import('./../components/proTable/components/Pagination.vue')['default']
|
|
45
|
+
PermissionConfig: typeof import('./../components/permissionConfig/index.vue')['default']
|
|
46
|
+
RouterLink: typeof import('vue-router')['RouterLink']
|
|
47
|
+
RouterView: typeof import('vue-router')['RouterView']
|
|
48
|
+
SearchBar: typeof import('./../components/SearchBar/index.vue')['default']
|
|
49
|
+
SearchForm: typeof import('./../components/SearchForm/index.vue')['default']
|
|
50
|
+
SearchFormItem: typeof import('./../components/SearchForm/components/SearchFormItem.vue')['default']
|
|
51
|
+
SvgIcon: typeof import('./../components/SvgIcon/index.vue')['default']
|
|
52
|
+
TableColumn: typeof import('./../components/proTable/components/TableColumn.vue')['default']
|
|
53
|
+
Upload: typeof import('./../components/upload/upload.vue')['default']
|
|
54
|
+
}
|
|
55
|
+
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mc-markets/ui",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.37",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"author": "chenyu",
|
|
7
7
|
"description": "Element Plus 完整导出包,提供所有组件、指令和服务",
|
|
@@ -50,6 +50,8 @@
|
|
|
50
50
|
"license": "MIT",
|
|
51
51
|
"scripts": {
|
|
52
52
|
"dev": "vite",
|
|
53
|
+
"dev:fast": "cross-env NODE_ENV=development vite --force",
|
|
54
|
+
"dev:inspector": "cross-env VUE_INSPECTOR=true vite",
|
|
53
55
|
"build": "tsc && vite build",
|
|
54
56
|
"preview": "vite preview",
|
|
55
57
|
"type-check": "vue-tsc --noEmit",
|
|
@@ -100,6 +102,7 @@
|
|
|
100
102
|
"@vitejs/plugin-vue-jsx": "^3.0.1",
|
|
101
103
|
"autoprefixer": "^10.4.14",
|
|
102
104
|
"bumpp": "^9.1.0",
|
|
105
|
+
"cross-env": "^7.0.3",
|
|
103
106
|
"cz-conventional-changelog": "^3.3.0",
|
|
104
107
|
"cz-git": "^1.6.1",
|
|
105
108
|
"eslint": "^8.38.0",
|
|
@@ -112,7 +115,7 @@
|
|
|
112
115
|
"plop": "^3.1.2",
|
|
113
116
|
"postcss-html": "^1.5.0",
|
|
114
117
|
"prettier": "^2.8.8",
|
|
115
|
-
"sass": "^1.
|
|
118
|
+
"sass": "^1.77.0",
|
|
116
119
|
"simple-git-hooks": "^2.8.1",
|
|
117
120
|
"sortablejs": "^1.15.0",
|
|
118
121
|
"stylelint": "^15.4.0",
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
.el-input {
|
|
2
|
+
--el-input-text-color: var(--text-white);
|
|
3
|
+
--el-input-border: var(--el-border);
|
|
4
|
+
--el-input-hover-border: var(--el-border-color-hover);
|
|
5
|
+
--el-input-focus-border: var(--el-color-primary);
|
|
6
|
+
--el-input-transparent-border: 0 0 0 1px transparent inset;
|
|
7
|
+
--el-input-border-color: var(--el-border-color);
|
|
8
|
+
--el-input-border-radius: var(--el-border-radius-base);
|
|
9
|
+
--el-input-bg-color: var(--el-fill-color-blank);
|
|
10
|
+
--el-input-icon-color: var(--el-text-color-placeholder);
|
|
11
|
+
--el-input-placeholder-color: var(--el-text-color-placeholder);
|
|
12
|
+
--el-input-hover-border-color: var(--el-border-color-hover);
|
|
13
|
+
--el-input-clear-hover-color: var(--el-text-color-secondary);
|
|
14
|
+
--el-input-focus-border-color: var(--el-color-primary);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.el-form-item__label {
|
|
18
|
+
height: var(--el-component-size);
|
|
19
|
+
line-height: var(--el-component-size);
|
|
20
|
+
color: var(--text-primary);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.el-form-item--label-top {
|
|
24
|
+
.el-form-item__label {
|
|
25
|
+
line-height: 20px;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
@@ -8,9 +8,10 @@
|
|
|
8
8
|
* - 图标字体
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
|
-
//
|
|
11
|
+
// 导入 Element Plus 主题定制(包含所有 CSS 变量)
|
|
12
12
|
@use './variables.scss';
|
|
13
|
-
|
|
14
|
-
// 导入自定义组件样式
|
|
15
13
|
@use './element/button.scss';
|
|
16
|
-
@use './
|
|
14
|
+
@use './element/form.scss';
|
|
15
|
+
|
|
16
|
+
// 导入 Element Plus 基础样式
|
|
17
|
+
// @import 'element-plus/dist/index.css';
|
|
@@ -115,21 +115,6 @@ export class ThemeConfigManager {
|
|
|
115
115
|
root.style.setProperty(`--el-color-${type}-light-8`, lightColors[8])
|
|
116
116
|
root.style.setProperty(`--el-color-${type}-light-9`, lightColors[9])
|
|
117
117
|
root.style.setProperty(`--el-color-${type}-dark-2`, darkColors[2])
|
|
118
|
-
|
|
119
|
-
// 同时更新暗色主题变量
|
|
120
|
-
if (this.currentTheme.dark) {
|
|
121
|
-
const darkBaseColor = this.darkenColor(baseColor, 0.1)
|
|
122
|
-
const darkLightColors = this.generateLightColors(darkBaseColor)
|
|
123
|
-
const darkDarkColors = this.generateDarkColors(darkBaseColor)
|
|
124
|
-
|
|
125
|
-
root.style.setProperty(`--el-color-${type}`, this.rgbToHex(darkBaseColor.r, darkBaseColor.g, darkBaseColor.b))
|
|
126
|
-
root.style.setProperty(`--el-color-${type}-light-3`, darkLightColors[3])
|
|
127
|
-
root.style.setProperty(`--el-color-${type}-light-5`, darkLightColors[5])
|
|
128
|
-
root.style.setProperty(`--el-color-${type}-light-7`, darkLightColors[7])
|
|
129
|
-
root.style.setProperty(`--el-color-${type}-light-8`, darkLightColors[8])
|
|
130
|
-
root.style.setProperty(`--el-color-${type}-light-9`, darkLightColors[9])
|
|
131
|
-
root.style.setProperty(`--el-color-${type}-dark-2`, darkDarkColors[2])
|
|
132
|
-
}
|
|
133
118
|
}
|
|
134
119
|
|
|
135
120
|
/** 应用主题 */
|
|
@@ -218,15 +203,6 @@ export class ThemeConfigManager {
|
|
|
218
203
|
return colors
|
|
219
204
|
}
|
|
220
205
|
|
|
221
|
-
/** 使颜色变暗 */
|
|
222
|
-
private darkenColor(rgb: { r: number; g: number; b: number }, factor: number): { r: number; g: number; b: number } {
|
|
223
|
-
return {
|
|
224
|
-
r: Math.round(rgb.r * (1 - factor)),
|
|
225
|
-
g: Math.round(rgb.g * (1 - factor)),
|
|
226
|
-
b: Math.round(rgb.b * (1 - factor))
|
|
227
|
-
}
|
|
228
|
-
}
|
|
229
|
-
|
|
230
206
|
/** 重置主题 */
|
|
231
207
|
resetTheme(): void {
|
|
232
208
|
const root = document.documentElement
|
|
@@ -6,6 +6,66 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
// 导入所有 Element Plus 样式
|
|
9
|
+
// 自定义 Element Plus 变量
|
|
10
|
+
@forward 'element-plus/theme-chalk/src/common/var.scss' with (
|
|
11
|
+
// 自定义颜色变量
|
|
12
|
+
$colors: (
|
|
13
|
+
'primary': (
|
|
14
|
+
'base': red,
|
|
15
|
+
),
|
|
16
|
+
'success': (
|
|
17
|
+
'base': #34A88B ,
|
|
18
|
+
),
|
|
19
|
+
'warning': (
|
|
20
|
+
'base': #FFA61F,
|
|
21
|
+
),
|
|
22
|
+
'danger': (
|
|
23
|
+
'base': #f14654,
|
|
24
|
+
),
|
|
25
|
+
'info': (
|
|
26
|
+
'base': #585660,
|
|
27
|
+
),
|
|
28
|
+
),
|
|
29
|
+
// 自定义字体大小
|
|
30
|
+
$font-size: (
|
|
31
|
+
'extra-large': 20px,
|
|
32
|
+
'large': 18px,
|
|
33
|
+
'medium': 16px,
|
|
34
|
+
'base': 14px,
|
|
35
|
+
'small': 12px,
|
|
36
|
+
'extra-small': 10px,
|
|
37
|
+
),
|
|
38
|
+
// 自定义圆角
|
|
39
|
+
$border-radius: (
|
|
40
|
+
'base': 8px,
|
|
41
|
+
'small': 4px,
|
|
42
|
+
'round': 20px,
|
|
43
|
+
'circle': 100%,
|
|
44
|
+
),
|
|
45
|
+
|
|
46
|
+
// 自定义阴影
|
|
47
|
+
$box-shadow: (
|
|
48
|
+
'base': (
|
|
49
|
+
0 2px 4px rgba(0, 0, 0, 0.12),
|
|
50
|
+
0 0 6px rgba(0, 0, 0, 0.04)
|
|
51
|
+
),
|
|
52
|
+
'light': (
|
|
53
|
+
0 2px 12px 0 rgba(0, 0, 0, 0.1)
|
|
54
|
+
),
|
|
55
|
+
'lighter': (
|
|
56
|
+
0 2px 12px 0 rgba(0, 0, 0, 0.06)
|
|
57
|
+
),
|
|
58
|
+
'dark': (
|
|
59
|
+
0 2px 4px rgba(0, 0, 0, 0.12),
|
|
60
|
+
0 0 6px rgba(0, 0, 0, 0.12)
|
|
61
|
+
),
|
|
62
|
+
),
|
|
63
|
+
$common-component-size: (
|
|
64
|
+
'large': 40px,
|
|
65
|
+
'default': 48px,
|
|
66
|
+
'small': 24px,
|
|
67
|
+
)
|
|
68
|
+
);
|
|
9
69
|
@use "element-plus/theme-chalk/src/index.scss" as *;
|
|
10
70
|
@use 'element-plus/theme-chalk/src/dark/css-vars.scss';
|
|
11
71
|
|
|
@@ -17,148 +77,81 @@
|
|
|
17
77
|
@use './variables/spacing-mode.css';
|
|
18
78
|
@use './variables/typography-desktop.css';
|
|
19
79
|
|
|
20
|
-
// 生成CSS变量
|
|
21
|
-
:root
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
--el-color-success-light-7: #9DD6C4;
|
|
36
|
-
--el-color-success-light-8: #B3E0D2;
|
|
37
|
-
--el-color-success-light-9: #D9F0E8;
|
|
38
|
-
--el-color-success-dark-2: #2A8A73;
|
|
39
|
-
|
|
40
|
-
// 警告色
|
|
41
|
-
--el-color-warning: #FFA61F;
|
|
42
|
-
--el-color-warning-light-3: #FFB84D;
|
|
43
|
-
--el-color-warning-light-5: #FFC973;
|
|
44
|
-
--el-color-warning-light-7: #FFD999;
|
|
45
|
-
--el-color-warning-light-8: #FFE2B3;
|
|
46
|
-
--el-color-warning-light-9: #FFF0D9;
|
|
47
|
-
--el-color-warning-dark-2: #E6940C;
|
|
80
|
+
// // 生成CSS变量
|
|
81
|
+
// :root{
|
|
82
|
+
// --el-component-size-large: 40px;
|
|
83
|
+
// --el-component-size: 48px;
|
|
84
|
+
// --el-component-size-small: 24px;
|
|
85
|
+
// }
|
|
86
|
+
// :root.dark {
|
|
87
|
+
// // 主色调
|
|
88
|
+
// --el-color-primary: #FFD905;
|
|
89
|
+
// --el-color-primary-light-3: #FFE855;
|
|
90
|
+
// --el-color-primary-light-5: #FFED7A;
|
|
91
|
+
// --el-color-primary-light-7: #FFF2A0;
|
|
92
|
+
// --el-color-primary-light-8: #FFF5B3;
|
|
93
|
+
// --el-color-primary-light-9: #FFF9D9;
|
|
94
|
+
// --el-color-primary-dark-2: #E6C300;
|
|
48
95
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
96
|
+
// // 成功色
|
|
97
|
+
// --el-color-success: #34A88B;
|
|
98
|
+
// --el-color-success-light-3: #5BB89E;
|
|
99
|
+
// --el-color-success-light-5: #7CC7B1;
|
|
100
|
+
// --el-color-success-light-7: #9DD6C4;
|
|
101
|
+
// --el-color-success-light-8: #B3E0D2;
|
|
102
|
+
// --el-color-success-light-9: #D9F0E8;
|
|
103
|
+
// --el-color-success-dark-2: #2A8A73;
|
|
57
104
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
105
|
+
// // 警告色
|
|
106
|
+
// --el-color-warning: #FFA61F;
|
|
107
|
+
// --el-color-warning-light-3: #FFB84D;
|
|
108
|
+
// --el-color-warning-light-5: #FFC973;
|
|
109
|
+
// --el-color-warning-light-7: #FFD999;
|
|
110
|
+
// --el-color-warning-light-8: #FFE2B3;
|
|
111
|
+
// --el-color-warning-light-9: #FFF0D9;
|
|
112
|
+
// --el-color-warning-dark-2: #E6940C;
|
|
66
113
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
114
|
+
// // 危险色
|
|
115
|
+
// --el-color-danger: #f14654;
|
|
116
|
+
// --el-color-danger-light-3: #F46B77;
|
|
117
|
+
// --el-color-danger-light-5: #F78A94;
|
|
118
|
+
// --el-color-danger-light-7: #FAA9B1;
|
|
119
|
+
// --el-color-danger-light-8: #FBC2C8;
|
|
120
|
+
// --el-color-danger-light-9: #FDE0E3;
|
|
121
|
+
// --el-color-danger-dark-2: #D63A47;
|
|
74
122
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
123
|
+
// // 信息色
|
|
124
|
+
// --el-color-info: #585660;
|
|
125
|
+
// --el-color-info-light-3: #7A7A82;
|
|
126
|
+
// --el-color-info-light-5: #96969C;
|
|
127
|
+
// --el-color-info-light-7: #B2B2B6;
|
|
128
|
+
// --el-color-info-light-8: #C6C6C9;
|
|
129
|
+
// --el-color-info-light-9: #E0E0E2;
|
|
130
|
+
// --el-color-info-dark-2: #46464E;
|
|
80
131
|
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
132
|
+
// // 字体大小
|
|
133
|
+
// --el-font-size-extra-large: 20px;
|
|
134
|
+
// --el-font-size-large: 18px;
|
|
135
|
+
// --el-font-size-medium: 16px;
|
|
136
|
+
// --el-font-size-base: 14px;
|
|
137
|
+
// --el-font-size-small: 12px;
|
|
138
|
+
// --el-font-size-extra-small: 10px;
|
|
85
139
|
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
140
|
+
// // 圆角
|
|
141
|
+
// --el-border-radius-base: 8px;
|
|
142
|
+
// --el-border-radius-small: 4px;
|
|
143
|
+
// --el-border-radius-round: 20px;
|
|
144
|
+
// --el-border-radius-circle: 100%;
|
|
90
145
|
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
--el-transition-fade-linear: opacity 0.2s linear;
|
|
96
|
-
--el-transition-border: border-color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);
|
|
97
|
-
--el-transition-box-shadow: box-shadow 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);
|
|
98
|
-
--el-transition-color: color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);
|
|
99
|
-
}
|
|
146
|
+
// // 间距
|
|
147
|
+
// --el-spacing-base: 16px;
|
|
148
|
+
// --el-spacing-small: 8px;
|
|
149
|
+
// --el-spacing-large: 24px;
|
|
100
150
|
|
|
101
|
-
//
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
--el-color-primary-light-8: #B28300;
|
|
109
|
-
--el-color-primary-light-9: #A57300;
|
|
110
|
-
--el-color-primary-dark-2: #CCB300;
|
|
111
|
-
|
|
112
|
-
--el-color-success: #2A8A73;
|
|
113
|
-
--el-color-success-light-3: #267A66;
|
|
114
|
-
--el-color-success-light-5: #226A59;
|
|
115
|
-
--el-color-success-light-7: #1E5A4C;
|
|
116
|
-
--el-color-success-light-8: #1A4A3F;
|
|
117
|
-
--el-color-success-light-9: #163A32;
|
|
118
|
-
--el-color-success-dark-2: #247A66;
|
|
119
|
-
|
|
120
|
-
--el-color-warning: #E6940C;
|
|
121
|
-
--el-color-warning-light-3: #D1840B;
|
|
122
|
-
--el-color-warning-light-5: #BC740A;
|
|
123
|
-
--el-color-warning-light-7: #A76409;
|
|
124
|
-
--el-color-warning-light-8: #925408;
|
|
125
|
-
--el-color-warning-light-9: #7D4407;
|
|
126
|
-
--el-color-warning-dark-2: #D1840B;
|
|
127
|
-
|
|
128
|
-
--el-color-danger: #D63A47;
|
|
129
|
-
--el-color-danger-light-3: #C1333F;
|
|
130
|
-
--el-color-danger-light-5: #AC2C37;
|
|
131
|
-
--el-color-danger-light-7: #97252F;
|
|
132
|
-
--el-color-danger-light-8: #821E27;
|
|
133
|
-
--el-color-danger-light-9: #6D171F;
|
|
134
|
-
--el-color-danger-dark-2: #C1333F;
|
|
135
|
-
|
|
136
|
-
--el-color-info: #46464E;
|
|
137
|
-
--el-color-info-light-3: #3F3F46;
|
|
138
|
-
--el-color-info-light-5: #38383E;
|
|
139
|
-
--el-color-info-light-7: #313136;
|
|
140
|
-
--el-color-info-light-8: #2A2A2E;
|
|
141
|
-
--el-color-info-light-9: #232326;
|
|
142
|
-
--el-color-info-dark-2: #3F3F46;
|
|
143
|
-
|
|
144
|
-
// 暗色主题特殊变量
|
|
145
|
-
--el-bg-color: #141414;
|
|
146
|
-
--el-bg-color-page: #0a0a0a;
|
|
147
|
-
--el-text-color-primary: #e5eaf3;
|
|
148
|
-
--el-text-color-regular: #cfd3dc;
|
|
149
|
-
--el-text-color-secondary: #a3a6ad;
|
|
150
|
-
--el-text-color-placeholder: #8d9095;
|
|
151
|
-
--el-text-color-disabled: #6c6e72;
|
|
152
|
-
--el-border-color: #4c4d4f;
|
|
153
|
-
--el-border-color-light: #414243;
|
|
154
|
-
--el-border-color-lighter: #363637;
|
|
155
|
-
--el-border-color-extra-light: #2b2b2c;
|
|
156
|
-
--el-fill-color: #f0f2f5;
|
|
157
|
-
--el-fill-color-light: #f5f7fa;
|
|
158
|
-
--el-fill-color-lighter: #fafafa;
|
|
159
|
-
--el-fill-color-extra-light: #fafcff;
|
|
160
|
-
--el-fill-color-blank: #ffffff;
|
|
161
|
-
--el-fill-color-dark: #ebedf0;
|
|
162
|
-
--el-fill-color-darker: #e6e8eb;
|
|
163
|
-
--el-fill-color-darkest: #b1b3b8;
|
|
164
|
-
}
|
|
151
|
+
// // 边框
|
|
152
|
+
|
|
153
|
+
// //
|
|
154
|
+
// --el-component-size-large: 40px;
|
|
155
|
+
// --el-component-size: 48px;
|
|
156
|
+
// --el-component-size-small: 24px;
|
|
157
|
+
// }
|