xt-element-ui 1.1.2 → 1.1.4

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 (100) hide show
  1. package/lib/css/2.9f53fb10.css +1 -0
  2. package/lib/css/3.f955b130.css +1 -0
  3. package/lib/css/4.04feac2c.css +1 -0
  4. package/lib/css/5.6a8558e0.css +1 -0
  5. package/lib/css/6.e474b334.css +1 -0
  6. package/lib/index.common.0.js +16448 -15696
  7. package/lib/index.common.2.js +298 -270
  8. package/lib/index.common.3.js +82 -54
  9. package/lib/index.common.4.js +519 -489
  10. package/lib/index.common.5.js +74 -46
  11. package/lib/index.common.6.js +76 -48
  12. package/lib/index.common.js +826 -308
  13. package/lib/index.css +1 -1
  14. package/lib/index.umd.0.js +16448 -15696
  15. package/lib/index.umd.2.js +298 -270
  16. package/lib/index.umd.3.js +82 -54
  17. package/lib/index.umd.4.js +519 -489
  18. package/lib/index.umd.5.js +74 -46
  19. package/lib/index.umd.6.js +76 -48
  20. package/lib/index.umd.js +832 -313
  21. package/lib/index.umd.min.0.js +3 -3
  22. package/lib/index.umd.min.2.js +1 -1
  23. package/lib/index.umd.min.3.js +1 -1
  24. package/lib/index.umd.min.4.js +1 -1
  25. package/lib/index.umd.min.5.js +1 -1
  26. package/lib/index.umd.min.6.js +1 -1
  27. package/lib/index.umd.min.js +1 -1
  28. package/package.json +2 -1
  29. package/src/components/ex-button/index.js +2 -0
  30. package/src/components/ex-button/index.vue +61 -0
  31. package/src/components/ex-button/style/index.scss +31 -0
  32. package/src/components/ex-card/index.js +7 -0
  33. package/src/components/ex-card/index.vue +150 -0
  34. package/src/components/ex-card/style/index.scss +69 -0
  35. package/src/components/{chart → ex-chart}/ExBar.vue +3 -0
  36. package/src/components/{chart → ex-chart}/ExLine.vue +3 -0
  37. package/src/components/{chart → ex-chart}/ExMulti.vue +5 -0
  38. package/src/components/{chart → ex-chart}/ExPie.vue +3 -0
  39. package/src/components/{chart → ex-chart}/ExTrend.vue +3 -0
  40. package/src/components/ex-chart/index.js +2 -0
  41. package/src/components/ex-chart/index.vue +134 -0
  42. package/src/components/{chart → ex-chart}/theme/dark.js +1 -1
  43. package/src/components/{chart → ex-chart}/utils.js +40 -12
  44. package/src/components/index.scss +13 -7
  45. package/src/components/{button → xt-button}/index.vue +1 -1
  46. package/src/components/{card-item → xt-card-item}/index.vue +1 -1
  47. package/src/components/{config-provider → xt-config-provider}/index.vue +66 -0
  48. package/src/components/{date-picker → xt-date-picker}/index.vue +1 -1
  49. package/src/components/{date-picker → xt-date-picker}/quarter.vue +4 -2
  50. package/src/components/{table → xt-table}/index.vue +48 -107
  51. package/src/config/element-registry.js +136 -0
  52. package/src/index.js +56 -32
  53. package/src/styles/theme/colors.scss +1 -0
  54. package/lib/css/2.3f7aa432.css +0 -1
  55. package/lib/css/3.ffcc175d.css +0 -1
  56. package/lib/css/4.9abd1f2b.css +0 -1
  57. package/lib/css/5.1a31ed8a.css +0 -1
  58. package/lib/css/6.c2d0d77e.css +0 -1
  59. package/src/components/chart/index.js +0 -2
  60. package/src/components/chart/index.vue +0 -51
  61. /package/src/components/{chart → ex-chart}/pieList.vue +0 -0
  62. /package/src/components/{chart → ex-chart}/theme/blue.js +0 -0
  63. /package/src/components/{chart → ex-chart}/theme/orange.js +0 -0
  64. /package/src/components/{chart → ex-chart}/theme/starry.js +0 -0
  65. /package/src/components/{chart → ex-chart}/theme/white.js +0 -0
  66. /package/src/components/{button → xt-button}/index.js +0 -0
  67. /package/src/components/{button → xt-button}/style/index.scss +0 -0
  68. /package/src/components/{card → xt-card}/index.js +0 -0
  69. /package/src/components/{card → xt-card}/index.vue +0 -0
  70. /package/src/components/{card → xt-card}/style/index.scss +0 -0
  71. /package/src/components/{card-item → xt-card-item}/index.js +0 -0
  72. /package/src/components/{card-item → xt-card-item}/style/index.scss +0 -0
  73. /package/src/components/{config-provider → xt-config-provider}/index.js +0 -0
  74. /package/src/components/{config-provider → xt-config-provider}/style/index.scss +0 -0
  75. /package/src/components/{date-picker → xt-date-picker}/SearchDate.vue +0 -0
  76. /package/src/components/{date-picker → xt-date-picker}/index.js +0 -0
  77. /package/src/components/{flex-box → xt-flex-box}/index.js +0 -0
  78. /package/src/components/{flex-box → xt-flex-box}/index.vue +0 -0
  79. /package/src/components/{flex-box → xt-flex-box}/style/index.scss +0 -0
  80. /package/src/components/{grid-box → xt-grid-box}/index.js +0 -0
  81. /package/src/components/{grid-box → xt-grid-box}/index.vue +0 -0
  82. /package/src/components/{input → xt-input}/index.js +0 -0
  83. /package/src/components/{input → xt-input}/index.vue +0 -0
  84. /package/src/components/{input → xt-input}/style/index.scss +0 -0
  85. /package/src/components/{layout → xt-layout}/BaseCollapse.vue +0 -0
  86. /package/src/components/{layout → xt-layout}/ExFieldset.vue +0 -0
  87. /package/src/components/{page → xt-page}/index.js +0 -0
  88. /package/src/components/{page → xt-page}/index.vue +0 -0
  89. /package/src/components/{select-tree → xt-select-tree}/index.js +0 -0
  90. /package/src/components/{select-tree → xt-select-tree}/index.vue +0 -0
  91. /package/src/components/{table → xt-table}/ExCell.vue +0 -0
  92. /package/src/components/{table → xt-table}/ExColumn.vue +0 -0
  93. /package/src/components/{table → xt-table}/index.js +0 -0
  94. /package/src/components/{table → xt-table}/processor.js +0 -0
  95. /package/src/components/{text → xt-text}/index.js +0 -0
  96. /package/src/components/{text → xt-text}/index.vue +0 -0
  97. /package/src/components/{text → xt-text}/style/index.scss +0 -0
  98. /package/src/components/{upload → xt-upload}/index.js +0 -0
  99. /package/src/components/{upload → xt-upload}/index.vue +0 -0
  100. /package/src/components/{upload → xt-upload}/preview.vue +0 -0
