xt-element-ui 1.3.0 → 1.3.1

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 (41) hide show
  1. package/docs/components/base/xt-map.md +331 -0
  2. package/docs/components/base/xt-step-price.md +103 -217
  3. package/lib/index.common.js +2109 -38
  4. package/lib/index.css +1 -1
  5. package/lib/index.umd.js +2109 -38
  6. package/lib/index.umd.min.js +5 -5
  7. package/package.json +4 -3
  8. package/src/components/ex-button/index.js +8 -2
  9. package/src/components/ex-chart/index.js +6 -0
  10. package/src/components/ex-date-picker/index.js +8 -2
  11. package/src/components/ex-icon/index.js +6 -0
  12. package/src/components/ex-page/index.js +8 -2
  13. package/src/components/ex-select-tree/index.js +8 -2
  14. package/src/components/ex-table/index.js +6 -0
  15. package/src/components/ex-upload/index.js +6 -0
  16. package/src/components/xt-button/index.js +8 -2
  17. package/src/components/xt-card/index.js +8 -2
  18. package/src/components/xt-card-item/index.js +8 -2
  19. package/src/components/xt-config-provider/index.js +6 -0
  20. package/src/components/xt-flex-box/index.js +8 -2
  21. package/src/components/xt-flex-box/style/index.scss +0 -9
  22. package/src/components/xt-grid-box/index.js +8 -2
  23. package/src/components/xt-grid-item/index.js +7 -1
  24. package/src/components/xt-input/index.js +8 -2
  25. package/src/components/xt-map/adapters/amap.js +235 -0
  26. package/src/components/xt-map/adapters/baidu.js +254 -0
  27. package/src/components/xt-map/adapters/base.js +267 -0
  28. package/src/components/xt-map/adapters/index.js +29 -0
  29. package/src/components/xt-map/adapters/tianditu.js +242 -0
  30. package/src/components/xt-map/config/xt-map-config.js +197 -0
  31. package/src/components/xt-map/index.js +22 -0
  32. package/src/components/xt-map/index.vue +351 -0
  33. package/src/components/xt-map/loaders/script-loader.js +114 -0
  34. package/src/components/xt-map/provider.vue +200 -0
  35. package/src/components/xt-map/style/index.scss +77 -0
  36. package/src/components/xt-step-price/index.js +9 -0
  37. package/src/components/xt-step-price-item/index.js +6 -0
  38. package/src/components/xt-step-price-item/index.vue +3 -1
  39. package/src/components/xt-text/index.js +8 -2
  40. package/src/components/xt-time/index.js +6 -0
  41. package/src/index.js +6 -0
