xt-element-ui 1.0.8 → 1.0.9

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.
Files changed (37) hide show
  1. package/lib/index.common.js +617 -390
  2. package/lib/index.css +1 -1
  3. package/lib/index.umd.js +617 -390
  4. package/lib/index.umd.min.js +1 -1
  5. package/package.json +2 -2
  6. package/src/components/button/index.vue +48 -15
  7. package/src/components/button/style/index.scss +130 -0
  8. package/src/components/card/index.vue +20 -41
  9. package/src/components/card/style/index.scss +49 -0
  10. package/src/components/card-item/index.vue +71 -90
  11. package/src/components/card-item/style/index.scss +72 -0
  12. package/src/components/config-provider/index.js +2 -0
  13. package/src/components/config-provider/index.vue +176 -0
  14. package/src/components/config-provider/style/index.scss +12 -0
  15. package/src/components/flex-box/index.vue +20 -90
  16. package/src/components/flex-box/style/index.scss +91 -0
  17. package/src/components/index.scss +19 -0
  18. package/src/components/input/index.vue +28 -11
  19. package/src/components/input/style/index.scss +27 -0
  20. package/src/index.js +65 -122
  21. package/src/styles/export.scss +1 -1
  22. package/src/styles/theme/bg.scss +6 -0
  23. package/src/styles/theme/border.scss +4 -0
  24. package/src/styles/theme/color.scss +11 -0
  25. package/src/styles/theme/component.scss +70 -0
  26. package/src/styles/theme/dark.scss +29 -0
  27. package/src/styles/theme/font.scss +10 -0
  28. package/src/styles/theme/index.scss +11 -0
  29. package/src/styles/theme/radius.scss +4 -0
  30. package/src/styles/theme/shadow.scss +3 -0
  31. package/src/styles/theme/spacing.scss +5 -0
  32. package/src/styles/theme/text.scss +5 -0
  33. package/src/styles/theme/transition.scss +3 -0
  34. package/src/styles/theme-element.scss +0 -10
  35. package/src/styles/variables.scss +1 -126
  36. package/src/styles/{theme.scss → vars.scss} +72 -31
  37. package/src/utils/index.js +195 -124
package/src/index.js CHANGED
@@ -1,7 +1,19 @@
1
+ // 导入主题样式(定义 CSS 变量)
2
+ import './styles/vars.scss'
3
+
4
+ // 导入组件样式(统一入口)
5
+ import './components/index.scss'
6
+
1
7
  // 导入 SCSS 变量(通过 CSS Modules :export 导出)
2
8
  import variables from './styles/export.scss'
3
9
 
4
- import utils from './utils/index'
10
+ import utilsModule from './utils/index'
11
+
12
+ // ES Module 默认导出需要通过 .default 访问
13
+ const utils = utilsModule.default || utilsModule
14
+
15
+ // 从 utils 导入配置管理函数(仅用于存储配置)
16
+ const { getConfig, setConfig, getTheme, getSize, getPrimaryColor, resetConfig, onConfigChange, setTheme, setSize, setPrimaryColor } = utils
5
17
 
6
18
  // 导入组件
7
19
  import Button from './components/button'
@@ -9,6 +21,7 @@ import Input from './components/input'
9
21
  import FlexBox from './components/flex-box'
10
22
  import Card from './components/card'
11
23
  import CardItem from './components/card-item'
24
+ import ConfigProvider from './components/config-provider'
12
25
 
13
26
  // 存储组件列表
