@web-utils/component 2.0.13 → 2.0.14
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/dist/chunks/3a79781b.js +75 -0
- package/dist/chunks/{44b78389.js → 41a066be.js} +8 -8
- package/dist/chunks/{e1939731.js → 5a78e0db.js} +5 -6
- package/dist/chunks/5d4282fb.js +30 -0
- package/dist/chunks/{822300f3.js → 61ad06b2.js} +3 -3
- package/dist/chunks/76680a03.js +24 -0
- package/dist/chunks/8c0142e0.js +81 -0
- package/dist/chunks/97652d86.js +26 -0
- package/dist/chunks/b4acd3a6.js +126 -0
- package/dist/chunks/f71045fc.js +184 -0
- package/dist/components/address-input/index.js +43 -56
- package/dist/components/address-input/style.css +1 -15
- package/dist/components/aside-menu/index.js +30 -36
- package/dist/components/aside-menu/style.css +1 -9
- package/dist/components/awesome-button/index.js +32 -35
- package/dist/components/base.css +1 -66
- package/dist/components/capsule-tab/index.js +27 -33
- package/dist/components/capsule-tab/style.css +1 -32
- package/dist/components/chunk-file-uploader/index.js +54 -88
- package/dist/components/chunk-file-uploader/style.css +1 -4
- package/dist/components/chunk-file-uploader-button/index.js +25 -31
- package/dist/components/chunk-file-uploader-button/style.css +1 -17
- package/dist/components/chunk-file-uploader-drop/index.js +28 -42
- package/dist/components/chunk-file-uploader-drop/style.css +1 -12
- package/dist/components/chunk-file-uploader-file/index.js +134 -211
- package/dist/components/chunk-file-uploader-file/style.css +1 -125
- package/dist/components/chunk-file-uploader-files/index.js +28 -34
- package/dist/components/chunk-file-uploader-files/style.css +1 -9
- package/dist/components/chunk-file-uploader-list/index.js +29 -35
- package/dist/components/chunk-file-uploader-list/style.css +1 -9
- package/dist/components/chunk-file-uploader-un-support/index.js +30 -38
- package/dist/components/chunk-file-uploader-un-support/style.css +1 -6
- package/dist/components/code-mirror-editor/index.js +153 -181
- package/dist/components/code-mirror-editor/style.css +1 -17
- package/dist/components/color-picker/index.js +49 -68
- package/dist/components/confirm-button/index.js +19 -21
- package/dist/components/confirmable/index.js +18 -19
- package/dist/components/context-menu/index.js +108 -130
- package/dist/components/context-menu/style.css +1 -88
- package/dist/components/custom-scrollbar/index.js +49 -67
- package/dist/components/data-table-picker/index.js +62 -81
- package/dist/components/dynamic-table/index.js +89 -113
- package/dist/components/dynamic-table/style.css +1 -30
- package/dist/components/e-charts/index.js +120 -201
- package/dist/components/e-charts/style.css +1 -10
- package/dist/components/editable-progress/index.js +60 -93
- package/dist/components/editable-progress/style.css +1 -37
- package/dist/components/editable-tree/index.js +423 -638
- package/dist/components/editable-tree/style.css +1 -82
- package/dist/components/egd-collapse/index.js +33 -46
- package/dist/components/egd-collapse-item/index.js +60 -76
- package/dist/components/element-dialog/index.js +95 -147
- package/dist/components/element-dialog/style.css +1 -102
- package/dist/components/empty-view/index.js +28 -34
- package/dist/components/empty-view/style.css +1 -17
- package/dist/components/error-view/index.js +26 -32
- package/dist/components/error-view/style.css +1 -17
- package/dist/components/flex-column/index.js +25 -40
- package/dist/components/flex-item/index.js +29 -57
- package/dist/components/flex-row/index.js +25 -40
- package/dist/components/flex-scroller/index.js +26 -32
- package/dist/components/flex-scroller/style.css +1 -20
- package/dist/components/form-button/index.js +34 -38
- package/dist/components/form-cascader/index.js +71 -81
- package/dist/components/form-checkbox-group/index.js +88 -113
- package/dist/components/form-checkbox-group/style.css +1 -51
- package/dist/components/form-date-picker/index.js +70 -132
- package/dist/components/form-holder/index.js +32 -39
- package/dist/components/form-input/index.js +56 -62
- package/dist/components/form-input-email/index.js +48 -60
- package/dist/components/form-input-id-card/index.js +53 -59
- package/dist/components/form-input-number/index.js +61 -68
- package/dist/components/form-input-number/style.css +1 -12
- package/dist/components/form-input-phone-number/index.js +49 -55
- package/dist/components/form-input-time/index.js +53 -59
- package/dist/components/form-item/index.js +80 -123
- package/dist/components/form-item/style.css +1 -11
- package/dist/components/form-item-config-provider/index.js +25 -26
- package/dist/components/form-item-group/index.js +85 -111
- package/dist/components/form-item-group/style.css +1 -30
- package/dist/components/form-radio-group/index.js +85 -104
- package/dist/components/form-radio-group/style.css +1 -53
- package/dist/components/form-select/index.js +76 -91
- package/dist/components/form-switch/index.js +51 -57
- package/dist/components/form-textarea/index.js +51 -57
- package/dist/components/form-view/index.js +165 -232
- package/dist/components/form-view/style.css +1 -158
- package/dist/components/guide-steps/index.js +44 -58
- package/dist/components/guide-steps/style.css +1 -34
- package/dist/components/icon-card/index.js +29 -35
- package/dist/components/icon-card/style.css +1 -56
- package/dist/components/iframe-window/index.js +29 -35
- package/dist/components/iframe-window/style.css +1 -20
- package/dist/components/image-viewer/index.js +48 -66
- package/dist/components/image-viewer/style.css +1 -21
- package/dist/components/input-number/index.js +127 -193
- package/dist/components/input-number/style.css +1 -15
- package/dist/components/input-number-range/index.js +45 -57
- package/dist/components/input-number-range/style.css +1 -12
- package/dist/components/j-s-x-component/index.js +4 -4
- package/dist/components/keep-view-alive/index.js +73 -120
- package/dist/components/loading-view/index.js +26 -32
- package/dist/components/loading-view/style.css +1 -17
- package/dist/components/nav-bar/index.js +27 -37
- package/dist/components/nav-bar/style.css +1 -17
- package/dist/components/not-implement/index.js +23 -31
- package/dist/components/not-implement/style.css +1 -15
- package/dist/components/page/index.js +22 -28
- package/dist/components/page/style.css +1 -12
- package/dist/components/page-header/index.js +30 -36
- package/dist/components/page-header/style.css +1 -14
- package/dist/components/page-index/index.js +62 -83
- package/dist/components/page-index/style.css +1 -23
- package/dist/components/page-index-top/index.js +53 -68
- package/dist/components/page-skeleton/index.js +31 -37
- package/dist/components/page-skeleton/style.css +1 -23
- package/dist/components/page-skeleton-new/index.js +42 -48
- package/dist/components/page-skeleton-new/style.css +1 -42
- package/dist/components/pageable-table/index.js +186 -253
- package/dist/components/pageable-table/style.css +1 -72
- package/dist/components/pageable-view/index.js +129 -199
- package/dist/components/pageable-view/style.css +1 -69
- package/dist/components/photo-swipe/index.js +110 -151
- package/dist/components/photo-swipe/style.css +1 -20
- package/dist/components/resize-observer/index.js +34 -68
- package/dist/components/resize-observer/style.css +1 -31
- package/dist/components/search-popover/index.js +153 -211
- package/dist/components/search-popover/style.css +1 -93
- package/dist/components/sign-panel/index.js +92 -142
- package/dist/components/sign-panel/style.css +1 -97
- package/dist/components/split-pane/index.js +101 -162
- package/dist/components/split-pane/style.css +1 -100
- package/dist/components/stateful/index.js +31 -34
- package/dist/components/stateful/style.css +1 -33
- package/dist/components/static-pageable-table/index.js +37 -44
- package/dist/components/static-pageable-table/style.css +1 -9
- package/dist/components/swiper/index.js +85 -150
- package/dist/components/swiper/style.css +1 -43
- package/dist/components/tab/index.js +54 -72
- package/dist/components/tab/style.css +1 -122
- package/dist/components/tab-item/index.js +30 -35
- package/dist/components/table-column/index.js +30 -32
- package/dist/components/table-view/index.js +156 -227
- package/dist/components/table-view/style.css +1 -95
- package/dist/components/tag-render/index.js +44 -58
- package/dist/components/tag-render/style.css +1 -33
- package/dist/components/tinymce-editor/index.js +79 -95
- package/dist/components/tinymce-editor/style.css +1 -43
- package/dist/components/tinymce-wrapper/index.js +92 -121
- package/dist/components/tinymce-wrapper/style.css +1 -36
- package/dist/components/toolbar/index.js +63 -84
- package/dist/components/toolbar/style.css +1 -39
- package/dist/components/toolbar-button/index.js +41 -48
- package/dist/components/toolbar-button/style.css +1 -21
- package/dist/components/trigger/index.js +29 -36
- package/dist/components/vue-tags-input/index.js +188 -308
- package/dist/components/vue-tags-input/style.css +1 -682
- package/dist/components/watermark/index.js +25 -37
- package/dist/components/watermark/style.css +1 -11
- package/dist/components/x-dialog/index.js +67 -93
- package/dist/components/x-dialog/style.css +1 -15
- package/dist/index.css +193 -1105
- package/dist/index.es.js +4790 -7243
- package/package.json +1 -1
- package/web-types.json +1 -1
- package/dist/chunks/3d28cc08.js +0 -57
- package/dist/chunks/5d33812d.js +0 -147
- package/dist/chunks/9d848bf6.js +0 -99
- package/dist/chunks/a0bb327b.js +0 -96
- package/dist/chunks/a8891d2c.js +0 -30
- package/dist/chunks/c69d5628.js +0 -248
- package/dist/chunks/de9fe802.js +0 -24
|
@@ -1,297 +1,289 @@
|
|
|
1
1
|
import { copy, isInContainer } from "@web-utils/core";
|
|
2
2
|
import ClickOutside from "element-ui/lib/utils/clickoutside";
|
|
3
|
-
import { n as normalizeComponent } from "../../chunks/
|
|
3
|
+
import { n as normalizeComponent } from "../../chunks/5d4282fb.js";
|
|
4
4
|
var render = function() {
|
|
5
|
-
var
|
|
6
|
-
|
|
7
|
-
var _c = _vm._self._c || _h;
|
|
8
|
-
return _c("div", {
|
|
5
|
+
var t = this, r = t.$createElement, e = t._self._c || r;
|
|
6
|
+
return e("div", {
|
|
9
7
|
directives: [{
|
|
10
8
|
name: "show",
|
|
11
9
|
rawName: "v-show",
|
|
12
|
-
value:
|
|
10
|
+
value: t.showPopover,
|
|
13
11
|
expression: "showPopover"
|
|
14
12
|
}, {
|
|
15
13
|
name: "click-outside",
|
|
16
14
|
rawName: "v-click-outside",
|
|
17
|
-
value:
|
|
15
|
+
value: t.hidePopover,
|
|
18
16
|
expression: "hidePopover"
|
|
19
17
|
}],
|
|
20
18
|
staticClass: "search-popover"
|
|
21
|
-
}, [
|
|
19
|
+
}, [e("div", {
|
|
22
20
|
staticStyle: {
|
|
23
|
-
|
|
21
|
+
padding: "10px"
|
|
24
22
|
}
|
|
25
|
-
}, [
|
|
23
|
+
}, [e("input", {
|
|
26
24
|
directives: [{
|
|
27
25
|
name: "model",
|
|
28
26
|
rawName: "v-model",
|
|
29
|
-
value:
|
|
27
|
+
value: t.keyword,
|
|
30
28
|
expression: "keyword"
|
|
31
29
|
}],
|
|
32
30
|
ref: "searchInput",
|
|
33
31
|
staticClass: "search-input",
|
|
34
32
|
attrs: {
|
|
35
|
-
|
|
33
|
+
placeholder: t.currentItem ? t.currentItem.name : "输入关键字搜索 ..."
|
|
36
34
|
},
|
|
37
35
|
domProps: {
|
|
38
|
-
|
|
36
|
+
value: t.keyword
|
|
39
37
|
},
|
|
40
38
|
on: {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
return;
|
|
44
|
-
_vm.keyword = $event.target.value;
|
|
39
|
+
input: function(s) {
|
|
40
|
+
s.target.composing || (t.keyword = s.target.value);
|
|
45
41
|
}
|
|
46
42
|
}
|
|
47
|
-
})]),
|
|
43
|
+
})]), e("ul", {
|
|
48
44
|
ref: "ul",
|
|
49
45
|
staticStyle: {
|
|
50
46
|
"list-style-type": "none",
|
|
51
|
-
|
|
52
|
-
|
|
47
|
+
flex: "1",
|
|
48
|
+
overflow: "auto"
|
|
53
49
|
}
|
|
54
|
-
}, [
|
|
55
|
-
return
|
|
56
|
-
key:
|
|
50
|
+
}, [t.filterList.length ? t._l(t.filterList, function(s, o) {
|
|
51
|
+
return e("li", {
|
|
52
|
+
key: s.name + o,
|
|
57
53
|
staticClass: "search-li",
|
|
58
54
|
attrs: {
|
|
59
|
-
|
|
55
|
+
id: `item-${o}`
|
|
60
56
|
},
|
|
61
57
|
on: {
|
|
62
|
-
|
|
63
|
-
return
|
|
58
|
+
mousemove: function(i) {
|
|
59
|
+
return t.mouseHoverItem(s, o);
|
|
64
60
|
}
|
|
65
61
|
}
|
|
66
|
-
}, [
|
|
62
|
+
}, [e("a", {
|
|
67
63
|
class: ["search-item", {
|
|
68
|
-
active:
|
|
64
|
+
active: t.currentIndex === o
|
|
69
65
|
}],
|
|
70
66
|
attrs: {
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
67
|
+
target: s.url ? "_blank" : "",
|
|
68
|
+
rel: "noopener noreferrer",
|
|
69
|
+
href: s.url ? s.url : "javascript:void(0)"
|
|
74
70
|
},
|
|
75
71
|
on: {
|
|
76
|
-
|
|
77
|
-
return
|
|
72
|
+
click: function(i) {
|
|
73
|
+
return t.onItemClick(s);
|
|
78
74
|
}
|
|
79
75
|
}
|
|
80
|
-
}, [
|
|
76
|
+
}, [e("div", {
|
|
81
77
|
staticClass: "search-icon"
|
|
82
|
-
}, [
|
|
83
|
-
class:
|
|
84
|
-
})]),
|
|
78
|
+
}, [e("i", {
|
|
79
|
+
class: s.icon || "el-icon-menu"
|
|
80
|
+
})]), e("div", {
|
|
85
81
|
staticStyle: {
|
|
86
|
-
|
|
82
|
+
flex: "1",
|
|
87
83
|
"text-align": "left",
|
|
88
|
-
|
|
84
|
+
padding: "0 10px",
|
|
89
85
|
"overflow-x": "hidden",
|
|
90
86
|
"box-sizing": "border-box"
|
|
91
87
|
}
|
|
92
|
-
}, [
|
|
88
|
+
}, [e("p", {
|
|
93
89
|
staticStyle: {
|
|
94
90
|
"margin-bottom": "4px",
|
|
95
91
|
"font-size": "16px"
|
|
96
92
|
}
|
|
97
|
-
}, [
|
|
93
|
+
}, [t._v(t._s(s.name))]), e("p", {
|
|
98
94
|
staticClass: "url"
|
|
99
|
-
}, [
|
|
95
|
+
}, [t._v(t._s(s.url || s.path))])]), e("div", {
|
|
100
96
|
staticClass: "search-icon search-action"
|
|
101
|
-
}, [
|
|
97
|
+
}, [e("svg", {
|
|
102
98
|
staticClass: "action",
|
|
103
99
|
attrs: {
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
100
|
+
width: "20",
|
|
101
|
+
height: "20",
|
|
102
|
+
viewBox: "0 0 20 20"
|
|
107
103
|
}
|
|
108
|
-
}, [
|
|
104
|
+
}, [e("g", {
|
|
109
105
|
attrs: {
|
|
110
|
-
|
|
111
|
-
|
|
106
|
+
stroke: "currentColor",
|
|
107
|
+
fill: "none",
|
|
112
108
|
"fill-rule": "evenodd",
|
|
113
109
|
"stroke-linecap": "round",
|
|
114
110
|
"stroke-linejoin": "round"
|
|
115
111
|
}
|
|
116
|
-
}, [
|
|
112
|
+
}, [e("path", {
|
|
117
113
|
attrs: {
|
|
118
|
-
|
|
114
|
+
d: "M18 3v4c0 2-2 4-4 4H2"
|
|
119
115
|
}
|
|
120
|
-
}),
|
|
116
|
+
}), e("path", {
|
|
121
117
|
attrs: {
|
|
122
|
-
|
|
118
|
+
d: "M8 17l-6-6 6-6"
|
|
123
119
|
}
|
|
124
120
|
})])])])])]);
|
|
125
|
-
}) :
|
|
121
|
+
}) : t.evalResult !== "" ? e("li", {
|
|
126
122
|
staticClass: "search-li",
|
|
127
123
|
on: {
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
return
|
|
124
|
+
click: t.copyEvalResult,
|
|
125
|
+
mousemove: function(s) {
|
|
126
|
+
return t.mouseHoverItem({}, -1);
|
|
131
127
|
}
|
|
132
128
|
}
|
|
133
|
-
}, [
|
|
129
|
+
}, [e("a", {
|
|
134
130
|
class: ["search-item", {
|
|
135
|
-
active:
|
|
131
|
+
active: t.currentIndex === -1
|
|
136
132
|
}],
|
|
137
133
|
attrs: {
|
|
138
|
-
|
|
139
|
-
|
|
134
|
+
rel: "noopener noreferrer",
|
|
135
|
+
href: "javascript:void(0)"
|
|
140
136
|
}
|
|
141
|
-
}, [
|
|
137
|
+
}, [t._m(0), e("div", {
|
|
142
138
|
staticStyle: {
|
|
143
|
-
|
|
139
|
+
flex: "1",
|
|
144
140
|
"text-align": "left",
|
|
145
|
-
|
|
141
|
+
padding: "0 10px",
|
|
146
142
|
"overflow-x": "hidden",
|
|
147
143
|
"box-sizing": "border-box"
|
|
148
144
|
}
|
|
149
|
-
}, [
|
|
145
|
+
}, [e("p", {
|
|
150
146
|
staticStyle: {
|
|
151
147
|
"margin-bottom": "4px",
|
|
152
148
|
"font-size": "16px"
|
|
153
149
|
}
|
|
154
|
-
}, [
|
|
150
|
+
}, [t._v("Result: " + t._s(t.evalResult))]), e("p", {
|
|
155
151
|
staticClass: "url"
|
|
156
|
-
}, [
|
|
152
|
+
}, [t._v("点击或这按 Enter 键复制")])]), e("div", {
|
|
157
153
|
staticClass: "search-icon search-action"
|
|
158
|
-
}, [
|
|
154
|
+
}, [e("svg", {
|
|
159
155
|
staticClass: "action",
|
|
160
156
|
attrs: {
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
157
|
+
width: "20",
|
|
158
|
+
height: "20",
|
|
159
|
+
viewBox: "0 0 20 20"
|
|
164
160
|
}
|
|
165
|
-
}, [
|
|
161
|
+
}, [e("g", {
|
|
166
162
|
attrs: {
|
|
167
|
-
|
|
168
|
-
|
|
163
|
+
stroke: "currentColor",
|
|
164
|
+
fill: "none",
|
|
169
165
|
"fill-rule": "evenodd",
|
|
170
166
|
"stroke-linecap": "round",
|
|
171
167
|
"stroke-linejoin": "round"
|
|
172
168
|
}
|
|
173
|
-
}, [
|
|
169
|
+
}, [e("path", {
|
|
174
170
|
attrs: {
|
|
175
|
-
|
|
171
|
+
d: "M18 3v4c0 2-2 4-4 4H2"
|
|
176
172
|
}
|
|
177
|
-
}),
|
|
173
|
+
}), e("path", {
|
|
178
174
|
attrs: {
|
|
179
|
-
|
|
175
|
+
d: "M8 17l-6-6 6-6"
|
|
180
176
|
}
|
|
181
|
-
})])])])])]) :
|
|
177
|
+
})])])])])]) : e("li", {
|
|
182
178
|
staticStyle: {
|
|
183
|
-
|
|
184
|
-
|
|
179
|
+
height: "100%",
|
|
180
|
+
display: "flex",
|
|
185
181
|
"align-items": "center",
|
|
186
182
|
"justify-content": "center",
|
|
187
|
-
|
|
183
|
+
color: "#808080"
|
|
188
184
|
}
|
|
189
|
-
}, [
|
|
185
|
+
}, [t._v(" Sorry,no result ! ")])], 2), e("div", {
|
|
190
186
|
staticClass: "footer-tips"
|
|
191
|
-
}, [
|
|
187
|
+
}, [e("span", {
|
|
192
188
|
staticClass: "keyboard-key"
|
|
193
|
-
}, [
|
|
189
|
+
}, [e("svg", {
|
|
194
190
|
attrs: {
|
|
195
|
-
|
|
196
|
-
|
|
191
|
+
width: "15",
|
|
192
|
+
height: "15"
|
|
197
193
|
}
|
|
198
|
-
}, [
|
|
194
|
+
}, [e("g", {
|
|
199
195
|
attrs: {
|
|
200
|
-
|
|
201
|
-
|
|
196
|
+
fill: "none",
|
|
197
|
+
stroke: "currentColor",
|
|
202
198
|
"stroke-linecap": "round",
|
|
203
199
|
"stroke-linejoin": "round",
|
|
204
200
|
"stroke-width": "1.2"
|
|
205
201
|
}
|
|
206
|
-
}, [
|
|
202
|
+
}, [e("path", {
|
|
207
203
|
attrs: {
|
|
208
|
-
|
|
204
|
+
d: "M12 3.53088v3c0 1-1 2-2 2H4M7 11.53088l-3-3 3-3"
|
|
209
205
|
}
|
|
210
|
-
})])])]),
|
|
206
|
+
})])])]), e("span", {
|
|
211
207
|
staticStyle: {
|
|
212
208
|
"font-size": "12px",
|
|
213
209
|
"margin-right": "20px"
|
|
214
210
|
}
|
|
215
|
-
}, [
|
|
211
|
+
}, [t._v("选择")]), e("span", {
|
|
216
212
|
staticClass: "keyboard-key"
|
|
217
|
-
}, [
|
|
213
|
+
}, [e("svg", {
|
|
218
214
|
attrs: {
|
|
219
|
-
|
|
220
|
-
|
|
215
|
+
width: "15",
|
|
216
|
+
height: "15"
|
|
221
217
|
}
|
|
222
|
-
}, [
|
|
218
|
+
}, [e("g", {
|
|
223
219
|
attrs: {
|
|
224
|
-
|
|
225
|
-
|
|
220
|
+
fill: "none",
|
|
221
|
+
stroke: "currentColor",
|
|
226
222
|
"stroke-linecap": "round",
|
|
227
223
|
"stroke-linejoin": "round",
|
|
228
224
|
"stroke-width": "1.2"
|
|
229
225
|
}
|
|
230
|
-
}, [
|
|
226
|
+
}, [e("path", {
|
|
231
227
|
attrs: {
|
|
232
|
-
|
|
228
|
+
d: "M7.5 3.5v8M10.5 8.5l-3 3-3-3"
|
|
233
229
|
}
|
|
234
|
-
})])])]),
|
|
230
|
+
})])])]), e("span", {
|
|
235
231
|
staticClass: "keyboard-key"
|
|
236
|
-
}, [
|
|
232
|
+
}, [e("svg", {
|
|
237
233
|
attrs: {
|
|
238
|
-
|
|
239
|
-
|
|
234
|
+
width: "15",
|
|
235
|
+
height: "15"
|
|
240
236
|
}
|
|
241
|
-
}, [
|
|
237
|
+
}, [e("g", {
|
|
242
238
|
attrs: {
|
|
243
|
-
|
|
244
|
-
|
|
239
|
+
fill: "none",
|
|
240
|
+
stroke: "currentColor",
|
|
245
241
|
"stroke-linecap": "round",
|
|
246
242
|
"stroke-linejoin": "round",
|
|
247
243
|
"stroke-width": "1.2"
|
|
248
244
|
}
|
|
249
|
-
}, [
|
|
245
|
+
}, [e("path", {
|
|
250
246
|
attrs: {
|
|
251
|
-
|
|
247
|
+
d: "M7.5 11.5v-8M10.5 6.5l-3-3-3 3"
|
|
252
248
|
}
|
|
253
|
-
})])])]),
|
|
249
|
+
})])])]), e("span", {
|
|
254
250
|
staticStyle: {
|
|
255
251
|
"font-size": "12px",
|
|
256
252
|
"margin-right": "20px"
|
|
257
253
|
}
|
|
258
|
-
}, [
|
|
254
|
+
}, [t._v("切换")]), e("span", {
|
|
259
255
|
staticClass: "keyboard-key"
|
|
260
|
-
}, [
|
|
256
|
+
}, [e("svg", {
|
|
261
257
|
attrs: {
|
|
262
|
-
|
|
263
|
-
|
|
258
|
+
width: "15",
|
|
259
|
+
height: "15"
|
|
264
260
|
}
|
|
265
|
-
}, [
|
|
261
|
+
}, [e("g", {
|
|
266
262
|
attrs: {
|
|
267
|
-
|
|
268
|
-
|
|
263
|
+
fill: "none",
|
|
264
|
+
stroke: "currentColor",
|
|
269
265
|
"stroke-linecap": "round",
|
|
270
266
|
"stroke-linejoin": "round",
|
|
271
267
|
"stroke-width": "1.2"
|
|
272
268
|
}
|
|
273
|
-
}, [
|
|
269
|
+
}, [e("path", {
|
|
274
270
|
attrs: {
|
|
275
|
-
|
|
271
|
+
d: "M13.6167 8.936c-.1065.3583-.6883.962-1.4875.962-.7993 0-1.653-.9165-1.653-2.1258v-.5678c0-1.2548.7896-2.1016 1.653-2.1016.8634 0 1.3601.4778 1.4875 1.0724M9 6c-.1352-.4735-.7506-.9219-1.46-.8972-.7092.0246-1.344.57-1.344 1.2166s.4198.8812 1.3445.9805C8.465 7.3992 8.968 7.9337 9 8.5c.032.5663-.454 1.398-1.4595 1.398C6.6593 9.898 6 9 5.963 8.4851m-1.4748.5368c-.2635.5941-.8099.876-1.5443.876s-1.7073-.6248-1.7073-2.204v-.4603c0-1.0416.721-2.131 1.7073-2.131.9864 0 1.6425 1.031 1.5443 2.2492h-2.956"
|
|
276
272
|
}
|
|
277
|
-
})])])]),
|
|
273
|
+
})])])]), e("span", {
|
|
278
274
|
staticStyle: {
|
|
279
275
|
"font-size": "12px"
|
|
280
276
|
}
|
|
281
|
-
}, [
|
|
282
|
-
}
|
|
283
|
-
var
|
|
284
|
-
|
|
285
|
-
var _h = _vm.$createElement;
|
|
286
|
-
var _c = _vm._self._c || _h;
|
|
287
|
-
return _c("div", {
|
|
277
|
+
}, [t._v("关闭")])])]);
|
|
278
|
+
}, staticRenderFns = [function() {
|
|
279
|
+
var t = this, r = t.$createElement, e = t._self._c || r;
|
|
280
|
+
return e("div", {
|
|
288
281
|
staticClass: "search-icon"
|
|
289
|
-
}, [
|
|
282
|
+
}, [e("i", {
|
|
290
283
|
staticClass: "fa fa-table"
|
|
291
284
|
})]);
|
|
292
285
|
}];
|
|
293
|
-
const SearchPopover_vue_vue_type_style_index_0_lang = ""
|
|
294
|
-
const __vue2_script = {
|
|
286
|
+
const SearchPopover_vue_vue_type_style_index_0_lang = "", __vue2_script = {
|
|
295
287
|
name: "SearchPopover",
|
|
296
288
|
directives: {
|
|
297
289
|
ClickOutside
|
|
@@ -304,7 +296,7 @@ const __vue2_script = {
|
|
|
304
296
|
},
|
|
305
297
|
data() {
|
|
306
298
|
return {
|
|
307
|
-
showPopover:
|
|
299
|
+
showPopover: !1,
|
|
308
300
|
keyword: "",
|
|
309
301
|
currentIndex: 0,
|
|
310
302
|
last: 0
|
|
@@ -312,33 +304,26 @@ const __vue2_script = {
|
|
|
312
304
|
},
|
|
313
305
|
computed: {
|
|
314
306
|
filterList() {
|
|
315
|
-
return this.services.filter((
|
|
307
|
+
return this.services.filter((t) => t.name.indexOf(this.keyword) > -1);
|
|
316
308
|
},
|
|
317
309
|
currentItem() {
|
|
318
|
-
var
|
|
319
|
-
return (
|
|
310
|
+
var t;
|
|
311
|
+
return (t = this.filterList) == null ? void 0 : t[this.currentIndex];
|
|
320
312
|
},
|
|
321
313
|
evalResult() {
|
|
322
314
|
try {
|
|
323
315
|
return eval(this.keyword);
|
|
324
|
-
} catch (
|
|
316
|
+
} catch (t) {
|
|
325
317
|
return "";
|
|
326
318
|
}
|
|
327
319
|
}
|
|
328
320
|
},
|
|
329
321
|
watch: {
|
|
330
322
|
keyword() {
|
|
331
|
-
this.currentIndex = 0;
|
|
332
|
-
if (!this.currentItem && this.currentIndex !== -1) {
|
|
333
|
-
this.currentIndex = -1;
|
|
334
|
-
}
|
|
323
|
+
this.currentIndex = 0, !this.currentItem && this.currentIndex !== -1 && (this.currentIndex = -1);
|
|
335
324
|
},
|
|
336
|
-
showPopover(
|
|
337
|
-
|
|
338
|
-
document.body.style.overflow = "hidden";
|
|
339
|
-
} else {
|
|
340
|
-
document.body.style.overflow = "";
|
|
341
|
-
}
|
|
325
|
+
showPopover(t) {
|
|
326
|
+
t ? document.body.style.overflow = "hidden" : document.body.style.overflow = "";
|
|
342
327
|
}
|
|
343
328
|
},
|
|
344
329
|
mounted() {
|
|
@@ -348,98 +333,55 @@ const __vue2_script = {
|
|
|
348
333
|
window.removeEventListener("keydown", this.keydown);
|
|
349
334
|
},
|
|
350
335
|
methods: {
|
|
351
|
-
async onItemClick(
|
|
352
|
-
|
|
353
|
-
this.hidePopover();
|
|
354
|
-
await this.$router.push(item.path);
|
|
355
|
-
}
|
|
336
|
+
async onItemClick(t) {
|
|
337
|
+
t.path && (this.hidePopover(), await this.$router.push(t.path));
|
|
356
338
|
},
|
|
357
339
|
copyEvalResult() {
|
|
358
340
|
return copy(this.evalResult);
|
|
359
341
|
},
|
|
360
342
|
hidePopover() {
|
|
361
|
-
this.showPopover =
|
|
343
|
+
this.showPopover = !1;
|
|
362
344
|
},
|
|
363
345
|
displayPopover() {
|
|
364
|
-
this.showPopover =
|
|
346
|
+
this.showPopover = !0;
|
|
365
347
|
},
|
|
366
|
-
mouseHoverItem(
|
|
367
|
-
this.currentIndex =
|
|
348
|
+
mouseHoverItem(t, r) {
|
|
349
|
+
this.currentIndex = r;
|
|
368
350
|
},
|
|
369
|
-
async keydown(
|
|
370
|
-
if (
|
|
371
|
-
const
|
|
372
|
-
|
|
373
|
-
this.showPopover = true;
|
|
374
|
-
await this.$nextTick();
|
|
375
|
-
this.$refs.searchInput.focus();
|
|
376
|
-
} else {
|
|
377
|
-
this.last = Date.now();
|
|
378
|
-
}
|
|
379
|
-
}
|
|
380
|
-
if (this.showPopover === true) {
|
|
381
|
-
if (event.key === "Escape") {
|
|
382
|
-
this.hidePopover();
|
|
383
|
-
}
|
|
384
|
-
if (event.key === "Enter") {
|
|
385
|
-
if (this.currentItem) {
|
|
386
|
-
if (this.currentItem.url) {
|
|
387
|
-
window.open(this.currentItem.url, "_blank");
|
|
388
|
-
this.hidePopover();
|
|
389
|
-
} else if (this.currentItem.path) {
|
|
390
|
-
await this.onItemClick(this.currentItem);
|
|
391
|
-
}
|
|
392
|
-
} else {
|
|
393
|
-
this.copyEvalResult();
|
|
394
|
-
}
|
|
395
|
-
}
|
|
396
|
-
if (event.key === "ArrowUp") {
|
|
397
|
-
this.currentIndex--;
|
|
398
|
-
if (this.currentIndex < 0) {
|
|
399
|
-
this.currentIndex = this.filterList.length - 1;
|
|
400
|
-
}
|
|
401
|
-
this.scrollIntoView(this.currentIndex);
|
|
402
|
-
}
|
|
403
|
-
if (event.key === "ArrowDown") {
|
|
404
|
-
this.currentIndex++;
|
|
405
|
-
if (this.currentIndex >= this.filterList.length) {
|
|
406
|
-
this.currentIndex = 0;
|
|
407
|
-
}
|
|
408
|
-
this.scrollIntoView(this.currentIndex);
|
|
409
|
-
}
|
|
351
|
+
async keydown(t) {
|
|
352
|
+
if (t.key === "Shift") {
|
|
353
|
+
const r = Date.now() - this.last;
|
|
354
|
+
r > 0 && r < 500 ? (this.showPopover = !0, await this.$nextTick(), this.$refs.searchInput.focus()) : this.last = Date.now();
|
|
410
355
|
}
|
|
356
|
+
this.showPopover === !0 && (t.key === "Escape" && this.hidePopover(), t.key === "Enter" && (this.currentItem ? this.currentItem.url ? (window.open(this.currentItem.url, "_blank"), this.hidePopover()) : this.currentItem.path && await this.onItemClick(this.currentItem) : this.copyEvalResult()), t.key === "ArrowUp" && (this.currentIndex--, this.currentIndex < 0 && (this.currentIndex = this.filterList.length - 1), this.scrollIntoView(this.currentIndex)), t.key === "ArrowDown" && (this.currentIndex++, this.currentIndex >= this.filterList.length && (this.currentIndex = 0), this.scrollIntoView(this.currentIndex)));
|
|
411
357
|
},
|
|
412
|
-
scrollIntoView(
|
|
413
|
-
if (
|
|
358
|
+
scrollIntoView(t) {
|
|
359
|
+
if (t === 0) {
|
|
414
360
|
this.$refs.ul.scrollTop = 0;
|
|
415
361
|
return;
|
|
416
362
|
}
|
|
417
|
-
if (
|
|
363
|
+
if (t === this.filterList.length) {
|
|
418
364
|
this.$refs.ul.scrollTop = this.$refs.ul.scrollHeight;
|
|
419
365
|
return;
|
|
420
366
|
}
|
|
421
|
-
const
|
|
422
|
-
|
|
423
|
-
this.$refs.ul.scrollTop = item.offsetTop - item.clientHeight + 20;
|
|
424
|
-
}
|
|
367
|
+
const r = this.$refs.ul.querySelector(`#item-${t}`);
|
|
368
|
+
isInContainer(r, this.$refs.ul, { topOffset: -78, bottomOffset: 78 }) || (this.$refs.ul.scrollTop = r.offsetTop - r.clientHeight + 20);
|
|
425
369
|
}
|
|
426
370
|
}
|
|
427
|
-
};
|
|
428
|
-
const __cssModules = {};
|
|
371
|
+
}, __cssModules = {};
|
|
429
372
|
var __component__ = /* @__PURE__ */ normalizeComponent(
|
|
430
373
|
__vue2_script,
|
|
431
374
|
render,
|
|
432
375
|
staticRenderFns,
|
|
433
|
-
|
|
376
|
+
!1,
|
|
434
377
|
__vue2_injectStyles,
|
|
435
378
|
null,
|
|
436
379
|
null,
|
|
437
380
|
null
|
|
438
381
|
);
|
|
439
|
-
function __vue2_injectStyles(
|
|
440
|
-
for (let
|
|
441
|
-
this[
|
|
442
|
-
}
|
|
382
|
+
function __vue2_injectStyles(t) {
|
|
383
|
+
for (let r in __cssModules)
|
|
384
|
+
this[r] = __cssModules[r];
|
|
443
385
|
}
|
|
444
386
|
const SearchPopover = /* @__PURE__ */ function() {
|
|
445
387
|
return __component__.exports;
|