xt-element-ui 1.3.2 → 1.3.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 (112) hide show
  1. package/CHANGELOG.md +72 -72
  2. package/LICENSE +21 -21
  3. package/README.md +240 -240
  4. package/docs/README.md +100 -100
  5. package/docs/components/base/xt-button.md +114 -114
  6. package/docs/components/base/xt-card-item.md +104 -104
  7. package/docs/components/base/xt-card.md +108 -108
  8. package/docs/components/base/xt-config-provider.md +199 -199
  9. package/docs/components/base/xt-flex-box.md +115 -115
  10. package/docs/components/base/xt-grid-box.md +302 -302
  11. package/docs/components/base/xt-input.md +150 -150
  12. package/docs/components/base/xt-map-provider.md +23 -0
  13. package/docs/components/base/xt-map.md +331 -331
  14. package/docs/components/base/xt-step-price.md +165 -165
  15. package/docs/components/base/xt-text.md +212 -212
  16. package/docs/components/base/xt-time.md +165 -165
  17. package/docs/components/extend/ex-bar.md +67 -67
  18. package/docs/components/extend/ex-button.md +62 -62
  19. package/docs/components/extend/ex-card.md +86 -86
  20. package/docs/components/extend/ex-chart.md +463 -463
  21. package/docs/components/extend/ex-icon.md +189 -189
  22. package/docs/components/extend/ex-line.md +70 -70
  23. package/docs/components/extend/ex-multi.md +155 -155
  24. package/docs/components/extend/ex-pie.md +69 -69
  25. package/docs/components/extend/ex-select-tree.md +210 -210
  26. package/docs/components/extend/ex-table.md +590 -590
  27. package/docs/components/extend/ex-upload.md +134 -134
  28. package/docs/components/utils/size.md +147 -147
  29. package/docs/components/utils/theme.md +182 -182
  30. package/lib/index.common.js +4131 -4162
  31. package/lib/index.css +1 -1
  32. package/lib/index.umd.js +4099 -4129
  33. package/lib/index.umd.min.js +3 -3
  34. package/package.json +80 -81
  35. package/src/components/ex-button/index.js +7 -7
  36. package/src/components/ex-button/index.vue +66 -66
  37. package/src/components/ex-button/style/index.scss +67 -67
  38. package/src/components/ex-card/index.js +7 -7
  39. package/src/components/ex-card/index.vue +68 -68
  40. package/src/components/ex-card/style/index.scss +73 -73
  41. package/src/components/ex-chart/index.js +7 -7
  42. package/src/components/ex-chart/index.vue +136 -136
  43. package/src/components/ex-date-picker/index.js +7 -7
  44. package/src/components/ex-icon/index.js +7 -7
  45. package/src/components/ex-icon/index.vue +168 -168
  46. package/src/components/ex-icon/style/index.scss +7 -7
  47. package/src/components/ex-page/index.js +7 -7
  48. package/src/components/ex-select-tree/index.js +7 -7
  49. package/src/components/ex-table/ExTableCell.vue +22 -22
  50. package/src/components/ex-table/index.js +7 -7
  51. package/src/components/ex-table/virtualScrollData.js +35 -35
  52. package/src/components/ex-upload/index.js +7 -7
  53. package/src/components/index.scss +39 -39
  54. package/src/components/xt-button/index.js +7 -7
  55. package/src/components/xt-button/index.vue +97 -97
  56. package/src/components/xt-card/index.js +7 -7
  57. package/src/components/xt-card/style/index.scss +48 -48
  58. package/src/components/xt-card-item/index.js +7 -7
  59. package/src/components/xt-card-item/style/index copy.scss +71 -71
  60. package/src/components/xt-card-item/style/index.scss +82 -82
  61. package/src/components/xt-config-provider/index.js +7 -7
  62. package/src/components/xt-config-provider/index.vue +362 -362
  63. package/src/components/xt-config-provider/style/index.scss +11 -11
  64. package/src/components/xt-flex-box/index.js +7 -7
  65. package/src/components/xt-flex-box/style/index.scss +81 -81
  66. package/src/components/xt-grid-box/index.js +7 -7
  67. package/src/components/xt-grid-box/style/index.scss +92 -92
  68. package/src/components/xt-grid-item/index.js +7 -7
  69. package/src/components/xt-grid-item/index.vue +106 -106
  70. package/src/components/xt-input/index.js +7 -7
  71. package/src/components/xt-input/index.vue +66 -66
  72. package/src/components/xt-input/style/index.scss +84 -84
  73. package/src/components/xt-map/adapters/amap.js +235 -235
  74. package/src/components/xt-map/adapters/baidu.js +254 -254
  75. package/src/components/xt-map/adapters/base.js +267 -267
  76. package/src/components/xt-map/adapters/index.js +29 -29
  77. package/src/components/xt-map/adapters/tianditu.js +242 -242
  78. package/src/components/xt-map/config/xt-map-config.js +197 -197
  79. package/src/components/xt-map/index.js +8 -30
  80. package/src/components/xt-map/index.vue +351 -351
  81. package/src/components/xt-map/loaders/script-loader.js +114 -114
  82. package/src/components/xt-map/provider.vue +200 -200
  83. package/src/components/xt-map/style/index.scss +77 -77
  84. package/src/components/xt-map-provider/index.js +8 -0
  85. package/src/components/xt-step-price/index.js +10 -10
  86. package/src/components/xt-step-price/index.vue +272 -272
  87. package/src/components/xt-step-price/style/index.scss +123 -123
  88. package/src/components/xt-step-price-item/index.js +7 -7
  89. package/src/components/xt-step-price-item/index.vue +187 -187
  90. package/src/components/xt-text/index.js +7 -7
  91. package/src/components/xt-text/index.vue +1 -1
  92. package/src/components/xt-text/style/index.scss +92 -92
  93. package/src/components/xt-time/index.js +7 -7
  94. package/src/components/xt-time/index.vue +313 -313
  95. package/src/components/xt-time/style/index.scss +23 -23
  96. package/src/config/element-registry.js +135 -135
  97. package/src/index.js +162 -178
  98. package/src/styles/css-variables.scss +257 -257
  99. package/src/styles/theme/background.scss +5 -5
  100. package/src/styles/theme/border-radius.scss +3 -3
  101. package/src/styles/theme/borders.scss +3 -3
  102. package/src/styles/theme/colors.scss +101 -101
  103. package/src/styles/theme/component-variables.scss +69 -69
  104. package/src/styles/theme/dark-variables.scss +28 -28
  105. package/src/styles/theme/font.scss +12 -12
  106. package/src/styles/theme/index.scss +11 -11
  107. package/src/styles/theme/shadows.scss +2 -2
  108. package/src/styles/theme/spacing.scss +4 -4
  109. package/src/styles/theme/transitions.scss +2 -2
  110. package/src/styles/theme/typography.scss +4 -4
  111. package/src/styles/variables-export.scss +85 -85
  112. package/src/utils/index.js +191 -202