@@ -0,0 +1,69 @@
1
+ // ExCard 组件样式
2
+ @import '../../../styles/variables.scss';
3
+
4
+ .ex-card {
5
+ border-radius: 8px;
6
+ transition: all 0.3s;
7
+ font-size: var(--ex-card-font-size, 14px);
8
+
9
+ .el-card__header {
10
+ padding: var(--ex-card-header-padding, 16px 20px);
11
+ border-bottom: 1px solid #ebeef5;
12
+ background-color: #fafafa;
13
+ font-weight: 600;
14
+ }
15
+
16
+ .el-card__body {
17
+ padding: var(--ex-card-body-padding, 20px);
18
+ }
19
+ }
20
+
21
+ .ex-card-small {
22
+ font-size: 12px;
23
+
24
+ .el-card__header {
25
+ font-size: 12px;
26
+ }
27
+ }
28
+
29
+ .ex-card-medium {
30
+ font-size: 14px;
31
+
32
+ .el-card__header {
33
+ font-size: 14px;
34
+ }
35
+ }
36
+
37
+ .ex-card-large {
38
+ font-size: 16px;
39
+
40
+ .el-card__header {
41
+ font-size: 16px;
42
+ }
43
+ }
44
+
45
+ .ex-card-always {
46
+ box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
47
+ }
48
+
49
+ .ex-card-hover {
50
+ box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
51
+
52
+ &:hover {
53
+ box-shadow: 0 4px 16px 0 rgba(0, 0, 0, 0.15);
54
+ }
55
+ }
56
+
57
+ .ex-card-never {
58
+ box-shadow: none;
59
+ border: 1px solid #ebeef5;
60
+ }
61
+
62
+ .ex-card-no-border {
63
+ border: none;
64
+
65
+ .el-card__header {
66
+ border-bottom: none;
67
+ }
68
+ }
69
+
@@ -90,6 +90,9 @@ export default {
90
90
  }