14
27
  const components = [
@@ -16,12 +29,13 @@ const components = [
16
29
  Input,
17
30
  FlexBox,
18
31
  Card,
19
- CardItem
32
+ CardItem,
33
+ ConfigProvider
20
34
  ]
21
35
 
22
36
 
23
37
  // 定义 install 方法,Vue.use() 会自动调用
24
- const install = function (Vue) {
38
+ const install = function (Vue, options = {}) {
25
39
  if (install.installed) return
26
40
  install.installed = true
27
41
 
@@ -29,7 +43,40 @@ const install = function (Vue) {
29
43
  components.forEach(component => {
30
44
  Vue.component(component.name, component)
31
45
  })
32
- Vue.prototype.$utils = utils
46
+
47
+ // 将工具方法挂载到 Vue.prototype
48
+ Vue.prototype.$xt = {
49
+ setTheme,
50
+ setSize,
51
+ setPrimaryColor,
52
+ getConfig,
53
+ setConfig,
54
+ getTheme,
55
+ getSize,
56
+ getPrimaryColor,
57
+ resetConfig,
58
+ onConfigChange
59
+ }
60
+
61
+ // 在安装时直接应用配置选项
62
+ if (options) {
63
+ // 处理主题配置
64
+ if (options.theme !== undefined) {
65
+ setTheme(options.theme)
66
+ }
67
+ // 处理字体大小配置
68
+ if (options.size !== undefined) {
69
+ setSize(options.size)
70
+ }
71
+ // 处理主色调配置
72
+ if (options.primaryColor !== undefined) {
73
+ setPrimaryColor(options.primaryColor)
74
+ }
75
+ // 处理完整配置对象
76
+ if (options.config !== undefined) {
77
+ setConfig(options.config)
78
+ }
79
+ }
33
80
  }
34
81
 
35
82
  // 支持全局 script 标签引入
@@ -45,127 +92,23 @@ export default {
45
92
  Input,
46
93
  FlexBox,
47
94
  Card,
48
- CardItem
95
+ CardItem,
96
+ ConfigProvider
49
97
  }
50
98
 
51
99
  // 导出工具函数和变量
52
100
  export {
53
101
  utils,
54
- variables
55
- }
56
-
57
- // 默认配置
58
- const defaultConfig = {
59
- theme: 'light',
60
- size: 'medium',
61
- primaryColor: '#1890ff'
102
+ variables,
103
+ // 配置管理函数(从 utils 导入)
104
+ getConfig,
105
+ setConfig,
106
+ getTheme,
107
+ getSize,
108
+ getPrimaryColor,
109
+ resetConfig,
110
+ onConfigChange,
111
+ setTheme,
112
+ setSize,
113
+ setPrimaryColor
62
114
  }
63
-
64
- // 当前配置
65
- let currentConfig = { ...defaultConfig }
66
-
67
- // 配置变更事件处理
68
- const configChangeListeners = []
69
-
70
- const emitConfigChange = function(key, value) {
71
- configChangeListeners.forEach(listener => {
72
- listener(key, value)
73
- })
74
- }
75
-
76
- // 获取所有配置
77
- export const getConfig = function() {
78
- return { ...currentConfig }
79
- }
80
-
81
- // 设置全局配置
82
- export const setConfig = function(config) {
83
- if (typeof config !== 'object' || config === null) {
84
- console.warn('[XtElementUI] setConfig 必须传入对象参数')
85
- return
86
- }
87
-
88
- if (config.theme !== undefined) {
89
- setTheme(config.theme)
90
- }
91
- if (config.size !== undefined) {
92
- setSize(config.size)
93
- }
94
- if (config.primaryColor !== undefined) {
95
- setPrimaryColor(config.primaryColor)
96
- }
97
- }
98
-
99
- // 设置主题(只控制颜色)
100
- export const setTheme = function(theme) {
101
- const validThemes = ['light', 'dark']
102
- if (!validThemes.includes(theme)) {
103
- console.warn(`[XtElementUI] 无效的主题值: ${theme},可选值: ${validThemes.join(', ')}`)
104
- return
105
- }
106
-
107
- currentConfig.theme = theme
108
- document.documentElement.setAttribute('data-theme', theme)
109
- emitConfigChange('theme', theme)
110
- }
111
-
112
- // 设置字体大小和间距
113
- export const setSize = function(size) {
114
- const validSizes = ['small', 'medium', 'large']
115
- if (!validSizes.includes(size)) {
116
- console.warn(`[XtElementUI] 无效的大小值: ${size},可选值: ${validSizes.join(', ')}`)
117
- return
118
- }
119
-
120
- currentConfig.size = size
121
- document.documentElement.setAttribute('data-size', size)
122
- emitConfigChange('size', size)
123
- }
124
-
125
- // 设置主色调
126
- export const setPrimaryColor = function(color) {
127
- const colorRegex = /^#[0-9A-Fa-f]{6}$|^#[0-9A-Fa-f]{3}$/
128
- if (!colorRegex.test(color)) {
129
- console.warn(`[XtElementUI] 无效的颜色值: ${color},请使用十六进制颜色格式,如 #1890ff`)
130
- return
131
- }
132
-
133
- currentConfig.primaryColor = color
134
- document.documentElement.style.setProperty('--xt-color-primary', color)
135
- emitConfigChange('primaryColor', color)
136
- }
137
-
138
- // 获取当前主题
139
- export const getTheme = function() {
140
- return currentConfig.theme
141
- }
142
-
143
- // 获取当前字体大小
144
- export const getSize = function() {
145
- return currentConfig.size
146
- }
147
-
148
- // 获取当前主色调
149
- export const getPrimaryColor = function() {
150
- return currentConfig.primaryColor
151
- }
152
-
153
- // 重置为默认配置
154
- export const resetConfig = function() {
155
- setConfig(defaultConfig)
156
- }
157
-
158
- // 监听配置变更
159
- export const onConfigChange = function(listener) {
160
- if (typeof listener === 'function') {
161
- configChangeListeners.push(listener)
162
- return function() {
163
- const index = configChangeListeners.indexOf(listener)
164
- if (index > -1) {
165
- configChangeListeners.splice(index, 1)
166
- }
167
- }
168
- } else {
169
- console.warn('[XtElementUI] onConfigChange 必须传入函数')
170
- }
171
- }
@@ -1,4 +1,4 @@
1
- @use './variables.scss' as *;
1
+ @import './theme/index.scss';
2
2
 
3
3
  // SCSS 变量导出给 JavaScript 使用
4
4
  :export {
@@ -0,0 +1,6 @@
1
+ $xt-color-bg-primary: #ffffff; // 主背景色 - 白色
2
+ $xt-color-bg-secondary: #f5f7fa; // 次要背景色 - 浅灰
3
+ $xt-color-bg-hover: #f5f5f5; // 悬停背景色
4
+ $xt-color-bg-container: #f5f7fa; // 容器背景色
5
+ $xt-color-bg-main: #ffffff; // 主内容区域背景色
6
+ $xt-color-bg-overlay: #ffffff; // 浮层背景色
@@ -0,0 +1,4 @@
1
+ $xt-color-border: #DCDFE6; // 边框颜色 - 标准
2
+ $xt-color-border-light: #E4E7ED; // 边框浅色
3
+ $xt-color-border-lighter: #EBEEF5; // 边框更浅色
4
+ $xt-color-border-extra-light: #F2F6FC; // 边框极浅色
@@ -0,0 +1,11 @@
1
+ $xt-color-primary: #409EFF; // 主颜色 - Element UI 标准蓝色
2
+ $xt-color-success: #67C23A; // 成功色 - Element UI 标准绿色
3
+ $xt-color-warning: #E6A23C; // 警告色 - Element UI 标准橙色
4
+ $xt-color-danger: #F56C6C; // 危险色 - Element UI 标准红色
5
+ $xt-color-info: #909399; // 信息色 - Element UI 标准灰色
6
+
7
+ $xt-color-primary-light-3: #79BBFF; // 主色浅色 30%
8
+ $xt-color-primary-light-5: #A0CFFF; // 主色浅色 50%
9
+ $xt-color-primary-light-7: #C6E2FF; // 主色浅色 70%
10
+ $xt-color-primary-light-8: #D9ECFF; // 主色浅色 80%
11
+ $xt-color-primary-light-9: #ECF5FF; // 主色浅色 90%
@@ -0,0 +1,70 @@
1
+ // ===========================
2
+ // 按钮专用变量
3
+ // ===========================
4
+ $xt-button-height: 32px; // 按钮高度
5
+ $xt-button-padding-x: 15px; // 按钮水平内边距
6
+ $xt-button-padding-y: 8px; // 按钮垂直内边距
7
+ $xt-button-font-weight: 500; // 按钮字体粗细
8
+ $xt-button-border-width: 1px; // 按钮边框宽度
9
+ $xt-button-transition: 0.1s; // 按钮过渡时长
10
+
11
+ // ===========================
12
+ // 卡片专用变量
13
+ // ===========================
14
+ $xt-card-bg-color: #ffffff; // 卡片背景色
15
+ $xt-card-border-color: #EBEEF5; // 卡片边框颜色
16
+ $xt-card-border-radius: 4px; // 卡片圆角
17
+ $xt-card-padding: 20px; // 卡片内边距
18
+ $xt-card-header-padding: 18px 20px; // 卡片头部内边距
19
+ $xt-card-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1); // 卡片阴影
20
+
21
+ // ===========================
22
+ // 卡片项专用变量
23
+ // ===========================
24
+ $xt-card-item-min-height: 40px; // 卡片项最小高度
25
+ $xt-card-item-gap: 10px; // 卡片项间距
26
+ $xt-card-item-border-width: 3px; // 卡片项边框宽度
27
+
28
+ // ===========================
29
+ // 输入框专用变量
30
+ // ===========================
31
+ $xt-input-height: 32px; // 输入框高度
32
+ $xt-input-padding-x: 15px; // 输入框水平内边距
33
+ $xt-input-bg-color: #ffffff; // 输入框背景色
34
+ $xt-input-border-color: #DCDFE6; // 输入框边框颜色
35
+ $xt-input-text-color: #303133; // 输入框文字颜色
36
+ $xt-input-placeholder-color: #C0C4CC; // 输入框占位符颜色
37
+
38
+ // ===========================
39
+ // FlexBox 专用变量
40
+ // ===========================
41
+ $xt-flex-box-gap: 8px; // FlexBox 默认间距
42
+
43
+ // ===========================
44
+ // 布局 / 头部 / 导航 专用变量
45
+ // ===========================
46
+ $xt-header-bg: #ffffff; // 头部背景色
47
+ $xt-header-text-color: #303133; // 头部文字颜色
48
+ $xt-header-active-text: #409EFF; // 头部激活状态文字颜色
49
+ $xt-header-hover-text: #409EFF; // 头部悬停状态文字颜色
50
+
51
+ $xt-hamburger-bg: #409EFF; // 汉堡按钮背景色
52
+
53
+ $xt-menu-bg: #304156; // 菜单背景色
54
+ $xt-menu-hover: #263445; // 菜单悬停背景色
55
+ $xt-menu-text: #bfcbd9; // 菜单文字颜色
56
+ $xt-menu-active-text: #ffffff; // 菜单激活状态文字颜色
57
+
58
+ $xt-sub-menu-bg: #1f2d3d; // 子菜单背景色
59
+ $xt-sub-menu-hover: #001528; // 子菜单悬停背景色
60
+
61
+ // ===========================
62
+ // 弹窗专用变量
63
+ // ===========================
64
+ $xt-dialog-bg: #ffffff; // 弹窗背景色
65
+ $xt-dialog-title: #303133; // 弹窗标题文字颜色
66
+
67
+ // ===========================
68
+ // TAG 标签专用变量
69
+ // ===========================
70
+ $xt-tag-bg: #ffffff; // 标签背景色
@@ -0,0 +1,29 @@
1
+ $xt-dark-color-primary: #0a7be0; // 暗色主题主色调
2
+ $xt-dark-color-success: #4BC376; // 暗色主题成功颜色
3
+ $xt-dark-color-warning: #E6B61e; // 暗色主题警告颜色
4
+ $xt-dark-color-danger: #c13737; // 暗色主题危险颜色
5
+ $xt-dark-color-info: #3f4249; // 暗色主题信息文字颜色
6
+
7
+ $xt-dark-color-text-primary: rgba(255, 255, 255, 0.95); // 暗色主题主要文字颜色
8
+ $xt-dark-color-text-regular: rgba(255, 255, 255, 0.8); // 暗色主题常规文字颜色
9
+ $xt-dark-color-text-secondary: rgba(255, 255, 255, 0.6); // 暗色主题次要文字颜色
10
+ $xt-dark-color-text-placeholder: rgba(255, 255, 255, 0.4); // 暗色主题占位符文字颜色
11
+ $xt-dark-color-text-disabled: rgba(255, 255, 255, 0.3); // 暗色主题禁用状态文字颜色
12
+
13
+ $xt-dark-color-bg-primary: #1f1f1f; // 暗色主题主背景色
14
+ $xt-dark-color-bg-secondary: #2d2d2d; // 暗色主题次要背景色
15
+ $xt-dark-color-bg-hover: #3d3d3d; // 暗色主题悬停背景色
16
+ $xt-dark-color-bg-container: #1f1f1f; // 暗色主题容器背景色
17
+ $xt-dark-color-bg-overlay: #2d2d2d; // 暗色主题浮层背景色
18
+
19
+ $xt-dark-color-border: #434343; // 暗色主题边框颜色
20
+ $xt-dark-color-border-light: #3d3d3d; // 暗色主题边框浅色
21
+ $xt-dark-color-border-lighter: #3d3d3d; // 暗色主题边框更浅色
22
+ $xt-dark-color-border-extra-light: #434343; // 暗色主题边框极浅色
23
+
24
+ // 暗色主题按钮颜色
25
+ $xt-dark-button-primary-bg: #1e40af; // 暗色主题主按钮背景色
26
+ $xt-dark-button-success-bg: #166534; // 暗色主题成功按钮背景色
27
+ $xt-dark-button-warning-bg: #78350f; // 暗色主题警告按钮背景色
28
+ $xt-dark-button-danger-bg: #991b1b; // 暗色主题危险按钮背景色
29
+ $xt-dark-button-info-bg: #374151; // 暗色主题信息按钮背景色
@@ -0,0 +1,10 @@
1
+ $xt-font-size-extra-large: 20px; // 特大字体基础值
2
+ $xt-font-size-large: 18px; // 大字体基础值
3
+ $xt-font-size-medium: 16px; // 中等字体基础值
4
+ $xt-font-size-base: 14px; // 基准字体 - Element UI 默认
5
+ $xt-font-size-small: 13px; // 小字体基础值
6
+ $xt-font-size-extra-small: 12px; // 特小字体基础值
7
+
8
+ $xt-font-size-increment-small: 0px; // 小尺寸增量
9
+ $xt-font-size-increment-medium: 2px; // 中尺寸增量
10
+ $xt-font-size-increment-large: 4px; // 大尺寸增量
@@ -0,0 +1,11 @@
1
+ @import './color.scss';
2
+ @import './text.scss';
3
+ @import './bg.scss';
4
+ @import './border.scss';
5
+ @import './font.scss';
6
+ @import './spacing.scss';
7
+ @import './radius.scss';
8
+ @import './shadow.scss';
9
+ @import './transition.scss';
10
+ @import './dark.scss';
11
+ @import './component.scss';
@@ -0,0 +1,4 @@
1
+ $xt-border-radius-base: 4px; // 基准圆角
2
+ $xt-border-radius-small: 2px; // 小圆角
3
+ $xt-border-radius-round: 20px; // 圆角(胶囊状)
4
+ $xt-border-radius-circle: 50%; // 圆形
@@ -0,0 +1,3 @@
1
+ $xt-shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.04); // 小阴影
2
+ $xt-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08); // 中等阴影
3
+ $xt-shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12); // 大阴影
@@ -0,0 +1,5 @@
1
+ $xt-spacing-xs: 4px; // 最小间距
2
+ $xt-spacing-sm: 8px; // 小间距
3
+ $xt-spacing-md: 12px; // 中间距
4
+ $xt-spacing-lg: 16px; // 大间距
5
+ $xt-spacing-xl: 20px; // 特大间距
@@ -0,0 +1,5 @@
1
+ $xt-color-text-primary: #303133; // 主要文字颜色 - 最深
2
+ $xt-color-text-regular: #606266; // 常规文字颜色 - 中等
3
+ $xt-color-text-secondary: #909399; // 次要文字颜色 - 较浅
4
+ $xt-color-text-placeholder: #C0C4CC; // 占位符文字颜色
5
+ $xt-color-text-disabled: #C0C4CC; // 禁用状态文字颜色
@@ -0,0 +1,3 @@
1
+ $xt-transition-duration: 0.3s; // 默认过渡时长
2
+ $xt-transition-duration-fast: 0.2s; // 快速过渡时长
3
+ $xt-transition-ease: ease; // 缓动函数
@@ -84,16 +84,6 @@
84
84
  --el-border-color-extra-light: #5c5c5d;