@@ -1,165 +1,165 @@
1
- ## XtTime 时间组件
2
-
3
- 集三种模式于一身的时间组件:当前时间实时显示、目标时间倒计时、日期文本格式化展示。
4
-
5
- ## 基本用法
6
-
7
- ### 三种显示模式
8
-
9
- ::: demo 三种显示模式
10
- ```vue
11
- <template>
12
- <div style="display: flex; flex-direction: column; gap: 12px;">
13
- <div>当前时间:<XtTime type="now" /></div>
14
- <div>距 2026-12-31:<XtTime type="countdown" target-time="2026-12-31 23:59:59" /></div>
15
- <div>创建时间:<XtTime type="text" :value="1704067200000" /></div>
16
- </div>
17
- </template>
18
- ```
19
- :::
20
-
21
- ## 属性说明
22
-
23
- ### 通用属性
24
-
25
- | 属性 | 类型 | 默认值 | 可选值 | 说明 |
26
- |------|------|--------|--------|------|
27
- | `type` | String | `now` | `now`、`countdown`、`text` | 显示模式 |
28
- | `format` | String | `YYYY-MM-DD HH:mm:ss` | - | `now` / `text` 模式下的日期格式 |
29
- | `size` | String | base | `extra-large`、`large`、`medium`、`base`、`small`、`extra-small` | 字体大小 |
30
- | `type-color` | String | - | `primary`、`success`、`warning`、`danger` | 颜色语义 |
31
- | `bold` | Boolean | false | - | 是否加粗 |
32
- | `prefix` | String | - | - | 前缀文本 |
33
- | `suffix` | String | - | - | 后缀文本 |
34
- | `empty-text` | String | `-` | - | 空值/无效值时展示的占位文本 |
35
- | `hide-empty` | Boolean | false | - | 值为空时是否不渲染内容 |
36
- | `interval` | Number | `1000` | `>= 100` | 刷新间隔(毫秒),仅 `now` / `countdown` 生效 |
37
-
38
- ### text 模式专属属性
39
-
40
- | 属性 | 类型 | 默认值 | 说明 |
41
- |------|------|--------|------|
42
- | `value` | String / Number / Date | - | 待格式化的日期值,支持时间戳(10 位秒或 13 位毫秒)、Date 对象、`2024-01-01 12:00:00` 等字符串 |
43
-
44
- ### countdown 模式专属属性
45
-
46
- | 属性 | 类型 | 默认值 | 可选值 | 说明 |
47
- |------|------|--------|--------|------|
48
- | `target-time` | String / Number / Date | - | - | 目标时间,取值同 `value` |
49
- | `countdown-format` | String | `DHMS` | `DHMS`、`HMS`、`MS`、`SEC` | 倒计时显示格式 |
50
- | `finished-text` | String | `已结束` | - | 倒计时结束后显示的文本 |
51
-
52
- ## 事件
53
-
54
- | 事件名 | 说明 | 参数 |
55
- |--------|------|------|
56
- | `finish` | 倒计时结束触发(仅 `countdown` 模式) | - |
57
- | `click` | 点击组件触发 | `(event: MouseEvent)` |
58
-
59
- ## 插槽
60
-
61
- | 插槽 | 说明 |
62
- |------|------|
63
- | `prefix` | 前缀插槽,优先级高于 `prefix` 属性 |
64
- | `suffix` | 后缀插槽,优先级高于 `suffix` 属性 |
65
- | `finished` | 倒计时结束态自定义内容(仅 `countdown` 模式) |
66
- | `default` | 自定义整体内容,覆盖默认渲染 |
67
-
68
- ## 示例
69
-
70
- ### 当前时间(now 模式)
71
-
72
- ::: demo 当前时间
73
- ```vue
74
- <template>
75
- <div style="display: flex; flex-direction: column; gap: 8px;">
76
- <XtTime type="now" />
77
- <XtTime type="now" format="YYYY年MM月DD日 HH时mm分ss秒" type-color="primary" bold />
78
- <XtTime type="now" format="HH:mm:ss" size="extra-large" type-color="danger" />
79
- </div>
80
- </template>
81
- ```
82
- :::
83
-
84
- ### 日期文本(text 模式)
85
-
86
- `value` 支持时间戳、字符串、Date 对象,自动识别并格式化:
87
-
88
- ::: demo 日期文本
89
- ```vue
90
- <template>
91
- <div style="display: flex; flex-direction: column; gap: 8px;">
92
- <XtTime type="text" value="2024-01-01 12:00:00" />
93
- <XtTime type="text" :value="1704067200" format="YYYY-MM-DD" />
94
- <XtTime type="text" :value="new Date('2024-06-15')" format="YYYY/MM/DD" />
95
- <XtTime type="text" value="无效值" />
96
- <XtTime type="text" value="2024-01-01" prefix="创建于 " type-color="success" />
97
- </div>
98
- </template>
99
- ```
100
- :::
101
-
102
- ### 倒计时(countdown 模式)
103
-
104
- ::: demo 倒计时
105
- ```vue
106
- <template>
107
- <div style="display: flex; flex-direction: column; gap: 8px;">
108
- <XtTime type="countdown" target-time="2026-12-31 23:59:59" />
109
- <XtTime type="countdown" target-time="2026-12-31 23:59:59" countdown-format="HMS" type-color="primary" />
110
- <XtTime type="countdown" target-time="2026-12-31 23:59:59" countdown-format="MS" />
111
- <XtTime type="countdown" target-time="2026-12-31 23:59:59" countdown-format="SEC" suffix="后结束" />
112
- <XtTime
113
- type="countdown"
114
- :target-time="Date.now() + 5000"
115
- @finish="onFinish"
116
- />
117
- </div>
118
- </template>
119
-
120
- <script>
121
- export default {
122
- methods: {
123
- onFinish() {
124
- this.$message && this.$message('倒计时结束!')
125
- }
126
- }
127
- }
128
- </script>
129
- ```
130
- :::
131
-
132
- ### 自定义结束态(finished 插槽)
133
-
134
- ::: demo 自定义结束态
135
- ```vue
136
- <template>
137
- <XtTime type="countdown" :target-time="Date.now() + 3000">
138
- <template #finished>
139
- <span style="color: #67c23a;">🎉 活动已开始,欢迎参加</span>
140
- </template>
141
- </XtTime>
142
- </template>
143
- ```
144
- :::
145
-
146
- ### 前缀 / 后缀
147
-
148
- ::: demo 前缀后缀
149
- ```vue
150
- <template>
151
- <div style="display: flex; flex-direction: column; gap: 8px;">
152
- <XtTime type="now" prefix="当前时间:" />
153
- <XtTime type="countdown" target-time="2026-12-31 23:59:59" suffix=" 后截止" type-color="warning" />
154
- <XtTime type="text" value="2024-01-01 08:00:00" prefix="入职日期:" suffix="(周一)" />
155
- </div>
156
- </template>
157
- ```
158
- :::
159
-
160
- ## 注意事项
161
-
162
- - `value` / `target-time` 对**纯数字时间戳**自动识别:10 位数字视作秒级时间戳,13 位数字视作毫秒级时间戳。
163
- - `countdown` 模式下组件销毁、切出 `keep-alive` 缓存时会自动清理定时器,避免内存泄漏。
164
- - `type` 从 `now`/`countdown` 切换为 `text`(或反向),组件会自动重置定时器。
165
- - 如需不同的时区展示,可在父组件中将 `value` 先转换为本地时区 Date 对象再传入。
1
+ ## XtTime 时间组件
2
+
3
+ 集三种模式于一身的时间组件:当前时间实时显示、目标时间倒计时、日期文本格式化展示。
4
+
5
+ ## 基本用法
6
+
7
+ ### 三种显示模式
8
+
9
+ ::: demo 三种显示模式
10
+ ```vue
11
+ <template>
12
+ <div style="display: flex; flex-direction: column; gap: 12px;">
13
+ <div>当前时间:<XtTime type="now" /></div>
14
+ <div>距 2026-12-31:<XtTime type="countdown" target-time="2026-12-31 23:59:59" /></div>
15
+ <div>创建时间:<XtTime type="text" :value="1704067200000" /></div>
16
+ </div>
17
+ </template>
18
+ ```
19
+ :::
20
+
21
+ ## 属性说明
22
+
23
+ ### 通用属性
24
+
25
+ | 属性 | 类型 | 默认值 | 可选值 | 说明 |
26
+ |------|------|--------|--------|------|
27
+ | `type` | String | `now` | `now`、`countdown`、`text` | 显示模式 |
28
+ | `format` | String | `YYYY-MM-DD HH:mm:ss` | - | `now` / `text` 模式下的日期格式 |
29
+ | `size` | String | base | `extra-large`、`large`、`medium`、`base`、`small`、`extra-small` | 字体大小 |
30
+ | `type-color` | String | - | `primary`、`success`、`warning`、`danger` | 颜色语义 |
31
+ | `bold` | Boolean | false | - | 是否加粗 |
32
+ | `prefix` | String | - | - | 前缀文本 |
33
+ | `suffix` | String | - | - | 后缀文本 |
34
+ | `empty-text` | String | `-` | - | 空值/无效值时展示的占位文本 |
35
+ | `hide-empty` | Boolean | false | - | 值为空时是否不渲染内容 |
36
+ | `interval` | Number | `1000` | `>= 100` | 刷新间隔(毫秒),仅 `now` / `countdown` 生效 |
37
+
38
+ ### text 模式专属属性
39
+
40
+ | 属性 | 类型 | 默认值 | 说明 |
41
+ |------|------|--------|------|
42
+ | `value` | String / Number / Date | - | 待格式化的日期值,支持时间戳(10 位秒或 13 位毫秒)、Date 对象、`2024-01-01 12:00:00` 等字符串 |
43
+
44
+ ### countdown 模式专属属性
45
+
46
+ | 属性 | 类型 | 默认值 | 可选值 | 说明 |
47
+ |------|------|--------|--------|------|
48
+ | `target-time` | String / Number / Date | - | - | 目标时间,取值同 `value` |
49
+ | `countdown-format` | String | `DHMS` | `DHMS`、`HMS`、`MS`、`SEC` | 倒计时显示格式 |
50
+ | `finished-text` | String | `已结束` | - | 倒计时结束后显示的文本 |
51
+
52
+ ## 事件
53
+
54
+ | 事件名 | 说明 | 参数 |
55
+ |--------|------|------|
56
+ | `finish` | 倒计时结束触发(仅 `countdown` 模式) | - |
57
+ | `click` | 点击组件触发 | `(event: MouseEvent)` |
58
+
59
+ ## 插槽
60
+
61
+ | 插槽 | 说明 |
62
+ |------|------|
63
+ | `prefix` | 前缀插槽,优先级高于 `prefix` 属性 |
64
+ | `suffix` | 后缀插槽,优先级高于 `suffix` 属性 |
65
+ | `finished` | 倒计时结束态自定义内容(仅 `countdown` 模式) |
66
+ | `default` | 自定义整体内容,覆盖默认渲染 |
67
+
68
+ ## 示例
69
+
70
+ ### 当前时间(now 模式)
71
+
72
+ ::: demo 当前时间
73
+ ```vue
74
+ <template>
75
+ <div style="display: flex; flex-direction: column; gap: 8px;">
76
+ <XtTime type="now" />
77
+ <XtTime type="now" format="YYYY年MM月DD日 HH时mm分ss秒" type-color="primary" bold />
78
+ <XtTime type="now" format="HH:mm:ss" size="extra-large" type-color="danger" />
79
+ </div>
80
+ </template>
81
+ ```
82
+ :::
83
+
84
+ ### 日期文本(text 模式)
85
+
86
+ `value` 支持时间戳、字符串、Date 对象,自动识别并格式化:
87
+
88
+ ::: demo 日期文本
89
+ ```vue
90
+ <template>
91
+ <div style="display: flex; flex-direction: column; gap: 8px;">
92
+ <XtTime type="text" value="2024-01-01 12:00:00" />
93
+ <XtTime type="text" :value="1704067200" format="YYYY-MM-DD" />
94
+ <XtTime type="text" :value="new Date('2024-06-15')" format="YYYY/MM/DD" />
95
+ <XtTime type="text" value="无效值" />
96
+ <XtTime type="text" value="2024-01-01" prefix="创建于 " type-color="success" />
97
+ </div>
98
+ </template>
99
+ ```
100
+ :::
101
+
102
+ ### 倒计时(countdown 模式)
103
+
104
+ ::: demo 倒计时
105
+ ```vue
106
+ <template>
107
+ <div style="display: flex; flex-direction: column; gap: 8px;">
108
+ <XtTime type="countdown" target-time="2026-12-31 23:59:59" />
109
+ <XtTime type="countdown" target-time="2026-12-31 23:59:59" countdown-format="HMS" type-color="primary" />
110
+ <XtTime type="countdown" target-time="2026-12-31 23:59:59" countdown-format="MS" />
111
+ <XtTime type="countdown" target-time="2026-12-31 23:59:59" countdown-format="SEC" suffix="后结束" />
112
+ <XtTime
113
+ type="countdown"
114
+ :target-time="Date.now() + 5000"
115
+ @finish="onFinish"
116
+ />
117
+ </div>
118
+ </template>
119
+
120
+ <script>
121
+ export default {
122
+ methods: {
123
+ onFinish() {
124
+ this.$message && this.$message('倒计时结束!')
125
+ }
126
+ }
127
+ }
128
+ </script>
129
+ ```
130
+ :::
131
+
132
+ ### 自定义结束态(finished 插槽)
133
+
134
+ ::: demo 自定义结束态
135
+ ```vue
136
+ <template>
137
+ <XtTime type="countdown" :target-time="Date.now() + 3000">
138
+ <template #finished>
139
+ <span style="color: #67c23a;">🎉 活动已开始,欢迎参加</span>
140
+ </template>
141
+ </XtTime>
142
+ </template>
143
+ ```
144
+ :::
145
+
146
+ ### 前缀 / 后缀
147
+
148
+ ::: demo 前缀后缀
149
+ ```vue
150
+ <template>
151
+ <div style="display: flex; flex-direction: column; gap: 8px;">
152
+ <XtTime type="now" prefix="当前时间:" />
153
+ <XtTime type="countdown" target-time="2026-12-31 23:59:59" suffix=" 后截止" type-color="warning" />
154
+ <XtTime type="text" value="2024-01-01 08:00:00" prefix="入职日期:" suffix="(周一)" />
155
+ </div>
156
+ </template>
157
+ ```
158
+ :::
159
+
160
+ ## 注意事项
161
+
162
+ - `value` / `target-time` 对**纯数字时间戳**自动识别:10 位数字视作秒级时间戳,13 位数字视作毫秒级时间戳。
163
+ - `countdown` 模式下组件销毁、切出 `keep-alive` 缓存时会自动清理定时器,避免内存泄漏。
164
+ - `type` 从 `now`/`countdown` 切换为 `text`(或反向),组件会自动重置定时器。
165
+ - 如需不同的时区展示,可在父组件中将 `value` 先转换为本地时区 Date 对象再传入。
@@ -1,68 +1,68 @@
1
- ## ExBar - 柱状图组件
2
-
3
- 基于 ECharts 封装的柱状图组件。
4
-
5
- ## 基本用法
6
-
7
- ::: demo 柱状图基础示例
8
- ```vue
9
- <template>
10
- <ExChart type="bar" :chartData="chartData" style="height: 400px;" />
11
- </template>
12
-
13
- <script>
14
- export default {
15
- data() {
16
- return {
17
- chartData: [
18
- { name: '张三', value: 65 },
19
- { name: '李四', value: 78 },
20
- { name: '王五', value: 89 },
21
- { name: '赵六', value: 95 },
22
- { name: '钱七', value: 72 }
23
- ]
24
- }
25
- }
26
- }
27
- </script>
28
- ```
29
- :::
30
-
31
- ## 显示标记点
32
-
33
- ::: demo 显示最大值和最小值标记点
34
- ```vue
35
- <template>
36
- <ExChart type="bar" :chartData="chartData" :markPoint="true" style="height: 400px;" />
37
- </template>
38
-
39
- <script>
40
- export default {
41
- data() {
42
- return {
43
- chartData: [
44
- { name: '华东区', value: 1250 },
45
- { name: '华南区', value: 980 },
46
- { name: '华北区', value: 890 },
47
- { name: '西南区', value: 720 },
48
- { name: '西北区', value: 560 }
49
- ]
50
- }
51
- }
52
- }
53
- </script>
54
- ```
55
- :::
56
-
57
- ## 属性说明
58
-
59
- | 属性 | 类型 | 默认值 | 说明 |
60
- |------|------|--------|------|
61
- | `chartData` | Array | [] | 图表数据 |
62
- | `theme` | String | '' | 主题名称 |
63
- | `size` | String | 'medium' | 尺寸 |
64
- | `markPoint` | Boolean | false | 是否显示标记点 |
65
- | `showZoom` | Boolean | false | 是否显示缩放功能 |
66
- | `reverse` | Boolean | false | 是否反转坐标轴 |
67
- | `longLable` | Boolean | false | 是否启用长标签模式 |
1
+ ## ExBar - 柱状图组件
2
+
3
+ 基于 ECharts 封装的柱状图组件。
4
+
5
+ ## 基本用法
6
+
7
+ ::: demo 柱状图基础示例
8
+ ```vue
9
+ <template>
10
+ <ExChart type="bar" :chartData="chartData" style="height: 400px;" />
11
+ </template>
12
+
13
+ <script>
14
+ export default {
15
+ data() {
16
+ return {
17
+ chartData: [
18
+ { name: '张三', value: 65 },
19
+ { name: '李四', value: 78 },
20
+ { name: '王五', value: 89 },
21
+ { name: '赵六', value: 95 },
22
+ { name: '钱七', value: 72 }
23
+ ]
24
+ }
25
+ }
26
+ }
27
+ </script>
28
+ ```
29
+ :::
30
+
31
+ ## 显示标记点
32
+
33
+ ::: demo 显示最大值和最小值标记点
34
+ ```vue
35
+ <template>
36
+ <ExChart type="bar" :chartData="chartData" :markPoint="true" style="height: 400px;" />
37
+ </template>
38
+
39
+ <script>
40
+ export default {
41
+ data() {
42
+ return {
43
+ chartData: [
44
+ { name: '华东区', value: 1250 },
45
+ { name: '华南区', value: 980 },
46
+ { name: '华北区', value: 890 },
47
+ { name: '西南区', value: 720 },
48
+ { name: '西北区', value: 560 }
49
+ ]
50
+ }
51
+ }
52
+ }
53
+ </script>
54
+ ```
55
+ :::
56
+
57
+ ## 属性说明
58
+
59
+ | 属性 | 类型 | 默认值 | 说明 |
60
+ |------|------|--------|------|
61
+ | `chartData` | Array | [] | 图表数据 |
62
+ | `theme` | String | '' | 主题名称 |
63
+ | `size` | String | 'medium' | 尺寸 |
64
+ | `markPoint` | Boolean | false | 是否显示标记点 |
65
+ | `showZoom` | Boolean | false | 是否显示缩放功能 |
66
+ | `reverse` | Boolean | false | 是否反转坐标轴 |
67
+ | `longLable` | Boolean | false | 是否启用长标签模式 |
68
68
  | `energyType` | String | '' | Y轴单位 |
