ele-admin-plus 1.1.9-beta.6 → 1.1.9-beta.7
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.
- package/es/ele-data-table/props.d.ts +2 -2
- package/es/ele-ellipsis/index.js +2 -23
- package/es/ele-map-picker/components/map-view.d.ts +20 -16
- package/es/ele-map-picker/components/map-view.js +77 -50
- package/es/ele-map-picker/index.d.ts +5 -3
- package/es/ele-map-picker/props.d.ts +6 -4
- package/es/ele-map-picker/props.js +5 -3
- package/es/ele-map-picker/style/index.scss +1 -1
- package/es/ele-menus/index.d.ts +11 -2
- package/es/ele-menus/index.js +57 -5
- package/es/ele-menus/props.d.ts +8 -0
- package/es/ele-menus/props.js +10 -2
- package/es/ele-menus/style/index.scss +1 -1
- package/es/ele-menus/util.d.ts +15 -3
- package/es/ele-menus/util.js +47 -21
- package/es/ele-modal/style/index.scss +1 -0
- package/es/ele-popconfirm/index.d.ts +3 -3
- package/es/ele-popover/index.d.ts +3 -3
- package/es/ele-popover/props.d.ts +1 -1
- package/es/ele-pro-layout/components/pro-header.d.ts +9 -0
- package/es/ele-pro-layout/components/pro-header.js +8 -2
- package/es/ele-pro-layout/components/pro-sidebar.d.ts +9 -0
- package/es/ele-pro-layout/components/pro-sidebar.js +8 -2
- package/es/ele-pro-layout/components/pro-sidebox.d.ts +9 -0
- package/es/ele-pro-layout/components/pro-sidebox.js +8 -2
- package/es/ele-pro-layout/index.d.ts +43 -40
- package/es/ele-pro-layout/index.js +9 -3
- package/es/ele-pro-layout/props.d.ts +9 -5
- package/es/ele-pro-layout/props.js +9 -5
- package/es/ele-pro-table/index.d.ts +4 -4
- package/es/ele-upload-list/style/index.scss +2 -1
- package/es/ele-virtual-table/props.d.ts +2 -2
- package/es/ele-virtual-table/util.js +2 -18
- package/es/style/themes/default.scss +1 -1
- package/es/style/themes/rounded.scss +1 -1
- package/es/utils/core.d.ts +5 -0
- package/es/utils/core.js +28 -0
- package/lib/ele-data-table/props.d.ts +2 -2
- package/lib/ele-ellipsis/index.cjs +1 -22
- package/lib/ele-map-picker/components/map-view.cjs +76 -49
- package/lib/ele-map-picker/components/map-view.d.ts +20 -16
- package/lib/ele-map-picker/index.d.ts +5 -3
- package/lib/ele-map-picker/props.cjs +5 -3
- package/lib/ele-map-picker/props.d.ts +6 -4
- package/lib/ele-map-picker/style/index.scss +1 -1
- package/lib/ele-menus/index.cjs +55 -3
- package/lib/ele-menus/index.d.ts +11 -2
- package/lib/ele-menus/props.cjs +10 -2
- package/lib/ele-menus/props.d.ts +8 -0
- package/lib/ele-menus/style/index.scss +1 -1
- package/lib/ele-menus/util.cjs +47 -21
- package/lib/ele-menus/util.d.ts +15 -3
- package/lib/ele-modal/style/index.scss +1 -0
- package/lib/ele-popconfirm/index.d.ts +3 -3
- package/lib/ele-popover/index.d.ts +3 -3
- package/lib/ele-popover/props.d.ts +1 -1
- package/lib/ele-pro-layout/components/pro-header.cjs +8 -2
- package/lib/ele-pro-layout/components/pro-header.d.ts +9 -0
- package/lib/ele-pro-layout/components/pro-sidebar.cjs +8 -2
- package/lib/ele-pro-layout/components/pro-sidebar.d.ts +9 -0
- package/lib/ele-pro-layout/components/pro-sidebox.cjs +8 -2
- package/lib/ele-pro-layout/components/pro-sidebox.d.ts +9 -0
- package/lib/ele-pro-layout/index.cjs +9 -3
- package/lib/ele-pro-layout/index.d.ts +43 -40
- package/lib/ele-pro-layout/props.cjs +9 -5
- package/lib/ele-pro-layout/props.d.ts +9 -5
- package/lib/ele-pro-table/index.d.ts +4 -4
- package/lib/ele-upload-list/style/index.scss +2 -1
- package/lib/ele-virtual-table/props.d.ts +2 -2
- package/lib/ele-virtual-table/util.cjs +1 -17
- package/lib/style/themes/default.scss +1 -1
- package/lib/style/themes/rounded.scss +1 -1
- package/lib/utils/core.cjs +28 -0
- package/lib/utils/core.d.ts +5 -0
- package/package.json +1 -1
- package/es/ele-map-picker/components/map-search.d.ts +0 -22
- package/es/ele-map-picker/components/map-search.js +0 -75
- package/lib/ele-map-picker/components/map-search.cjs +0 -74
- package/lib/ele-map-picker/components/map-search.d.ts +0 -22
|
@@ -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
|
-
|
|
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
|
-
|
|
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
|
|
480
|
-
const
|
|
481
|
-
const
|
|
482
|
-
const
|
|
483
|
-
const
|
|
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
|
|
498
|
+
const _hoisted_13 = {
|
|
488
499
|
key: 0,
|
|
489
500
|
class: "ele-map-view-empty"
|
|
490
501
|
};
|
|
491
|
-
const
|
|
492
|
-
const
|
|
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
|
|
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
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
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
|
|
592
|
+
_ctx.keywordMode ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
558
593
|
key: 0,
|
|
559
594
|
class: "ele-map-view-search",
|
|
560
|
-
style: vue.normalizeStyle(_ctx.
|
|
595
|
+
style: vue.normalizeStyle(_ctx.searchStyle)
|
|
561
596
|
}, [
|
|
562
|
-
|
|
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"])
|
|
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",
|
|
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",
|
|
593
|
-
vue.createElementVNode("div",
|
|
594
|
-
item.address ? (vue.openBlock(), vue.createElementBlock("div",
|
|
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,
|
|
629
|
+
], 10, _hoisted_9);
|
|
603
630
|
}), 128)),
|
|
604
|
-
!_ctx.data || !_ctx.data.length ? (vue.openBlock(), vue.createElementBlock("div",
|
|
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",
|
|
609
|
-
_ctx.confirmDisabled && _ctx.message ? (vue.openBlock(), vue.createElementBlock("div",
|
|
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
|
-
|
|
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,20 +175,20 @@ 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
|
-
|
|
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;
|
|
@@ -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
|
-
|
|
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
|
-
|
|
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
|
-
/**
|
|
78
|
-
|
|
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
|
-
/**
|
|
83
|
-
|
|
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
|
-
/**
|
|
185
|
-
|
|
186
|
+
/** 自定义搜索栏样式 */
|
|
187
|
+
searchStyle: PropType<Partial<import("vue").CSSProperties>>;
|
|
186
188
|
/** 位置选择模式 */
|
|
187
189
|
mode: {
|
|
188
190
|
type: PropType<SelectMode>;
|
package/lib/ele-menus/index.cjs
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
const vue = require("vue");
|
|
3
3
|
const elementPlus = require("element-plus");
|
|
4
|
+
const EleTooltip = require("../ele-tooltip/index");
|
|
4
5
|
const receiver = require("../ele-config-provider/receiver");
|
|
5
6
|
const core = require("../utils/core");
|
|
6
7
|
const icons = require("../icons");
|
|
@@ -16,6 +17,9 @@ const index = vue.defineComponent({
|
|
|
16
17
|
const menuRef = vue.ref(null);
|
|
17
18
|
const ellipsisRef = vue.ref(null);
|
|
18
19
|
const sliceIndex = vue.ref(-1);
|
|
20
|
+
const tooltipVirtualRef = vue.ref();
|
|
21
|
+
const tooltipContent = vue.ref("");
|
|
22
|
+
const tooltipVisible = vue.ref(false);
|
|
19
23
|
const isHorizontal = vue.computed(() => props$1.mode === "horizontal");
|
|
20
24
|
const { observe, unobserve, computedEllipsis } = util.useMenuEllipsis({
|
|
21
25
|
getMenuEl: () => {
|
|
@@ -59,15 +63,45 @@ const index = vue.defineComponent({
|
|
|
59
63
|
}
|
|
60
64
|
}
|
|
61
65
|
);
|
|
66
|
+
const triggerTooltip = (e) => {
|
|
67
|
+
var _a;
|
|
68
|
+
if (props$1.textEllipsisTooltip) {
|
|
69
|
+
const itemEl = (_a = e.currentTarget) == null ? void 0 : _a.parentNode;
|
|
70
|
+
if (itemEl) {
|
|
71
|
+
const titleEl = itemEl.querySelector(`.${util.titleClass}`);
|
|
72
|
+
const text = titleEl == null ? void 0 : titleEl.innerText;
|
|
73
|
+
if (text && core.contentIsEllipsis(titleEl, "horizontal")) {
|
|
74
|
+
tooltipVirtualRef.value = itemEl;
|
|
75
|
+
tooltipContent.value = text;
|
|
76
|
+
tooltipVisible.value = true;
|
|
77
|
+
return;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
hideTooltip();
|
|
82
|
+
};
|
|
83
|
+
const hideTooltip = () => {
|
|
84
|
+
tooltipVisible.value = false;
|
|
85
|
+
};
|
|
62
86
|
const onItemClick = (item, e) => {
|
|
63
87
|
emit("itemClick", item, e);
|
|
64
88
|
};
|
|
65
89
|
const onItemMouseenter = (item, e) => {
|
|
90
|
+
triggerTooltip(e);
|
|
66
91
|
emit("itemMouseenter", item, e);
|
|
67
92
|
};
|
|
68
93
|
const onItemMouseleave = (item, e) => {
|
|
94
|
+
hideTooltip();
|
|
69
95
|
emit("itemMouseleave", item, e);
|
|
70
96
|
};
|
|
97
|
+
const onParentMouseenter = (item, e) => {
|
|
98
|
+
triggerTooltip(e);
|
|
99
|
+
emit("parentMouseenter", item, e);
|
|
100
|
+
};
|
|
101
|
+
const onParentMouseleave = (item, e) => {
|
|
102
|
+
hideTooltip();
|
|
103
|
+
emit("parentMouseleave", item, e);
|
|
104
|
+
};
|
|
71
105
|
const exposeValue = {
|
|
72
106
|
menuRef,
|
|
73
107
|
open: (index2) => {
|
|
@@ -126,7 +160,9 @@ const index = vue.defineComponent({
|
|
|
126
160
|
onItemClick,
|
|
127
161
|
onItemMouseenter,
|
|
128
162
|
onItemMouseleave,
|
|
129
|
-
isWebkit
|
|
163
|
+
isWebkit,
|
|
164
|
+
onParentMouseenter,
|
|
165
|
+
onParentMouseleave
|
|
130
166
|
);
|
|
131
167
|
if (moreItems) {
|
|
132
168
|
const ellipsisProps = props$1.ellipsisProps || {};
|
|
@@ -137,7 +173,8 @@ const index = vue.defineComponent({
|
|
|
137
173
|
props$1.colorful,
|
|
138
174
|
props$1.popupColorful,
|
|
139
175
|
props$1.firstPopperClass,
|
|
140
|
-
true
|
|
176
|
+
true,
|
|
177
|
+
isWebkit
|
|
141
178
|
);
|
|
142
179
|
nodes.push(
|
|
143
180
|
vue.h(
|
|
@@ -167,7 +204,9 @@ const index = vue.defineComponent({
|
|
|
167
204
|
onItemClick,
|
|
168
205
|
onItemMouseenter,
|
|
169
206
|
onItemMouseleave,
|
|
170
|
-
isWebkit
|
|
207
|
+
isWebkit,
|
|
208
|
+
onParentMouseenter,
|
|
209
|
+
onParentMouseleave
|
|
171
210
|
);
|
|
172
211
|
},
|
|
173
212
|
title: () => {
|
|
@@ -182,6 +221,19 @@ const index = vue.defineComponent({
|
|
|
182
221
|
)
|
|
183
222
|
);
|
|
184
223
|
}
|
|
224
|
+
if (props$1.textEllipsisTooltip) {
|
|
225
|
+
nodes.push(
|
|
226
|
+
vue.h(EleTooltip, {
|
|
227
|
+
trigger: "click",
|
|
228
|
+
placement: "right",
|
|
229
|
+
...props$1.textEllipsisTooltipProps || {},
|
|
230
|
+
virtualTriggering: true,
|
|
231
|
+
virtualRef: tooltipVirtualRef.value,
|
|
232
|
+
content: tooltipContent.value,
|
|
233
|
+
visible: tooltipVisible.value
|
|
234
|
+
})
|
|
235
|
+
);
|
|
236
|
+
}
|
|
185
237
|
return nodes;
|
|
186
238
|
}
|
|
187
239
|
);
|
package/lib/ele-menus/index.d.ts
CHANGED
|
@@ -19,6 +19,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
19
19
|
firstPopperClass: StringConstructor;
|
|
20
20
|
tooltipDisabled: BooleanConstructor;
|
|
21
21
|
ellipsisProps: import("vue").PropType<import("./types").EllipsisProps>;
|
|
22
|
+
textEllipsisTooltip: BooleanConstructor;
|
|
23
|
+
textEllipsisTooltipProps: import("vue").PropType<Partial<import("../ele-tooltip/props").TooltipProps>>;
|
|
22
24
|
mode: import("element-plus/es/utils/index").EpPropFinalized<StringConstructor, "horizontal" | "vertical", unknown, "vertical", boolean>;
|
|
23
25
|
defaultActive: import("element-plus/es/utils/index").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
24
26
|
defaultOpeneds: import("element-plus/es/utils/index").EpPropFinalized<(new (...args: any[]) => string[]) | (() => string[]) | ((new (...args: any[]) => string[]) | (() => string[]))[], unknown, unknown, () => [], boolean>;
|
|
@@ -43,9 +45,11 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
43
45
|
open: (index: string) => void;
|
|
44
46
|
close: (index: string) => void;
|
|
45
47
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
46
|
-
itemClick: (_item: import("./types").MenuItem, _e: MouseEvent) => boolean;
|
|
47
|
-
itemMouseenter: (_item: import("./types").MenuItem, _e: MouseEvent) => boolean;
|
|
48
|
+
itemClick: (_item: import("./types").MenuItem, _e: MouseEvent) => boolean; /** 文本溢出提示是否显示 */
|
|
49
|
+
itemMouseenter: (_item: import("./types").MenuItem, _e: MouseEvent) => boolean;
|
|
48
50
|
itemMouseleave: (_item: import("./types").MenuItem, _e: MouseEvent) => boolean;
|
|
51
|
+
parentMouseenter: (_item: import("./types").MenuItem, _e: MouseEvent) => boolean;
|
|
52
|
+
parentMouseleave: (_item: import("./types").MenuItem, _e: MouseEvent) => boolean;
|
|
49
53
|
close: (index: string, indexPath: string[]) => boolean;
|
|
50
54
|
open: (index: string, indexPath: string[]) => boolean;
|
|
51
55
|
select: (index: string, indexPath: string[], item: MenuItemClicked, routerResult?: Promise<void | NavigationFailure> | undefined) => boolean;
|
|
@@ -67,6 +71,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
67
71
|
firstPopperClass: StringConstructor;
|
|
68
72
|
tooltipDisabled: BooleanConstructor;
|
|
69
73
|
ellipsisProps: import("vue").PropType<import("./types").EllipsisProps>;
|
|
74
|
+
textEllipsisTooltip: BooleanConstructor;
|
|
75
|
+
textEllipsisTooltipProps: import("vue").PropType<Partial<import("../ele-tooltip/props").TooltipProps>>;
|
|
70
76
|
mode: import("element-plus/es/utils/index").EpPropFinalized<StringConstructor, "horizontal" | "vertical", unknown, "vertical", boolean>;
|
|
71
77
|
defaultActive: import("element-plus/es/utils/index").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
72
78
|
defaultOpeneds: import("element-plus/es/utils/index").EpPropFinalized<(new (...args: any[]) => string[]) | (() => string[]) | ((new (...args: any[]) => string[]) | (() => string[]))[], unknown, unknown, () => [], boolean>;
|
|
@@ -93,6 +99,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
93
99
|
onItemClick?: ((_item: import("./types").MenuItem, _e: MouseEvent) => any) | undefined;
|
|
94
100
|
onItemMouseenter?: ((_item: import("./types").MenuItem, _e: MouseEvent) => any) | undefined;
|
|
95
101
|
onItemMouseleave?: ((_item: import("./types").MenuItem, _e: MouseEvent) => any) | undefined;
|
|
102
|
+
onParentMouseenter?: ((_item: import("./types").MenuItem, _e: MouseEvent) => any) | undefined;
|
|
103
|
+
onParentMouseleave?: ((_item: import("./types").MenuItem, _e: MouseEvent) => any) | undefined;
|
|
96
104
|
}, {
|
|
97
105
|
showTimeout: number;
|
|
98
106
|
hideTimeout: number;
|
|
@@ -113,5 +121,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
113
121
|
colorful: boolean;
|
|
114
122
|
popupColorful: import("./types").PopupColorful;
|
|
115
123
|
tooltipDisabled: boolean;
|
|
124
|
+
textEllipsisTooltip: boolean;
|
|
116
125
|
}, {}>;
|
|
117
126
|
export default _default;
|
package/lib/ele-menus/props.cjs
CHANGED
|
@@ -27,7 +27,11 @@ const menusProps = {
|
|
|
27
27
|
/** 禁用 tooltip */
|
|
28
28
|
tooltipDisabled: Boolean,
|
|
29
29
|
/** 省略菜单的属性 */
|
|
30
|
-
ellipsisProps: Object
|
|
30
|
+
ellipsisProps: Object,
|
|
31
|
+
/** 是否开启菜单文本溢出提示 */
|
|
32
|
+
textEllipsisTooltip: Boolean,
|
|
33
|
+
/** 菜单文本溢出提示属性 */
|
|
34
|
+
textEllipsisTooltipProps: Object
|
|
31
35
|
};
|
|
32
36
|
const menuPropKeys = Object.keys(elementPlus.menuProps);
|
|
33
37
|
const menusEmits = {
|
|
@@ -37,7 +41,11 @@ const menusEmits = {
|
|
|
37
41
|
/** 子菜单项鼠标进入事件 */
|
|
38
42
|
itemMouseenter: (_item, _e) => true,
|
|
39
43
|
/** 子菜单项鼠标离开事件 */
|
|
40
|
-
itemMouseleave: (_item, _e) => true
|
|
44
|
+
itemMouseleave: (_item, _e) => true,
|
|
45
|
+
/** 父级菜单项鼠标进入事件 */
|
|
46
|
+
parentMouseenter: (_item, _e) => true,
|
|
47
|
+
/** 父级菜单项鼠标离开事件 */
|
|
48
|
+
parentMouseleave: (_item, _e) => true
|
|
41
49
|
};
|
|
42
50
|
exports.menuPropKeys = menuPropKeys;
|
|
43
51
|
exports.menusEmits = menusEmits;
|
package/lib/ele-menus/props.d.ts
CHANGED
|
@@ -30,6 +30,10 @@ export declare const menusProps: {
|
|
|
30
30
|
tooltipDisabled: BooleanConstructor;
|
|
31
31
|
/** 省略菜单的属性 */
|
|
32
32
|
ellipsisProps: PropType<EllipsisProps>;
|
|
33
|
+
/** 是否开启菜单文本溢出提示 */
|
|
34
|
+
textEllipsisTooltip: BooleanConstructor;
|
|
35
|
+
/** 菜单文本溢出提示属性 */
|
|
36
|
+
textEllipsisTooltipProps: PropType<Partial<import("../ele-tooltip/props").TooltipProps>>;
|
|
33
37
|
mode: import("element-plus/es/utils/index").EpPropFinalized<StringConstructor, "horizontal" | "vertical", unknown, "vertical", boolean>;
|
|
34
38
|
defaultActive: import("element-plus/es/utils/index").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
35
39
|
defaultOpeneds: import("element-plus/es/utils/index").EpPropFinalized<(new (...args: any[]) => string[]) | (() => string[]) | ((new (...args: any[]) => string[]) | (() => string[]))[], unknown, unknown, () => [], boolean>;
|
|
@@ -66,6 +70,10 @@ export declare const menusEmits: {
|
|
|
66
70
|
itemMouseenter: (_item: MenuItem, _e: MouseEvent) => boolean;
|
|
67
71
|
/** 子菜单项鼠标离开事件 */
|
|
68
72
|
itemMouseleave: (_item: MenuItem, _e: MouseEvent) => boolean;
|
|
73
|
+
/** 父级菜单项鼠标进入事件 */
|
|
74
|
+
parentMouseenter: (_item: MenuItem, _e: MouseEvent) => boolean;
|
|
75
|
+
/** 父级菜单项鼠标离开事件 */
|
|
76
|
+
parentMouseleave: (_item: MenuItem, _e: MouseEvent) => boolean;
|
|
69
77
|
close: (index: string, indexPath: string[]) => boolean;
|
|
70
78
|
open: (index: string, indexPath: string[]) => boolean;
|
|
71
79
|
select: (index: string, indexPath: string[], item: import("element-plus").MenuItemClicked, routerResult?: Promise<void | import("vue-router").NavigationFailure> | undefined) => boolean;
|