91
91
  _self.initChart();
92
92
  }
93
+ },
94
+ theme(newVal) {
95
+ this.initChart();
93
96
  }
94
97
  },
95
98
  mounted() {
@@ -57,6 +57,9 @@ export default {
57
57
  const _self = this;
58
58
  _self.initChart();
59
59
  }
60
+ },
61
+ theme(newVal) {
62
+ this.initChart();
60
63
  }
61
64
  },
62
65
  mounted() {
@@ -125,6 +125,11 @@ export default {
125
125
  const _self = this;
126
126
  _self.initChart();
127
127
  }
128
+ },
129
+ theme(newVal) {
130
+ this.myChart && this.myChart.dispose();
131
+ this.myChart = null;
132
+ this.initChart();
128
133
  }
129
134
  },
130
135
  mounted() {
@@ -67,6 +67,9 @@ export default {
67
67
  const _self = this;
68
68
  _self.initChart();
69
69
  }
70
+ },
71
+ theme(newVal) {
72
+ this.initChart();
70
73
  }
71
74
  },
72
75
  mounted() {
@@ -53,6 +53,9 @@ export default {
53
53
  const _self = this;
54
54
  _self.initChart();
55
55
  }
56
+ },
57
+ theme(newVal) {
58
+ this.initChart();
56
59
  }
57
60
  },