@@ -0,0 +1,77 @@
1
+ .xt-map-wrapper {
2
+ position: relative;
3
+ width: 100%;
4
+ height: 100%;
5
+ overflow: hidden;
6
+ border-radius: 4px;
7
+ }
8
+
9
+ .xt-map-container {
10
+ width: 100%;
11
+ height: 100%;
12
+ background-color: var(--xt-map-bg, #f5f5f5);
13
+ position: relative;
14
+ }
15
+
16
+ .xt-map-container[data-theme="dark"] {
17
+ background-color: #1a1a1a;
18
+ }
19
+
20
+ .xt-map-loading {
21
+ position: absolute;
22
+ top: 50%;
23
+ left: 50%;
24
+ transform: translate(-50%, -50%);
25
+ padding: 12px 20px;
26
+ background-color: rgba(255, 255, 255, 0.9);
27
+ border-radius: 6px;
28
+ color: #606266;
29
+ font-size: 14px;
30
+ box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
31
+ z-index: 10;
32
+ }
33
+
34
+ .xt-map-container[data-theme="dark"] + .xt-map-loading,
35
+ .xt-map-wrapper[data-theme="dark"] .xt-map-loading {
36
+ background-color: rgba(30, 30, 30, 0.9);
37
+ color: #c0c4cc;
38
+ }
39
+
40
+ .xt-map-error {
41
+ position: absolute;
42
+ top: 50%;
43
+ left: 50%;
44
+ transform: translate(-50%, -50%);
45
+ padding: 12px 20px;
46
+ background-color: rgba(254, 235, 235, 0.95);
47
+ border: 1px solid #fbc4c4;
48
+ border-radius: 6px;
49
+ color: #f56c6c;
50
+ font-size: 14px;
51
+ text-align: center;
52
+ max-width: 80%;
53
+ z-index: 10;
54
+ }
55
+
56
+ .xt-map-container[data-theme="dark"] + .xt-map-error,
57
+ .xt-map-wrapper[data-theme="dark"] .xt-map-error {
58
+ background-color: rgba(60, 30, 30, 0.95);
59
+ border-color: #7a3a3a;
60
+ color: #f56c6c;
61
+ }
62
+
63
+ /* 暗黑模式下对天地图/百度的瓦片反色滤镜兜底 */
64
+ .xt-map-container[data-theme="dark"] img {
65
+ /* 各适配器内部会自行处理滤镜,这里仅做最低限度兜底 */
66
+ }
67
+
68
+ /* 暗黑模式下覆盖层的辅助 CSS 变量 */
69
+ .xt-map-container[data-theme="dark"] {
70
+ --xt-map-overlay-bg: rgba(30, 30, 30, 0.9);
71
+ --xt-map-overlay-color: #c0c4cc;
72
+ }
73
+
74
+ .xt-map-container[data-theme="light"] {
75
+ --xt-map-overlay-bg: rgba(255, 255, 255, 0.95);
76
+ --xt-map-overlay-color: #606266;
77
+ }
@@ -1,2 +1,11 @@
1
1
  import XtStepPrice from './index.vue'
2
+ import XtStepPriceItem from '../xt-step-price-item/index.vue'
3
+
4
+ XtStepPrice.install = function (Vue) {
5
+ Vue.component(XtStepPrice.name, XtStepPrice)
6
+ Vue.component(XtStepPriceItem.name, XtStepPriceItem)
7
+ }
8
+
9
+ // 同时导出组件和 install 方法,支持多种引入方式
2
10
  export default XtStepPrice
11
+ export { XtStepPrice, XtStepPriceItem }
@@ -1,2 +1,8 @@
1
1
  import XtStepPriceItem from './index.vue'
2
+
3
+ XtStepPriceItem.install = function (Vue) {
4
+ Vue.component(XtStepPriceItem.name, XtStepPriceItem)
5
+ }
6
+
2
7
  export default XtStepPriceItem
8
+ export { XtStepPriceItem }
@@ -8,6 +8,7 @@
8
8
  v-model.number="minInput"
9
9
  :disabled="disabled || minLocked"
10
10
  size="small"
11
+ placeholder="下限"
11
12
  class="xt-step-price-item__input"
12
13
  @blur="onMinBlur"
13
14
  />
@@ -17,6 +18,7 @@
17
18
  v-model.number="maxInput"
18
19
  :disabled="disabled"
19
20
  size="small"
21
+ placeholder="上限"
20
22
  class="xt-step-price-item__input"
21
23
  @blur="onMaxBlur"
22
24
  />
@@ -84,7 +86,7 @@ export default {
84
86
  keyPrice() { return (this.fieldKeys && this.fieldKeys.price) || 'price' },
85
87
  finalRightBracket() {
86
88
  if (this.rightBracket !== null && this.rightBracket !== undefined && this.rightBracket !== '') return this.rightBracket
87
- return this.itemsLength === 1 ? ']' : ')'
89
+ return this.isLast ? ']' : ')'
88
90
  },
89
91
  finalLeftBracket() {
90
92
  return (this.leftBracket === null || this.leftBracket === undefined) ? '[' : this.leftBracket
@@ -1,2 +1,8 @@
1
- import XtText from './index.vue'
2
- export default XtText
1
+ import XtText from './index.vue'
2
+
3
+ XtText.install = function (Vue) {
4
+ Vue.component(XtText.name, XtText)
5
+ }
6
+
7
+ export default XtText
8
+ export { XtText }
@@ -1,2 +1,8 @@
1
1
  import XtTime from './index.vue'
2
+
3
+ XtTime.install = function (Vue) {
4
+ Vue.component(XtTime.name, XtTime)
5
+ }
6
+
2
7
  export default XtTime
8
+ export { XtTime }
package/src/index.js CHANGED
@@ -26,6 +26,8 @@ import XtText from './components/xt-text'
26
26
  import XtTime from './components/xt-time'
27
27
  import XtStepPrice from './components/xt-step-price'
28
28
  import XtStepPriceItem from './components/xt-step-price-item'
29
+ import XtMap from './components/xt-map'
30
+ import { XtMapProvider } from './components/xt-map'
29
31
  import XtGridBox from './components/xt-grid-box'
30
32
  import XtGridItem from './components/xt-grid-item'
31
33
  import ExDatePicker from './components/ex-date-picker'
@@ -50,6 +52,8 @@ const components = [
50
52
  XtTime,
51
53
  XtStepPrice,
52
54
  XtStepPriceItem,
55
+ XtMap,
56
+ XtMapProvider,
53
57
  XtGridBox,
54
58
  XtGridItem,
55
59
  ExDatePicker,
@@ -140,6 +144,8 @@ export default {
140
144
  XtTime,
141
145
  XtStepPrice,
142
146
  XtStepPriceItem,
147
+ XtMap,
148
+ XtMapProvider,
143
149
  XtGridBox,
144
150
  XtGridItem,
145
151
  ExDatePicker,