ele-admin-plus 1.1.9-beta.6 → 1.1.9-beta.8

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 (245) hide show
  1. package/es/ele-alert/index.js +2 -4
  2. package/es/ele-app/plus.d.ts +3 -0
  3. package/es/ele-avatar-group/index.d.ts +1 -1
  4. package/es/ele-avatar-group/index.js +1 -3
  5. package/es/ele-basic-select/index.d.ts +8 -8
  6. package/es/ele-basic-select/index.js +17 -13
  7. package/es/ele-check-card/index.d.ts +2 -2
  8. package/es/ele-check-card/index.js +0 -5
  9. package/es/ele-config-provider/components/receiver-view.d.ts +17 -0
  10. package/es/ele-config-provider/components/receiver-view.js +45 -0
  11. package/es/ele-copyable/index.d.ts +4 -6
  12. package/es/ele-copyable/index.js +1 -5
  13. package/es/ele-cropper/index.d.ts +6 -6
  14. package/es/ele-cropper/index.js +1 -5
  15. package/es/ele-dashboard/index.d.ts +0 -1
  16. package/es/ele-dashboard/index.js +8 -17
  17. package/es/ele-data-table/props.d.ts +2 -2
  18. package/es/ele-dot/index.d.ts +2 -4
  19. package/es/ele-dot/index.js +4 -10
  20. package/es/ele-drawer/index.d.ts +6 -6
  21. package/es/ele-drawer/index.js +14 -11
  22. package/es/ele-dropdown/index.js +6 -10
  23. package/es/ele-dropdown/style/index.scss +2 -2
  24. package/es/ele-edit-tag/index.d.ts +6 -0
  25. package/es/ele-edit-tag/index.js +17 -15
  26. package/es/ele-edit-tag/props.d.ts +4 -0
  27. package/es/ele-edit-tag/props.js +5 -1
  28. package/es/ele-edit-tag/style/index.scss +13 -0
  29. package/es/ele-ellipsis/index.d.ts +3 -3
  30. package/es/ele-ellipsis/index.js +4 -27
  31. package/es/ele-file-list/components/file-grid-item.js +16 -9
  32. package/es/ele-file-list/components/file-grid.js +54 -50
  33. package/es/ele-file-list/components/file-table-item.js +20 -15
  34. package/es/ele-file-list/components/file-table.js +92 -86
  35. package/es/ele-file-list/index.d.ts +4 -4
  36. package/es/ele-file-list/index.js +1 -11
  37. package/es/ele-file-list-tool/index.d.ts +3 -3
  38. package/es/ele-file-list-tool/index.js +2 -2
  39. package/es/ele-icon-select/index.d.ts +22 -10
  40. package/es/ele-icon-select/index.js +33 -10
  41. package/es/ele-icon-select/props.d.ts +6 -1
  42. package/es/ele-icon-select/props.js +6 -1
  43. package/es/ele-icon-select/style/index.js +1 -0
  44. package/es/ele-icon-select/style/index.scss +16 -2
  45. package/es/ele-loading/index.d.ts +0 -2
  46. package/es/ele-loading/index.js +32 -30
  47. package/es/ele-map-picker/components/map-view.d.ts +22 -18
  48. package/es/ele-map-picker/components/map-view.js +77 -50
  49. package/es/ele-map-picker/index.d.ts +5 -3
  50. package/es/ele-map-picker/props.d.ts +6 -4
  51. package/es/ele-map-picker/props.js +5 -3
  52. package/es/ele-map-picker/style/index.scss +1 -1
  53. package/es/ele-menus/index.d.ts +10 -1
  54. package/es/ele-menus/index.js +63 -12
  55. package/es/ele-menus/props.d.ts +8 -0
  56. package/es/ele-menus/props.js +10 -2
  57. package/es/ele-menus/style/index.js +2 -0
  58. package/es/ele-menus/style/index.scss +1 -0
  59. package/es/ele-menus/util.d.ts +15 -3
  60. package/es/ele-menus/util.js +47 -21
  61. package/es/ele-modal/index.d.ts +2 -2
  62. package/es/ele-modal/index.js +14 -8
  63. package/es/ele-modal/style/index.scss +1 -0
  64. package/es/ele-pagination/index.d.ts +6 -6
  65. package/es/ele-pagination/index.js +2 -8
  66. package/es/ele-popconfirm/index.d.ts +3 -3
  67. package/es/ele-popconfirm/style/index.js +1 -1
  68. package/es/ele-popover/index.d.ts +3 -3
  69. package/es/ele-popover/props.d.ts +1 -1
  70. package/es/ele-popover/style/index.js +0 -1
  71. package/es/ele-printer/index.d.ts +6 -6
  72. package/es/ele-printer/index.js +11 -11
  73. package/es/ele-pro-layout/components/pro-header.d.ts +9 -0
  74. package/es/ele-pro-layout/components/pro-header.js +8 -2
  75. package/es/ele-pro-layout/components/pro-sidebar.d.ts +9 -0
  76. package/es/ele-pro-layout/components/pro-sidebar.js +8 -2
  77. package/es/ele-pro-layout/components/pro-sidebox.d.ts +9 -0
  78. package/es/ele-pro-layout/components/pro-sidebox.js +11 -3
  79. package/es/ele-pro-layout/index.d.ts +33 -30
  80. package/es/ele-pro-layout/index.js +16 -17
  81. package/es/ele-pro-layout/props.d.ts +9 -5
  82. package/es/ele-pro-layout/props.js +9 -5
  83. package/es/ele-pro-table/index.d.ts +15 -15
  84. package/es/ele-pro-table/index.js +1 -6
  85. package/es/ele-pro-table/props.d.ts +3 -3
  86. package/es/ele-segmented/index.js +1 -3
  87. package/es/ele-split-panel/index.d.ts +9 -8
  88. package/es/ele-split-panel/index.js +63 -59
  89. package/es/ele-steps/index.d.ts +0 -1
  90. package/es/ele-steps/index.js +2 -4
  91. package/es/ele-table-select/index.d.ts +1 -1
  92. package/es/ele-tabs/index.d.ts +7 -5
  93. package/es/ele-tabs/index.js +1 -6
  94. package/es/ele-tabs/props.d.ts +1 -1
  95. package/es/ele-tooltip/index.js +9 -13
  96. package/es/ele-tooltip/style/css-var.scss +4 -0
  97. package/es/ele-tooltip/style/index.scss +23 -0
  98. package/es/ele-tour/index.js +80 -77
  99. package/es/ele-upload-list/components/list-item.d.ts +1 -1
  100. package/es/ele-upload-list/index.d.ts +6 -4
  101. package/es/ele-upload-list/index.js +2 -3
  102. package/es/ele-upload-list/style/index.scss +2 -1
  103. package/es/ele-virtual-table/index.d.ts +1 -1
  104. package/es/ele-virtual-table/props.d.ts +2 -2
  105. package/es/ele-virtual-table/util.js +2 -18
  106. package/es/ele-watermark/index.d.ts +9 -0
  107. package/es/ele-watermark/index.js +1 -1
  108. package/es/ele-watermark/props.d.ts +5 -0
  109. package/es/ele-watermark/props.js +5 -0
  110. package/es/style/index.scss +1 -43
  111. package/es/style/plus.scss +43 -0
  112. package/es/style/themes/default.scss +6 -3
  113. package/es/style/themes/rounded.scss +1 -1
  114. package/es/style/themes/theme-util.scss +0 -2
  115. package/es/utils/core.d.ts +5 -0
  116. package/es/utils/core.js +28 -0
  117. package/es/utils/resolvers.d.ts +2 -2
  118. package/es/utils/resolvers.js +33 -20
  119. package/lib/ele-alert/index.cjs +2 -4
  120. package/lib/ele-app/plus.d.ts +3 -0
  121. package/lib/ele-avatar-group/index.cjs +1 -3
  122. package/lib/ele-avatar-group/index.d.ts +1 -1
  123. package/lib/ele-basic-select/index.cjs +16 -12
  124. package/lib/ele-basic-select/index.d.ts +8 -8
  125. package/lib/ele-check-card/index.cjs +0 -5
  126. package/lib/ele-check-card/index.d.ts +2 -2
  127. package/lib/ele-config-provider/components/receiver-view.cjs +44 -0
  128. package/lib/ele-config-provider/components/receiver-view.d.ts +17 -0
  129. package/lib/ele-copyable/index.cjs +0 -4
  130. package/lib/ele-copyable/index.d.ts +4 -6
  131. package/lib/ele-cropper/index.cjs +0 -4
  132. package/lib/ele-cropper/index.d.ts +6 -6
  133. package/lib/ele-dashboard/index.cjs +7 -16
  134. package/lib/ele-dashboard/index.d.ts +0 -1
  135. package/lib/ele-data-table/props.d.ts +2 -2
  136. package/lib/ele-dot/index.cjs +3 -9
  137. package/lib/ele-dot/index.d.ts +2 -4
  138. package/lib/ele-drawer/index.cjs +13 -10
  139. package/lib/ele-drawer/index.d.ts +6 -6
  140. package/lib/ele-dropdown/index.cjs +6 -10
  141. package/lib/ele-dropdown/style/index.scss +2 -2
  142. package/lib/ele-edit-tag/index.cjs +16 -14
  143. package/lib/ele-edit-tag/index.d.ts +6 -0
  144. package/lib/ele-edit-tag/props.cjs +5 -1
  145. package/lib/ele-edit-tag/props.d.ts +4 -0
  146. package/lib/ele-edit-tag/style/index.scss +13 -0
  147. package/lib/ele-ellipsis/index.cjs +3 -26
  148. package/lib/ele-ellipsis/index.d.ts +3 -3
  149. package/lib/ele-file-list/components/file-grid-item.cjs +15 -8
  150. package/lib/ele-file-list/components/file-grid.cjs +53 -49
  151. package/lib/ele-file-list/components/file-table-item.cjs +19 -14
  152. package/lib/ele-file-list/components/file-table.cjs +91 -85
  153. package/lib/ele-file-list/index.cjs +0 -10
  154. package/lib/ele-file-list/index.d.ts +4 -4
  155. package/lib/ele-file-list-tool/index.cjs +2 -2
  156. package/lib/ele-file-list-tool/index.d.ts +3 -3
  157. package/lib/ele-icon-select/index.cjs +39 -16
  158. package/lib/ele-icon-select/index.d.ts +22 -10
  159. package/lib/ele-icon-select/props.cjs +6 -1
  160. package/lib/ele-icon-select/props.d.ts +6 -1
  161. package/lib/ele-icon-select/style/index.cjs +1 -0
  162. package/lib/ele-icon-select/style/index.scss +16 -2
  163. package/lib/ele-loading/index.cjs +31 -29
  164. package/lib/ele-loading/index.d.ts +0 -2
  165. package/lib/ele-map-picker/components/map-view.cjs +76 -49
  166. package/lib/ele-map-picker/components/map-view.d.ts +22 -18
  167. package/lib/ele-map-picker/index.d.ts +5 -3
  168. package/lib/ele-map-picker/props.cjs +5 -3
  169. package/lib/ele-map-picker/props.d.ts +6 -4
  170. package/lib/ele-map-picker/style/index.scss +1 -1
  171. package/lib/ele-menus/index.cjs +61 -10
  172. package/lib/ele-menus/index.d.ts +10 -1
  173. package/lib/ele-menus/props.cjs +10 -2
  174. package/lib/ele-menus/props.d.ts +8 -0
  175. package/lib/ele-menus/style/index.cjs +2 -0
  176. package/lib/ele-menus/style/index.scss +1 -0
  177. package/lib/ele-menus/util.cjs +47 -21
  178. package/lib/ele-menus/util.d.ts +15 -3
  179. package/lib/ele-modal/index.cjs +13 -7
  180. package/lib/ele-modal/index.d.ts +2 -2
  181. package/lib/ele-modal/style/index.scss +1 -0
  182. package/lib/ele-pagination/index.cjs +2 -8
  183. package/lib/ele-pagination/index.d.ts +6 -6
  184. package/lib/ele-popconfirm/index.d.ts +3 -3
  185. package/lib/ele-popconfirm/style/index.cjs +1 -1
  186. package/lib/ele-popover/index.d.ts +3 -3
  187. package/lib/ele-popover/props.d.ts +1 -1
  188. package/lib/ele-popover/style/index.cjs +0 -1
  189. package/lib/ele-printer/index.cjs +10 -10
  190. package/lib/ele-printer/index.d.ts +6 -6
  191. package/lib/ele-pro-layout/components/pro-header.cjs +8 -2
  192. package/lib/ele-pro-layout/components/pro-header.d.ts +9 -0
  193. package/lib/ele-pro-layout/components/pro-sidebar.cjs +8 -2
  194. package/lib/ele-pro-layout/components/pro-sidebar.d.ts +9 -0
  195. package/lib/ele-pro-layout/components/pro-sidebox.cjs +11 -3
  196. package/lib/ele-pro-layout/components/pro-sidebox.d.ts +9 -0
  197. package/lib/ele-pro-layout/index.cjs +15 -16
  198. package/lib/ele-pro-layout/index.d.ts +33 -30
  199. package/lib/ele-pro-layout/props.cjs +9 -5
  200. package/lib/ele-pro-layout/props.d.ts +9 -5
  201. package/lib/ele-pro-table/index.cjs +0 -5
  202. package/lib/ele-pro-table/index.d.ts +15 -15
  203. package/lib/ele-pro-table/props.d.ts +3 -3
  204. package/lib/ele-segmented/index.cjs +1 -3
  205. package/lib/ele-split-panel/index.cjs +62 -58
  206. package/lib/ele-split-panel/index.d.ts +9 -8
  207. package/lib/ele-steps/index.cjs +2 -4
  208. package/lib/ele-steps/index.d.ts +0 -1
  209. package/lib/ele-table-select/index.d.ts +1 -1
  210. package/lib/ele-tabs/index.cjs +1 -6
  211. package/lib/ele-tabs/index.d.ts +7 -5
  212. package/lib/ele-tabs/props.d.ts +1 -1
  213. package/lib/ele-tooltip/index.cjs +9 -13
  214. package/lib/ele-tooltip/style/css-var.scss +4 -0
  215. package/lib/ele-tooltip/style/index.scss +23 -0
  216. package/lib/ele-tour/index.cjs +79 -76
  217. package/lib/ele-upload-list/components/list-item.d.ts +1 -1
  218. package/lib/ele-upload-list/index.cjs +1 -2
  219. package/lib/ele-upload-list/index.d.ts +6 -4
  220. package/lib/ele-upload-list/style/index.scss +2 -1
  221. package/lib/ele-virtual-table/index.d.ts +1 -1
  222. package/lib/ele-virtual-table/props.d.ts +2 -2
  223. package/lib/ele-virtual-table/util.cjs +1 -17
  224. package/lib/ele-watermark/index.cjs +1 -1
  225. package/lib/ele-watermark/index.d.ts +9 -0
  226. package/lib/ele-watermark/props.cjs +5 -0
  227. package/lib/ele-watermark/props.d.ts +5 -0
  228. package/lib/style/index.scss +1 -43
  229. package/lib/style/plus.scss +43 -0
  230. package/lib/style/themes/default.scss +6 -3
  231. package/lib/style/themes/rounded.scss +1 -1
  232. package/lib/style/themes/theme-util.scss +0 -2
  233. package/lib/utils/core.cjs +28 -0
  234. package/lib/utils/core.d.ts +5 -0
  235. package/lib/utils/resolvers.cjs +33 -20
  236. package/lib/utils/resolvers.d.ts +2 -2
  237. package/package.json +1 -1
  238. package/es/ele-map-picker/components/map-search.d.ts +0 -22
  239. package/es/ele-map-picker/components/map-search.js +0 -75
  240. package/es/ele-popover/style/css-var.scss +0 -8
  241. package/es/ele-popover/style/index.scss +0 -27
  242. package/lib/ele-map-picker/components/map-search.cjs +0 -74
  243. package/lib/ele-map-picker/components/map-search.d.ts +0 -22
  244. package/lib/ele-popover/style/css-var.scss +0 -8
  245. package/lib/ele-popover/style/index.scss +0 -27