58
61
  mounted() {
@@ -0,0 +1,2 @@
1
+ import ExChart from './index.vue'
2
+ export default ExChart
@@ -0,0 +1,134 @@
1
+ <template>
2
+ <ex-bar v-if="type=='bar'" v-bind="$attrs" :theme="myTheme" :size="mySize"></ex-bar>
3
+ <ex-line v-else-if="type=='line'" v-bind="$attrs" :theme="myTheme" :size="mySize"></ex-line>
4
+ <ex-pie v-else-if="type=='pie'" v-bind="$attrs" :theme="myTheme" :size="mySize"></ex-pie>
5
+ <ex-multi v-else-if="type=='multi'" v-bind="$attrs" :theme="myTheme" :size="mySize"></ex-multi>
6
+ <ex-trend v-else-if="type=='trend'" v-bind="$attrs" :theme="myTheme" :size="mySize"></ex-trend>
7
+ </template>
8
+ <script>
9
+ export default {
10
+ name: "ExChart",
11
+ components: {
12
+ ExBar: () => import("./ExBar.vue"),
13
+ ExLine: () => import("./ExLine.vue"),
14
+ ExPie: () => import("./ExPie.vue"),
15
+ ExMulti: () => import("./ExMulti.vue"),
16
+ ExTrend: () => import("./ExTrend.vue")
17
+ },
18
+ props: {
19
+ theme: {
20
+ type: String,
21
+ default: ""
22
+ },
23
+ size: {
24
+ type: String,
25
+ default: "medium",
26
+ validator: (value) => {
27
+ return ['small', 'medium', 'large'].includes(value)
28
+ }
29
+ },
30
+ type: {
31
+ type: String,
32
+ required: true,
33
+ default: "bar"
34
+ }
35
+ },
36
+ data() {
37
+ return {
38
+ myTheme: this.theme,
39
+ mySize: this.size,
40
+ observer: null
41
+ };
42
+ },
43
+ mounted() {
44
+ // 初始化时检测父元素的 data-theme
45
+ this.detectParentTheme();
46
+
47
+ // 监听父元素的 data-theme 属性变化
48
+ this.observeThemeChange();
49
+ },
50
+ beforeUnmount() {
51
+ // 清理观察器
52
+ if (this.observer) {
53
+ this.observer.disconnect();
54
+ }
55
+ },
56
+ watch: {
57
+ theme(newVal) {
58
+ this.myTheme = newVal;
59
+ },
60
+ size(newVal) {
61
+ this.mySize = newVal;
62
+ }
63
+ },
64
+ methods: {
65
+ // 检测父元素的 data-theme 属性
66
+ detectParentTheme() {
67
+ if (this.theme) {
68
+ // 如果用户显式传入了 theme prop,使用传入的值
69
+ this.myTheme = this.theme;
70
+ return;
71
+ }
72
+
73
+ // 查找最近的带有 data-theme 属性的父元素
74
+ let parent = this.$el ? this.$el.parentElement : null;
75
+ while (parent) {
76
+ const parentTheme = parent.getAttribute('data-theme');
77
+ if (parentTheme) {
78
+ this.myTheme = parentTheme === 'dark' ? 'dark' : 'default';
79
+ return;
80
+ }
81
+ parent = parent.parentElement;
82
+ }
83
+
84
+ // 如果没有找到,检查 document.body 或 document.documentElement
85
+ const bodyTheme = document.body.getAttribute('data-theme');
86
+ const htmlTheme = document.documentElement.getAttribute('data-theme');
87
+ if (bodyTheme === 'dark' || htmlTheme === 'dark') {
88
+ this.myTheme = 'dark';
89
+ } else {
90
+ this.myTheme = 'default';
91
+ }
92
+ },
93
+
94
+ // 监听主题变化
95
+ observeThemeChange() {
96
+ if (!this.$el) return;
97
+
98
+ // 创建 MutationObserver 监听父元素的属性变化
99
+ this.observer = new MutationObserver((mutations) => {
100
+ mutations.forEach((mutation) => {
101
+ if (mutation.type === 'attributes' && mutation.attributeName === 'data-theme') {
102
+ const newTheme = mutation.target.getAttribute('data-theme');
103
+ if (newTheme === 'dark') {
104
+ this.myTheme = 'dark';
105
+ } else if (newTheme === 'light') {
106
+ this.myTheme = 'default';
107
+ }
108
+ }
109
+ });
110
+ });
111
+
112
+ // 监听当前元素和所有父元素的属性变化
113
+ let parent = this.$el.parentElement;
114
+ while (parent) {
115
+ this.observer.observe(parent, {
116
+ attributes: true,
117
+ attributeFilter: ['data-theme']
118
+ });
119
+ parent = parent.parentElement;
120
+ }
121
+
122
+ // 同时监听 body 和 html 的变化
123
+ this.observer.observe(document.body, {
124
+ attributes: true,
125
+ attributeFilter: ['data-theme']
126
+ });
127
+ this.observer.observe(document.documentElement, {
128
+ attributes: true,
129
+ attributeFilter: ['data-theme']
130
+ });
131
+ }
132
+ }
133
+ };
134
+ </script>
@@ -1,6 +1,6 @@
1
1
  export default {
2
2
  color: ["#0de7ff", "#a782ff", "#fcdd60", "#0de7ff", "#ffc5a1", "#6291ae", "#13ce66"],
3
- backgroundColor: "#ffffff",
3
+ backgroundColor: "transparent",
4
4
  textStyle: {
5
5
  fontFamily: "Microsoft YaHei, sans-serif"
6
6
  },
@@ -1,5 +1,3 @@
1
- import * as echarts from "echarts";
2
-
3
1
  import themeWhite from "./theme/white";
4
2
  import themeDark from "./theme/dark";
5
3
  import themeBlue from "./theme/blue";
@@ -15,8 +13,22 @@ const themeKeys = {
15
13
  "orange": themeOrange
16
14
  };
17
15
 
18
- for (const key in themeKeys) {
19
- echarts.registerTheme(key, themeKeys[key]);
16
+ // echarts 仅在客户端加载,避免 SSR 编译/渲染报错
17
+ let echarts = null;
18
+
19
+ function getEcharts() {
20
+ if (!echarts && typeof window !== 'undefined') {
21
+ try {
22
+ echarts = require('echarts');
23
+ // 注册所有主题
24
+ for (const key in themeKeys) {
25
+ echarts.registerTheme(key, themeKeys[key]);
26
+ }
27
+ } catch (e) {
28
+ console.warn('[ExChart] echarts 加载失败:', e.message);
29
+ }
30
+ }
31
+ return echarts;
20
32
  }
21
33
 
22
34
  // 字体大小配置
@@ -162,6 +174,10 @@ EchartsUtil.applyFontSize = function(themeOption, size) {
162
174
  };
163
175
 
164
176
  EchartsUtil.init = function(dom, theme, customOption, size) {
177
+ const ec = getEcharts();
178
+ // SSR 环境下忽略初始化
179
+ if (!ec || !dom) return null;
180
+
165
181
  theme = theme || "default";
166
182
  size = size || "medium";
167
183
  customOption = customOption || {};
@@ -178,7 +194,7 @@ EchartsUtil.init = function(dom, theme, customOption, size) {
178
194
 
179
195
  const option = this.mergeOptions(themeOption, customOption);
180
196
 
181
- const chart = echarts.init(dom, useTheme);
197
+ const chart = ec.init(dom, useTheme);
182
198
  chart.setOption(option, true);
183
199
 
184
200
  this.chartInstanceList.push({
@@ -193,7 +209,8 @@ EchartsUtil.init = function(dom, theme, customOption, size) {
193
209
  };
194
210
 
195
211
  EchartsUtil.changeSingleTheme = function(dom, chartIns, customOption, newTheme) {
196
- if (!dom || !chartIns) return;
212
+ const ec = getEcharts();
213
+ if (!ec || !dom || !chartIns) return;
197
214
 
198
215
  customOption = customOption || {};
199
216
  newTheme = newTheme || "default";
@@ -201,7 +218,7 @@ EchartsUtil.changeSingleTheme = function(dom, chartIns, customOption, newTheme)
201
218
  this.currentTheme = newTheme;
202
219
  chartIns.dispose();
203
220
 
204
- const newChart = echarts.init(dom, newTheme, customOption);
221
+ const newChart = ec.init(dom, newTheme, customOption);
205
222
 
206
223
  const item = this.chartInstanceList.find(function(v) {
207
224
  return v.dom === dom;
@@ -214,26 +231,37 @@ EchartsUtil.changeSingleTheme = function(dom, chartIns, customOption, newTheme)
214
231
  return newChart;
215
232
  };
216
233
 
217
- EchartsUtil.changeAllTheme = function(newTheme) {
218
- if (!newTheme) return;
234
+ EchartsUtil.changeAllTheme = function(newTheme, newSize) {
235
+ const ec = getEcharts();
236
+ if (!ec || !newTheme) return;
219
237
 
220
238
  this.currentTheme = newTheme;
239
+ // 如果传入了新的 size,则更新全局 size
240
+ if (newSize) {
241
+ this.currentSize = newSize;
242
+ }
221
243
 
222
244
  this.chartInstanceList.forEach(function(item) {
223
245
  const dom = item.dom;
224
246
  const chart = item.chart;
225
247
  const customOption = item.customOption;
248
+ // 使用图表自己的 size,如果没有则使用全局 size
249
+ const useSize = item.size || EchartsUtil.currentSize;
226
250
 
227
251
  if (chart) {
228
252
  chart.dispose();
229
253
  }
230
254
 
231
- const newChart = echarts.init(dom, newTheme);
232
- const themeOption = themeKeys[newTheme];
255
+ const newChart = ec.init(dom, newTheme);
256
+ let themeOption = themeKeys[newTheme];
257
+ // 应用字体大小配置
258
+ themeOption = EchartsUtil.applyFontSize(themeOption, useSize);
233
259
  const option = EchartsUtil.mergeOptions(themeOption, customOption);
234
260
 
235
261
  newChart.setOption(option, true);
236
262
  item.chart = newChart;
263
+ // 更新图表的 size 记录
264
+ item.size = useSize;
237
265
  EchartsUtil.bindResize(newChart);
238
266
  });
239
267
  };
@@ -270,4 +298,4 @@ EchartsUtil.destroyAll = function() {
270
298
 
271
299
  export default EchartsUtil;
272
300
 
273
- export { echarts };
301
+ export { getEcharts };
@@ -1,22 +1,28 @@
1
1
  // 组件样式统一入口文件
2
2
 
3
3
  // Button 组件样式
4
- @import './button/style/index.scss';
4
+ @import './xt-button/style/index.scss';
5
5
 
6
6
  // Card 组件样式
7
- @import './card/style/index.scss';
7
+ @import './xt-card/style/index.scss';
8
8
 
9
9
  // CardItem 组件样式
10
- @import './card-item/style/index.scss';
10
+ @import './xt-card-item/style/index.scss';
11
11
 
12
12
  // Input 组件样式
13
- @import './input/style/index.scss';
13
+ @import './xt-input/style/index.scss';
14
14
 
15
15
  // FlexBox 组件样式
16
- @import './flex-box/style/index.scss';
16
+ @import './xt-flex-box/style/index.scss';
17
17
 
18
18
  // ConfigProvider 组件样式
19
- @import './config-provider/style/index.scss';
19
+ @import './xt-config-provider/style/index.scss';
20
20
 
21
21
  // Text 组件样式
22
- @import './text/style/index.scss';
22
+ @import './xt-text/style/index.scss';
23
+
24
+ // ExButton 组件样式
25
+ @import './ex-button/style/index.scss';
26
+
27
+ // ExCard 组件样式
28
+ @import './ex-card/style/index.scss';
@@ -23,7 +23,7 @@ export default {
23
23
  type: {
24
24
  type: String,
25
25
  default: '',
26
- validator: (val) => ['primary', 'success', 'warning', 'danger'].includes(val)
26
+ validator: (val) => ['', 'primary', 'success', 'warning', 'danger'].includes(val)
27
27
  },
28
28
  size: {
29
29
  type: String,
@@ -34,7 +34,7 @@
34
34
  </FlexBox>
35
35
  </template>
36
36
  <script>
37
- import FlexBox from '../flex-box/index.vue'
37
+ import FlexBox from '../xt-flex-box/index.vue'
38
38
  export default {
39
39
  name: "XtCardItem",
40
40
  components: {
@@ -2,6 +2,38 @@
2
2
  export default {
3
3
  name: 'XtConfigProvider',
4
4
  inheritAttrs: false,
5
+ provide() {
6
+ return {
7
+ xtConfig: {
8
+ theme: this.theme,
9
+ size: this.size,
10
+ primaryColor: this.primaryColor
11
+ }
12
+ }
13
+ },
14
+ watch: {
15
+ theme(newVal) {
16
+ this.$provide('xtConfig', {
17
+ theme: newVal,
18
+ size: this.size,
19
+ primaryColor: this.primaryColor
20
+ })
21
+ },
22
+ size(newVal) {
23
+ this.$provide('xtConfig', {
24
+ theme: this.theme,
25
+ size: newVal,
26
+ primaryColor: this.primaryColor
27
+ })
28
+ },
29
+ primaryColor(newVal) {
30
+ this.$provide('xtConfig', {
31
+ theme: this.theme,
32
+ size: this.size,
33
+ primaryColor: newVal
34
+ })
35
+ }
36
+ },
5
37
  render(h) {
6
38
  // Vue 2 不支持 Fragment,当 tag="template" 时需要特殊处理
7
39
  // 如果设置了 proxyElement,则不渲染包裹元素,只渲染 slot 内容
@@ -77,6 +109,16 @@ export default {
77
109
  type: [HTMLElement, String, Object],
78
110
  default: null,
79
111
  description: '代理元素,将样式应用到该元素上。支持 HTMLElement、CSS选择器字符串或 ref 对象'
112
+ },
113
+ onThemeChange: {
114
+ type: Function,
115
+ default: null,
116
+ description: '主题改变时的钩子函数,接收参数: { theme, size, primaryColor }'
117
+ },
118
+ onStyleApplied: {
119
+ type: Function,
120
+ default: null,
121
+ description: '样式应用完成时的钩子函数,接收参数: { element, style, theme }'
80
122
  }
81
123
  },
82
124
  computed: {
@@ -257,13 +299,37 @@ export default {
257
299
  if (!element) return
258
300
 
259
301
  const style = this.mergedStyle
302
+ const prevTheme = element.getAttribute('data-theme')
260
303
 
304
+ // 应用样式到代理元素
261
305
  for (const key in style) {
262
306
  element.style.setProperty(key, style[key])
263
307
  }
264
308
 
265
309
  // 设置 data-theme 属性
266
310
  element.setAttribute('data-theme', this.theme)
311
+
312
+ // 触发主题改变钩子(当主题实际发生变化时)
313
+ if (prevTheme !== this.theme && typeof this.onThemeChange === 'function') {
314
+ this.onThemeChange({
315
+ theme: this.theme,
316
+ size: this.size,
317
+ primaryColor: this.primaryColor,
318
+ prevTheme: prevTheme
319
+ })
320
+ }
321
+
322
+ // 触发样式应用完成钩子
323
+ if (typeof this.onStyleApplied === 'function') {
324
+ this.onStyleApplied({
325
+ element: element,
326
+ style: style,
327
+ theme: this.theme,
328
+ size: this.size,
329
+ primaryColor: this.primaryColor
330
+ })
331
+ }
332
+
267
333
  },
268
334
 
269
335
  clearProxyElementStyle() {
@@ -17,7 +17,7 @@ const typeFormatEnum = {
17
17
  datetime: "yyyy-MM-dd HH:mm", month: "yyyy-MM", year: "yyyy", date: "yyyy-MM-dd", quarter: "yyyy-Qq", week: "yyyy-WW"
18
18
  };
19
19
 
20
- import FlexBox from '../flex-box/index.vue'
20
+ import FlexBox from '../xt-flex-box/index.vue'
21
21
  import Quarter from "./quarter.vue";
22
22
  export default {
23
23
  name: "XtDatePicker",
@@ -1,4 +1,6 @@
1
- <template>
1
+
2
+
3
+ <template>
2
4
  <el-popover v-model="popoverVisible" trigger="click" :disabled="disabled" transition="el-zoom-in-top" :placement="placement" :width="popoverWidth" @hide="handleBlur">
3
5
  <div class="quarter-wrapper">
4
6
  <BaseFlexBox content="between">
@@ -15,7 +17,7 @@
15
17
  </template>
16
18
 
17
19
  <script>
18
- import BaseFlexBox from "../flex-box/index.vue";
20
+ import BaseFlexBox from "../xt-flex-box/index.vue";
19
21
  import dateFns from "date-fns";
20
22
  export default {
21
23
  name: "DateQuarter",