@@ -1,62 +1,62 @@
1
- ## ExButton 按钮
2
-
3
- 基于 ElementUI 按钮封装,支持防抖和字体大小配置。
4
-
5
- ## 基础用法
6
-
7
- ::: demo 按钮基础示例
8
- ```vue
9
- <template>
10
- <div>
11
- <ex-button>默认按钮</ex-button>
12
- <ex-button type="primary">主要按钮</ex-button>
13
- <ex-button type="success">成功按钮</ex-button>
14
- </div>
15
- </template>
16
- ```
17
- :::
18
-
19
- ## 字体大小
20
-
21
- 支持三种尺寸:`small`、`medium`、`large`
22
-
23
- ::: demo 按钮字体大小示例
24
- ```vue
25
- <template>
26
- <div>
27
- <ex-button size="mini">迷你按钮</ex-button>
28
- <ex-button size="small">小按钮</ex-button>
29
- <ex-button size="medium">中按钮</ex-button>
30
- <ex-button size="large">大按钮</ex-button>
31
- </div>
32
- </template>
33
- ```
34
- :::
35
-
36
- ## 继承 ConfigProvider 配置
37
-
38
- 当 ExButton 被包裹在 XtConfigProvider 中时,会自动继承字体大小配置:
39
-
40
- ::: demo 按钮继承字体大小示例
41
- ```vue
42
- <template>
43
- <xt-config-provider size="large">
44
- <ex-button>自动继承大字体</ex-button>
45
- </xt-config-provider>
46
- </template>
47
- ```
48
- :::
49
-
50
- ## Attributes
51
-
52
- | 参数 | 说明 | 类型 | 可选值 | 默认值 |
53
- |------|------|------|--------|--------|
54
- | type | 按钮类型 | string | primary/success/warning/danger | — |
55
- | size | 按钮尺寸 | string | small/medium/large | — |
56
- | throttle | 点击节流时间 (ms) | number | — | 0 |
57
-
58
- ## Events
59
-
60
- | 事件名 | 说明 | 回调参数 |
61
- |--------|------|----------|
62
- | click | 点击按钮时触发 | — |
1
+ ## ExButton 按钮
2
+
3
+ 基于 ElementUI 按钮封装,支持防抖和字体大小配置。
4
+
5
+ ## 基础用法
6
+
7
+ ::: demo 按钮基础示例
8
+ ```vue
9
+ <template>
10
+ <div>
11
+ <ex-button>默认按钮</ex-button>
12
+ <ex-button type="primary">主要按钮</ex-button>
13
+ <ex-button type="success">成功按钮</ex-button>
14
+ </div>
15
+ </template>
16
+ ```
17
+ :::
18
+
19
+ ## 字体大小
20
+
21
+ 支持三种尺寸:`small`、`medium`、`large`
22
+
23
+ ::: demo 按钮字体大小示例
24
+ ```vue
25
+ <template>
26
+ <div>
27
+ <ex-button size="mini">迷你按钮</ex-button>
28
+ <ex-button size="small">小按钮</ex-button>
29
+ <ex-button size="medium">中按钮</ex-button>
30
+ <ex-button size="large">大按钮</ex-button>
31
+ </div>
32
+ </template>
33
+ ```
34
+ :::
35
+
36
+ ## 继承 ConfigProvider 配置
37
+
38
+ 当 ExButton 被包裹在 XtConfigProvider 中时,会自动继承字体大小配置:
39
+
40
+ ::: demo 按钮继承字体大小示例
41
+ ```vue
42
+ <template>
43
+ <xt-config-provider size="large">
44
+ <ex-button>自动继承大字体</ex-button>
45
+ </xt-config-provider>
46
+ </template>
47
+ ```
48
+ :::
49
+
50
+ ## Attributes
51
+
52
+ | 参数 | 说明 | 类型 | 可选值 | 默认值 |
53
+ |------|------|------|--------|--------|
54
+ | type | 按钮类型 | string | primary/success/warning/danger | — |
55
+ | size | 按钮尺寸 | string | small/medium/large | — |
56
+ | throttle | 点击节流时间 (ms) | number | — | 0 |
57
+
58
+ ## Events
59
+
60
+ | 事件名 | 说明 | 回调参数 |
61
+ |--------|------|----------|
62
+ | click | 点击按钮时触发 | — |