@@ -28,7 +28,6 @@
28
28
  .ele-icon-select-tabs {
29
29
  flex: 1;
30
30
  overflow: auto;
31
- overflow: overlay;
32
31
  display: flex;
33
32
  align-items: center;
34
33
 
@@ -92,6 +91,22 @@
92
91
  }
93
92
  }
94
93
 
94
+ .ele-icon-select-search {
95
+ width: 100%;
96
+ flex-shrink: 0;
97
+ padding: eleVar('icon', 'search-padding');
98
+ box-sizing: border-box;
99
+
100
+ & > .el-input .el-input__prefix .el-input__icon {
101
+ font-size: eleVar('icon', 'search-icon-size');
102
+ }
103
+ }
104
+
105
+ .ele-icon-select-tabs + .ele-icon-select-search {
106
+ width: eleVar('icon', 'search-width');
107
+ padding-left: 12px;
108
+ }
109
+
95
110
  .ele-icon-select-main {
96
111
  flex: 1;
97
112
  display: flex;
@@ -103,7 +118,6 @@
103
118
  width: eleVar('icon', 'menus-width');
104
119
  flex-shrink: 0;
105
120
  overflow: auto;
106
- overflow: overlay;
107
121
  padding: eleVar('icon', 'menus-padding');
108
122
  box-shadow: -0.8px 0 0 elVar('border-color', 'light') inset;
109
123
  box-sizing: border-box;
@@ -1,18 +1,16 @@
1
1
  "use strict";
2
2
  const vue = require("vue");
3
3
  const elementPlus = require("element-plus");
4
- const receiver = require("../ele-config-provider/receiver");
4
+ const ReceiverView = require("../ele-config-provider/components/receiver-view");
5
5
  const props = require("./props");
6
6
  const _sfc_main = vue.defineComponent({
7
7
  name: "EleLoading",
8
- directives: {
9
- loading: elementPlus.vLoading
10
- },
8
+ directives: { loading: elementPlus.vLoading },
9
+ components: { ReceiverView },
11
10
  props: props.loadingProps,
12
11
  setup(props2) {
13
- const { authenticated } = receiver.useLicense();
14
12
  const isCircle = vue.computed(() => {
15
- return !authenticated.value || props2.type === "circle";
13
+ return props2.type === "circle";
16
14
  });
17
15
  const rootProps = vue.computed(() => {
18
16
  const obj = {
@@ -43,31 +41,35 @@ const _hoisted_1 = /* @__PURE__ */ vue.createElementVNode("div", { class: "ele-l
43
41
  /* @__PURE__ */ vue.createElementVNode("i")
44
42
  ], -1);
45
43
  function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
44
+ const _component_ReceiverView = vue.resolveComponent("ReceiverView");
46
45
  const _directive_loading = vue.resolveDirective("loading");
47
- return vue.withDirectives((vue.openBlock(), vue.createElementBlock("div", vue.normalizeProps(vue.guardReactiveProps(_ctx.rootProps)), [
48
- vue.renderSlot(_ctx.$slots, "default"),
49
- !_ctx.isCircle ? vue.withDirectives((vue.openBlock(), vue.createElementBlock("div", {
50
- key: 0,
51
- style: vue.normalizeStyle(_ctx.spinnerStyle),
52
- class: vue.normalizeClass([
53
- "ele-loading-spinner",
54
- { "ele-loading-blur": _ctx.blur },
55
- { "ele-loading-small": _ctx.size === "small" },
56
- { "ele-loading-large": _ctx.size === "large" }
57
- ])
58
- }, [
59
- vue.renderSlot(_ctx.$slots, "spinner", {}, () => [
60
- _hoisted_1
61
- ]),
62
- _ctx.text ? (vue.openBlock(), vue.createElementBlock("div", {
46
+ return vue.withDirectives((vue.openBlock(), vue.createBlock(_component_ReceiverView, vue.normalizeProps(vue.guardReactiveProps(_ctx.rootProps)), {
47
+ default: vue.withCtx(() => [
48
+ vue.renderSlot(_ctx.$slots, "default"),
49
+ !_ctx.isCircle ? vue.withDirectives((vue.openBlock(), vue.createElementBlock("div", {
63
50
  key: 0,
64
- class: "ele-loading-text",
65
- style: vue.normalizeStyle(_ctx.textStyle)
66
- }, vue.toDisplayString(_ctx.text), 5)) : vue.createCommentVNode("", true)
67
- ], 6)), [
68
- [vue.vShow, _ctx.loading]
69
- ]) : vue.createCommentVNode("", true)
70
- ], 16)), [
51
+ style: vue.normalizeStyle(_ctx.spinnerStyle),
52
+ class: vue.normalizeClass([
53
+ "ele-loading-spinner",
54
+ { "ele-loading-blur": _ctx.blur },
55
+ { "ele-loading-small": _ctx.size === "small" },
56
+ { "ele-loading-large": _ctx.size === "large" }
57
+ ])
58
+ }, [
59
+ vue.renderSlot(_ctx.$slots, "spinner", {}, () => [
60
+ _hoisted_1
61
+ ]),
62
+ _ctx.text ? (vue.openBlock(), vue.createElementBlock("div", {
63
+ key: 0,
64
+ class: "ele-loading-text",
65
+ style: vue.normalizeStyle(_ctx.textStyle)
66
+ }, vue.toDisplayString(_ctx.text), 5)) : vue.createCommentVNode("", true)
67
+ ], 6)), [
68
+ [vue.vShow, _ctx.loading]
69
+ ]) : vue.createCommentVNode("", true)
70
+ ]),
71
+ _: 3
72
+ }, 16)), [
71
73
  [_directive_loading, _ctx.isCircle && _ctx.loading]
72
74
  ]);
73
75
  }
@@ -13,7 +13,6 @@ declare const _default: import("vue").DefineComponent<{
13
13
  blur: BooleanConstructor;
14
14
  size: import("vue").PropType<import("./types").LoadingSize>;
15
15
  spinnerStyle: import("vue").PropType<Partial<import("vue").CSSProperties>>;
16
- /** 根节点属性 */
17
16
  textStyle: import("vue").PropType<Partial<import("vue").CSSProperties>>;
18
17
  }, {
19
18
  isCircle: import("vue").ComputedRef<boolean>;
@@ -31,7 +30,6 @@ declare const _default: import("vue").DefineComponent<{
31
30
  blur: BooleanConstructor;
32
31
  size: import("vue").PropType<import("./types").LoadingSize>;
33
32
  spinnerStyle: import("vue").PropType<Partial<import("vue").CSSProperties>>;
34
- /** 根节点属性 */
35
33
  textStyle: import("vue").PropType<Partial<import("vue").CSSProperties>>;
36
34
  }>>, {
37
35
  type: import("./types").LoadingType;
@@ -4,21 +4,21 @@ const AMapLoader = require("@amap/amap-jsapi-loader");
4
4
  const elementPlus = require("element-plus");
5
5
  const icons = require("../../icons");
6
6
  const EleLoading = require("../../ele-loading/index");
7
- const MapSearch = require("./map-search");
8
7
  const props = require("../props");
9
8
  const ICON_CLASS = "ele-map-view-body-icon";
10
9
  const _sfc_main = vue.defineComponent({
11
10
  name: "MapView",
12
11
  components: {
13
- EleLoading,
12
+ ElAutocomplete: elementPlus.ElAutocomplete,
14
13
  ElInput: elementPlus.ElInput,
15
14
  ElButton: elementPlus.ElButton,
16
15
  ElIcon: elementPlus.ElIcon,
17
16
  ElEmpty: elementPlus.ElEmpty,
17
+ EleLoading,
18
18
  PlusOutlined: icons.PlusOutlined,
19
19
  EnvironmentOutlined: icons.EnvironmentOutlined,
20
20
  CheckCircleOutlined: icons.CheckCircleOutlined,
21
- MapSearch
21
+ SearchOutlined: icons.SearchOutlined
22
22
  },
23
23
  props: props.mapProps,
24
24
  emits: {
@@ -28,6 +28,7 @@ const _sfc_main = vue.defineComponent({
28
28
  },
29
29
  setup(props2, { emit }) {
30
30
  const mapRef = vue.ref(null);
31
+ const autocompleteRef = vue.ref(null);
31
32
  const loading = vue.ref(true);
32
33
  const poiLoading = vue.ref(false);
33
34
  const confirmLoading = vue.ref(false);
@@ -151,6 +152,7 @@ const _sfc_main = vue.defineComponent({
151
152
  });
152
153
  };
153
154
  const onSearchSelect = (item) => {
155
+ autocompleteRef.value && autocompleteRef.value.blur();
154
156
  if (!item || !item.location) {
155
157
  return;
156
158
  }
@@ -418,6 +420,15 @@ const _sfc_main = vue.defineComponent({
418
420
  const { lng, lat } = selected.value.location;
419
421
  showCenterMarker(lng, lat);
420
422
  }
423
+ if (!data.value.length && (mode === "poi" || mode === "keyword")) {
424
+ if (selected.value) {
425
+ const { lng, lat } = selected.value.location;
426
+ searchPOI(lng, lat);
427
+ } else {
428
+ const { lng, lat } = state.mapIns.getCenter();
429
+ searchPOI(lng, lat);
430
+ }
431
+ }
421
432
  }
422
433
  );
423
434
  vue.watch(
@@ -436,6 +447,7 @@ const _sfc_main = vue.defineComponent({
436
447
  return {
437
448
  SearchOutlined: icons.SearchOutlined,
438
449
  mapRef,
450
+ autocompleteRef,
439
451
  loading,
440
452
  poiLoading,
441
453
  confirmLoading,
@@ -468,35 +480,35 @@ const _hoisted_2 = {
468
480
  style: { "height": "100%" }
469
481
  };
470
482
  const _hoisted_3 = ["src"];
471
- const _hoisted_4 = {
483
+ const _hoisted_4 = { class: "ele-map-suggest-item" };
484
+ const _hoisted_5 = { class: "ele-map-suggest-title" };
485
+ const _hoisted_6 = { class: "ele-map-suggest-text" };
486
+ const _hoisted_7 = {
472
487
  key: 0,
473
- class: "ele-map-view-search"
474
- };
475
- const _hoisted_5 = {
476
- key: 1,
477
488
  class: "ele-map-view-message"
478
489
  };
479
- const _hoisted_6 = { class: "ele-map-view-list" };
480
- const _hoisted_7 = ["onClick"];
481
- const _hoisted_8 = { class: "ele-map-view-item-body" };
482
- const _hoisted_9 = { class: "ele-map-view-item-title" };
483
- const _hoisted_10 = {
490
+ const _hoisted_8 = { class: "ele-map-view-list" };
491
+ const _hoisted_9 = ["onClick"];
492
+ const _hoisted_10 = { class: "ele-map-view-item-body" };
493
+ const _hoisted_11 = { class: "ele-map-view-item-title" };
494
+ const _hoisted_12 = {
484
495
  key: 0,
485
496
  class: "ele-map-view-item-text"
486
497
  };
487
- const _hoisted_11 = {
498
+ const _hoisted_13 = {
488
499
  key: 0,
489
500
  class: "ele-map-view-empty"
490
501
  };
491
- const _hoisted_12 = { class: "ele-map-view-extra" };
492
- const _hoisted_13 = {
502
+ const _hoisted_14 = { class: "ele-map-view-extra" };
503
+ const _hoisted_15 = {
493
504
  key: 0,
494
505
  class: "ele-map-view-message"
495
506
  };
496
507
  function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
497
508
  const _component_PlusOutlined = vue.resolveComponent("PlusOutlined");
498
509
  const _component_ElIcon = vue.resolveComponent("ElIcon");
499
- const _component_MapSearch = vue.resolveComponent("MapSearch");
510
+ const _component_SearchOutlined = vue.resolveComponent("SearchOutlined");
511
+ const _component_ElAutocomplete = vue.resolveComponent("ElAutocomplete");
500
512
  const _component_ElButton = vue.resolveComponent("ElButton");
501
513
  const _component_ElInput = vue.resolveComponent("ElInput");
502
514
  const _component_EnvironmentOutlined = vue.resolveComponent("EnvironmentOutlined");
@@ -523,18 +535,41 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
523
535
  class: vue.normalizeClass(_ctx.centerIconClass)
524
536
  }, null, 10, _hoisted_3)
525
537
  ], 64)) : vue.createCommentVNode("", true),
526
- !_ctx.poiMode && !_ctx.keywordMode ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 1 }, [
527
- _ctx.filterable ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_4, [
528
- vue.createVNode(_component_MapSearch, {
529
- modelValue: _ctx.keywords,
530
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.keywords = $event),
531
- placeholder: _ctx.searchPlaceholder,
532
- onSearch: _ctx.onSearch,
533
- onSearchSelect: _ctx.onSearchSelect
534
- }, null, 8, ["modelValue", "placeholder", "onSearch", "onSearchSelect"])
535
- ])) : vue.createCommentVNode("", true),
536
- _ctx.confirmDisabled && _ctx.clickMessage ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_5, vue.toDisplayString(_ctx.clickMessage), 1)) : (vue.openBlock(), vue.createBlock(_component_ElButton, {
537
- key: 2,
538
+ _ctx.filterable && !_ctx.keywordMode ? (vue.openBlock(), vue.createElementBlock("div", {
539
+ key: 1,
540
+ class: "ele-map-view-search",
541
+ style: vue.normalizeStyle(_ctx.searchStyle)
542
+ }, [
543
+ vue.createVNode(_component_ElAutocomplete, {
544
+ ref: "autocompleteRef",
545
+ clearable: true,
546
+ modelValue: _ctx.keywords,
547
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.keywords = $event),
548
+ placeholder: _ctx.searchPlaceholder,
549
+ popperClass: "ele-map-suggest-popper",
550
+ fetchSuggestions: _ctx.onSearch,
551
+ onSelect: _ctx.onSearchSelect
552
+ }, {
553
+ prefix: vue.withCtx(() => [
554
+ vue.createVNode(_component_ElIcon, { class: "el-input__icon" }, {
555
+ default: vue.withCtx(() => [
556
+ vue.createVNode(_component_SearchOutlined)
557
+ ]),
558
+ _: 1
559
+ })
560
+ ]),
561
+ default: vue.withCtx(({ item }) => [
562
+ vue.createElementVNode("div", _hoisted_4, [
563
+ vue.createElementVNode("div", _hoisted_5, vue.toDisplayString(item.label), 1),
564
+ vue.createElementVNode("div", _hoisted_6, vue.toDisplayString(item.district), 1)
565
+ ])
566
+ ]),
567
+ _: 1
568
+ }, 8, ["modelValue", "placeholder", "fetchSuggestions", "onSelect"])
569
+ ], 4)) : vue.createCommentVNode("", true),
570
+ !_ctx.poiMode && !_ctx.keywordMode ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 2 }, [
571
+ _ctx.confirmDisabled && _ctx.clickMessage ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_7, vue.toDisplayString(_ctx.clickMessage), 1)) : (vue.openBlock(), vue.createBlock(_component_ElButton, {
572
+ key: 1,
538
573
  type: "primary",
539
574
  loading: _ctx.confirmLoading,
540
575
  disabled: _ctx.confirmDisabled,
@@ -554,29 +589,21 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
554
589
  class: "ele-map-view-side"
555
590
  }, {
556
591
  default: vue.withCtx(() => [
557
- _ctx.keywordMode || _ctx.filterable ? (vue.openBlock(), vue.createElementBlock("div", {
592
+ _ctx.keywordMode ? (vue.openBlock(), vue.createElementBlock("div", {
558
593
  key: 0,
559
594
  class: "ele-map-view-search",
560
- style: vue.normalizeStyle(_ctx.headerStyle)
595
+ style: vue.normalizeStyle(_ctx.searchStyle)
561
596
  }, [
562
- _ctx.keywordMode ? (vue.openBlock(), vue.createBlock(_component_ElInput, {
563
- key: 0,
597
+ vue.createVNode(_component_ElInput, {
564
598
  clearable: true,
565
599
  modelValue: _ctx.keywords,
566
600
  "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => _ctx.keywords = $event),
567
601
  prefixIcon: _ctx.SearchOutlined,
568
602
  placeholder: _ctx.searchPlaceholder,
569
603
  onChange: _ctx.onSearch
570
- }, null, 8, ["modelValue", "prefixIcon", "placeholder", "onChange"])) : (vue.openBlock(), vue.createBlock(_component_MapSearch, {
571
- key: 1,
572
- modelValue: _ctx.keywords,
573
- "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => _ctx.keywords = $event),
574
- placeholder: _ctx.searchPlaceholder,
575
- onSearch: _ctx.onSearch,
576
- onSearchSelect: _ctx.onSearchSelect
577
- }, null, 8, ["modelValue", "placeholder", "onSearch", "onSearchSelect"]))
604
+ }, null, 8, ["modelValue", "prefixIcon", "placeholder", "onChange"])
578
605
  ], 4)) : vue.createCommentVNode("", true),
579
- vue.createElementVNode("div", _hoisted_6, [
606
+ vue.createElementVNode("div", _hoisted_8, [
580
607
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.data, (item) => {
581
608
  return vue.openBlock(), vue.createElementBlock("div", {
582
609
  key: item.key,
@@ -589,9 +616,9 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
589
616
  ]),
590
617
  _: 1
591
618
  }),
592
- vue.createElementVNode("div", _hoisted_8, [
593
- vue.createElementVNode("div", _hoisted_9, vue.toDisplayString(item.name), 1),
594
- item.address ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_10, vue.toDisplayString(item.address), 1)) : vue.createCommentVNode("", true)
619
+ vue.createElementVNode("div", _hoisted_10, [
620
+ vue.createElementVNode("div", _hoisted_11, vue.toDisplayString(item.name), 1),
621
+ item.address ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_12, vue.toDisplayString(item.address), 1)) : vue.createCommentVNode("", true)
595
622
  ]),
596
623
  vue.createVNode(_component_ElIcon, { class: "ele-map-view-item-radio" }, {
597
624
  default: vue.withCtx(() => [
@@ -599,14 +626,14 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
599
626
  ]),
600
627
  _: 1
601
628
  })
602
- ], 10, _hoisted_7);
629
+ ], 10, _hoisted_9);
603
630
  }), 128)),
604
- !_ctx.data || !_ctx.data.length ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_11, [
631
+ !_ctx.data || !_ctx.data.length ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_13, [
605
632
  vue.createVNode(_component_ElEmpty, vue.mergeProps({ imageSize: 80 }, _ctx.emptyProps), null, 16)
606
633
  ])) : vue.createCommentVNode("", true)
607
634
  ]),
608
- vue.createElementVNode("div", _hoisted_12, [
609
- _ctx.confirmDisabled && _ctx.message ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_13, vue.toDisplayString(_ctx.message), 1)) : (vue.openBlock(), vue.createBlock(_component_ElButton, {
635
+ vue.createElementVNode("div", _hoisted_14, [
636
+ _ctx.confirmDisabled && _ctx.message ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_15, vue.toDisplayString(_ctx.message), 1)) : (vue.openBlock(), vue.createBlock(_component_ElButton, {
610
637
  key: 1,
611
638
  type: "primary",
612
639
  loading: _ctx.confirmLoading,
@@ -1,3 +1,4 @@
1
+ import type { ElAutocompleteInstance } from '../../ele-app/el';
1
2
  import type { PoiItem, CenterPoint } from '../types';
2
3
  declare const _default: import("vue").DefineComponent<{
3
4
  height: {
@@ -37,10 +38,11 @@ declare const _default: import("vue").DefineComponent<{
37
38
  message: StringConstructor;
38
39
  suggestionCity: {
39
40
  type: StringConstructor;
40
- default: string; /** 地图节点 */
41
- }; /** 地图节点 */
41
+ default: string;
42
+ };
42
43
  searchPlaceholder: StringConstructor;
43
44
  markerSrc: {
45
+ /** 地图节点 */
44
46
  type: StringConstructor;
45
47
  default: string;
46
48
  };
@@ -48,24 +50,25 @@ declare const _default: import("vue").DefineComponent<{
48
50
  mapVersion: {
49
51
  type: StringConstructor;
50
52
  default: string;
51
- };
53
+ }; /** 列表请求状态 */
52
54
  mapStyle: StringConstructor;
53
- darkMode: BooleanConstructor;
55
+ darkMode: BooleanConstructor; /** 确定按钮请求状态 */
54
56
  okText: StringConstructor;
55
- emptyProps: import("vue").PropType<import("../../ele-app/el").ElEmptyProps>; /** 输入建议关键字 */
56
- headerStyle: import("vue").PropType<Partial<import("vue").CSSProperties>>;
57
+ emptyProps: import("vue").PropType<import("../../ele-app/el").ElEmptyProps>;
58
+ searchStyle: import("vue").PropType<Partial<import("vue").CSSProperties>>;
57
59
  mode: {
58
60
  type: import("vue").PropType<import("../types").SelectMode>;
59
61
  default: string;
60
62
  };
61
63
  filterable: {
62
64
  type: BooleanConstructor;
63
- default: boolean; /** 是否是关键字搜索模式 */
64
- };
65
+ default: boolean; /** 选中数据 */
66
+ }; /** 选中数据 */
65
67
  clickMessage: StringConstructor;
66
68
  }, {
67
69
  SearchOutlined: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>;
68
70
  mapRef: import("vue").Ref<HTMLDivElement | null>;
71
+ autocompleteRef: import("vue").Ref<ElAutocompleteInstance>;
69
72
  loading: import("vue").Ref<boolean>;
70
73
  poiLoading: import("vue").Ref<boolean>;
71
74
  confirmLoading: import("vue").Ref<boolean>;
@@ -160,10 +163,11 @@ declare const _default: import("vue").DefineComponent<{
160
163
  message: StringConstructor;
161
164
  suggestionCity: {
162
165
  type: StringConstructor;
163
- default: string; /** 地图节点 */
164
- }; /** 地图节点 */
166
+ default: string;
167
+ };
165
168
  searchPlaceholder: StringConstructor;
166
169
  markerSrc: {
170
+ /** 地图节点 */
167
171
  type: StringConstructor;
168
172
  default: string;
169
173
  };
@@ -171,31 +175,31 @@ declare const _default: import("vue").DefineComponent<{
171
175
  mapVersion: {
172
176
  type: StringConstructor;
173
177
  default: string;
174
- };
178
+ }; /** 列表请求状态 */
175
179
  mapStyle: StringConstructor;
176
- darkMode: BooleanConstructor;
180
+ darkMode: BooleanConstructor; /** 确定按钮请求状态 */
177
181
  okText: StringConstructor;
178
- emptyProps: import("vue").PropType<import("../../ele-app/el").ElEmptyProps>; /** 输入建议关键字 */
179
- headerStyle: import("vue").PropType<Partial<import("vue").CSSProperties>>;
182
+ emptyProps: import("vue").PropType<import("../../ele-app/el").ElEmptyProps>;
183
+ searchStyle: import("vue").PropType<Partial<import("vue").CSSProperties>>;
180
184
  mode: {
181
185
  type: import("vue").PropType<import("../types").SelectMode>;
182
186
  default: string;
183
187
  };
184
188
  filterable: {
185
189
  type: BooleanConstructor;
186
- default: boolean; /** 是否是关键字搜索模式 */
187
- };
190
+ default: boolean; /** 选中数据 */
191
+ }; /** 选中数据 */
188
192
  clickMessage: StringConstructor;
189
193
  }>> & {
190
194
  onSelect?: ((_selected: PoiItem | null) => any) | undefined;
191
195
  onDone?: ((_result: CenterPoint) => any) | undefined;
192
196
  onMapDone?: ((_ins: any) => any) | undefined;
193
197
  }, {
198
+ height: string;
199
+ zoom: number;
194
200
  required: boolean;
195
201
  mode: import("../types").SelectMode;
196
- height: string;
197
202
  filterable: boolean;
198
- zoom: number;
199
203
  selectedZoom: number;
200
204
  poiLimit: number;
201
205
  poiType: string;
@@ -12,6 +12,7 @@ declare const _default: import("vue").DefineComponent<{
12
12
  };
13
13
  locale: import("vue").PropType<Partial<MapLocale>>;
14
14
  keywordMode: BooleanConstructor;
15
+ headerStyle: import("vue").PropType<Partial<import("vue").CSSProperties>>;
15
16
  height: {
16
17
  type: StringConstructor;
17
18
  default: string;
@@ -65,7 +66,7 @@ declare const _default: import("vue").DefineComponent<{
65
66
  darkMode: BooleanConstructor;
66
67
  okText: StringConstructor;
67
68
  emptyProps: import("vue").PropType<import("../ele-app/el").ElEmptyProps>;
68
- headerStyle: import("vue").PropType<Partial<import("vue").CSSProperties>>;
69
+ searchStyle: import("vue").PropType<Partial<import("vue").CSSProperties>>;
69
70
  mode: {
70
71
  type: import("vue").PropType<import("./types").SelectMode>;
71
72
  default: string;
@@ -99,6 +100,7 @@ declare const _default: import("vue").DefineComponent<{
99
100
  };
100
101
  locale: import("vue").PropType<Partial<MapLocale>>;
101
102
  keywordMode: BooleanConstructor;
103
+ headerStyle: import("vue").PropType<Partial<import("vue").CSSProperties>>;
102
104
  height: {
103
105
  type: StringConstructor;
104
106
  default: string;
@@ -152,7 +154,7 @@ declare const _default: import("vue").DefineComponent<{
152
154
  darkMode: BooleanConstructor;
153
155
  okText: StringConstructor;
154
156
  emptyProps: import("vue").PropType<import("../ele-app/el").ElEmptyProps>;
155
- headerStyle: import("vue").PropType<Partial<import("vue").CSSProperties>>;
157
+ searchStyle: import("vue").PropType<Partial<import("vue").CSSProperties>>;
156
158
  mode: {
157
159
  type: import("vue").PropType<import("./types").SelectMode>;
158
160
  default: string;
@@ -169,10 +171,10 @@ declare const _default: import("vue").DefineComponent<{
169
171
  onDone?: ((_result: CenterPoint) => any) | undefined;
170
172
  onMapDone?: ((_ins: any) => any) | undefined;
171
173
  }, {
174
+ height: string;
172
175
  required: boolean;
173
176
  modelValue: boolean;
174
177
  mode: import("./types").SelectMode;
175
- height: string;
176
178
  filterable: boolean;
177
179
  zoom: number;
178
180
  responsive: boolean;
@@ -74,8 +74,8 @@ const mapProps = {
74
74
  okText: String,
75
75
  /** 空组件属性 */
76
76
  emptyProps: Object,
77
- /** 自定义header样式 */
78
- headerStyle: Object,
77
+ /** 自定义搜索栏样式 */
78
+ searchStyle: Object,
79
79
  /** 位置选择模式 */
80
80
  mode: {
81
81
  type: String,
@@ -103,7 +103,9 @@ const mapPickerProps = {
103
103
  /** 国际化 */
104
104
  locale: Object,
105
105
  /** 是否使用关键字检索模式, 默认POI检索模式 */
106
- keywordMode: Boolean
106
+ keywordMode: Boolean,
107
+ /** 自定义header样式 */
108
+ headerStyle: Object
107
109
  };
108
110
  const mapPickerEmits = {
109
111
  /** 选择完成事件 */
@@ -79,8 +79,8 @@ export declare const mapProps: {
79
79
  okText: StringConstructor;
80
80
  /** 空组件属性 */
81
81
  emptyProps: PropType<ElEmptyProps>;
82
- /** 自定义header样式 */
83
- headerStyle: PropType<Partial<import("vue").CSSProperties>>;
82
+ /** 自定义搜索栏样式 */
83
+ searchStyle: PropType<Partial<import("vue").CSSProperties>>;
84
84
  /** 位置选择模式 */
85
85
  mode: {
86
86
  type: PropType<SelectMode>;
@@ -108,6 +108,8 @@ export declare const mapPickerProps: {
108
108
  locale: PropType<Partial<MapLocale>>;
109
109
  /** 是否使用关键字检索模式, 默认POI检索模式 */
110
110
  keywordMode: BooleanConstructor;
111
+ /** 自定义header样式 */
112
+ headerStyle: PropType<Partial<import("vue").CSSProperties>>;
111
113
  /** 地图的高度 */
112
114
  height: {
113
115
  type: StringConstructor;
@@ -181,8 +183,8 @@ export declare const mapPickerProps: {
181
183
  okText: StringConstructor;
182
184
  /** 空组件属性 */
183
185
  emptyProps: PropType<ElEmptyProps>;
184
- /** 自定义header样式 */
185
- headerStyle: PropType<Partial<import("vue").CSSProperties>>;
186
+ /** 自定义搜索栏样式 */
187
+ searchStyle: PropType<Partial<import("vue").CSSProperties>>;
186
188
  /** 位置选择模式 */
187
189
  mode: {
188
190
  type: PropType<SelectMode>;
@@ -57,7 +57,7 @@
57
57
  /* 列表顶部搜索框 */
58
58
  .ele-map-view-search {
59
59
  flex-shrink: 0;
60
- padding: eleVar('map', 'header-padding');
60
+ padding: eleVar('map', 'search-padding');
61
61
  box-sizing: border-box;
62
62
 
63
63
  .el-autocomplete,