85
85
  }
86
86
 
87
- /* 紧凑主题 */
88
- [data-theme="compact"] {
89
- --el-font-size-base: 13px;
90
- --el-font-size-small: 12px;
91
-
92
- --el-spacing-xs: 3px;
93
- --el-spacing-sm: 6px;
94
- --el-spacing-md: 10px;
95
- --el-spacing-lg: 14px;
96
- }
97
87
 
98
88
  /* 大字体主题 */
99
89
  [data-size="large"] {
@@ -1,126 +1 @@
1
- // ===========================
2
- // Element UI 标准颜色变量
3
- // ===========================
4
-
5
- // 主色调系列
6
- $xt-color-primary: #409EFF; // 主颜色 - Element UI 标准蓝色
7
- $xt-color-success: #67C23A; // 成功色 - Element UI 标准绿色
8
- $xt-color-warning: #E6A23C; // 警告色 - Element UI 标准橙色
9
- $xt-color-danger: #F56C6C; // 危险色 - Element UI 标准红色
10
- $xt-color-info: #909399; // 信息色 - Element UI 标准灰色
11
-
12
- // 主色调浅色系列(用于 hover、active 等状态)
13
- $xt-color-primary-light-3: #79BBFF; // 主色浅色 30%
14
- $xt-color-primary-light-5: #A0CFFF; // 主色浅色 50%
15
- $xt-color-primary-light-7: #C6E2FF; // 主色浅色 70%
16
- $xt-color-primary-light-8: #D9ECFF; // 主色浅色 80%
17
- $xt-color-primary-light-9: #ECF5FF; // 主色浅色 90%
18
-
19
- // ===========================
20
- // 文字颜色
21
- // ===========================
22
- $xt-color-text-primary: #303133; // 主要文字颜色 - 最深
23
- $xt-color-text-regular: #606266; // 常规文字颜色 - 中等
24
- $xt-color-text-secondary: #909399; // 次要文字颜色 - 较浅
25
- $xt-color-text-placeholder: #C0C4CC; // 占位符文字颜色
26
- $xt-color-text-disabled: #C0C4CC; // 禁用状态文字颜色
27
-
28
- // ===========================
29
- // 背景颜色
30
- // ===========================
31
- $xt-color-bg-primary: #ffffff; // 主背景色 - 白色
32
- $xt-color-bg-secondary: #f5f7fa; // 次要背景色 - 浅灰
33
- $xt-color-bg-hover: #f5f5f5; // 悬停背景色
34
- $xt-color-bg-container: #f5f7fa; // 容器背景色
35
- $xt-color-bg-main: #ffffff; // 主内容区域背景色
36
- $xt-color-bg-overlay: #ffffff; // 浮层背景色
37
-
38
- // ===========================
39
- // 边框颜色
40
- // ===========================
41
- $xt-color-border: #DCDFE6; // 边框颜色 - 标准
42
- $xt-color-border-light: #E4E7ED; // 边框浅色
43
- $xt-color-border-lighter: #EBEEF5; // 边框更浅色
44
- $xt-color-border-extra-light: #F2F6FC; // 边框极浅色
45
-
46
- // ===========================
47
- // 字体大小 - 基础值
48
- // ===========================
49
- $xt-font-size-extra-large: 20px; // 特大字体基础值
50
- $xt-font-size-large: 18px; // 大字体基础值
51
- $xt-font-size-medium: 16px; // 中等字体基础值
52
- $xt-font-size-base: 14px; // 基准字体 - Element UI 默认
53
- $xt-font-size-small: 13px; // 小字体基础值
54
- $xt-font-size-extra-small: 12px; // 特小字体基础值
55
-
56
- // ===========================
57
- // 字体大小增量(用于主题切换)
58
- // ===========================
59
- $xt-font-size-increment-small: 0px; // 小尺寸增量
60
- $xt-font-size-increment-medium: 2px; // 中尺寸增量
61
- $xt-font-size-increment-large: 4px; // 大尺寸增量
62
-
63
- // ===========================
64
- // 间距
65
- // ===========================
66
- $xt-spacing-xs: 4px; // 最小间距
67
- $xt-spacing-sm: 8px; // 小间距
68
- $xt-spacing-md: 12px; // 中间距
69
- $xt-spacing-lg: 16px; // 大间距
70
- $xt-spacing-xl: 20px; // 特大间距
71
-
72
- // ===========================
73
- // 圆角
74
- // ===========================
75
- $xt-border-radius-base: 4px; // 基准圆角
76
- $xt-border-radius-small: 2px; // 小圆角
77
- $xt-border-radius-round: 20px; // 圆角(胶囊状)
78
- $xt-border-radius-circle: 50%; // 圆形
79
-
80
- // ===========================
81
- // 阴影
82
- // ===========================
83
- $xt-shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.04); // 小阴影
84
- $xt-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08); // 中等阴影
85
- $xt-shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12); // 大阴影
86
-
87
- // ===========================
88
- // 过渡动画
89
- // ===========================
90
- $xt-transition-duration: 0.3s; // 默认过渡时长
91
- $xt-transition-duration-fast: 0.2s; // 快速过渡时长
92
- $xt-transition-ease: ease; // 缓动函数
93
-
94
- // ===========================
95
- // 布局 / 头部 / 导航 专用变量
96
- // ===========================
97
-
98
- // 头部导航
99
- $xt-header-bg: #ffffff; // 头部背景色
100
- $xt-header-text-color: #303133; // 头部文字颜色
101
- $xt-header-active-text: #409EFF; // 头部激活状态文字颜色
102
- $xt-header-hover-text: #409EFF; // 头部悬停状态文字颜色
103
-
104
- // 汉堡菜单按钮
105
- $xt-hamburger-bg: #409EFF; // 汉堡按钮背景色
106
-
107
- // 侧边菜单
108
- $xt-menu-bg: #304156; // 菜单背景色
109
- $xt-menu-hover: #263445; // 菜单悬停背景色
110
- $xt-menu-text: #bfcbd9; // 菜单文字颜色
111
- $xt-menu-active-text: #ffffff; // 菜单激活状态文字颜色
112
-
113
- // 子菜单
114
- $xt-sub-menu-bg: #1f2d3d; // 子菜单背景色
115
- $xt-sub-menu-hover: #001528; // 子菜单悬停背景色
116
-
117
- // ===========================
118
- // 弹窗专用变量
119
- // ===========================
120
- $xt-dialog-bg: #ffffff; // 弹窗背景色
121
- $xt-dialog-title: #303133; // 弹窗标题文字颜色
122
-
123
- // ===========================
124
- // TAG 标签专用变量
125
- // ===========================
126
- $xt-tag-bg: #ffffff; // 标签背景色
1
+ @import './theme/index.scss';