bkui-vue 2.0.1 → 2.0.2-beta.10
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/index.cjs.js +23 -23
- package/dist/index.esm.js +5684 -5650
- package/dist/index.umd.js +27 -27
- package/dist/style.css +1 -1
- package/dist/style.variable.css +1 -1
- package/lib/cascader/index.js +1669 -181
- package/lib/color-picker/index.js +1613 -170
- package/lib/components.d.ts +1 -2
- package/lib/components.js +1 -2
- package/lib/date-picker/date-picker.css +220 -4
- package/lib/date-picker/date-picker.less +5 -5
- package/lib/date-picker/date-picker.variable.css +237 -21
- package/lib/date-picker/index.js +1882 -470
- package/lib/directives/index.js +228 -111
- package/lib/form/index.js +1570 -162
- package/lib/image/index.js +1468 -164
- package/lib/index.d.ts +0 -1
- package/lib/index.js +1 -2
- package/lib/input/index.js +1301 -13
- package/lib/pop-confirm/index.d.ts +16 -2
- package/lib/pop-confirm/index.js +13 -5
- package/lib/pop-confirm/pop-confirm.d.ts +5 -1
- package/lib/popover/index.js +1356 -68
- package/lib/search-select/index.js +1329 -108
- package/lib/select/index.js +1237 -16
- package/lib/slider/index.js +2 -1
- package/lib/tab/index.js +1277 -10
- package/lib/table/index.js +1346 -125
- package/lib/tag-input/index.js +1278 -16
- package/lib/tree/index.d.ts +4 -0
- package/lib/tree/index.js +47 -23
- package/lib/tree/props.d.ts +1 -0
- package/lib/tree/tree.css +18 -0
- package/lib/tree/tree.d.ts +2 -0
- package/lib/tree/tree.less +24 -0
- package/lib/tree/tree.variable.css +18 -0
- package/lib/tree/use-node-action.d.ts +1 -1
- package/package.json +1 -1
- package/lib/plugin-popover/index.d.ts +0 -27
- package/lib/plugin-popover/index.js +0 -65
- package/lib/plugins/index.d.ts +0 -1
- package/lib/plugins/index.js +0 -64
@@ -3,9 +3,11 @@ import "./search-select.less";
|
|
3
3
|
import * as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03__ from "../shared";
|
4
4
|
import * as __WEBPACK_EXTERNAL_MODULE_vue__ from "vue";
|
5
5
|
import * as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_config_provider_fe8577a3__ from "../config-provider";
|
6
|
-
import * as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_directives_45d4776f__ from "../directives";
|
7
|
-
import * as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_icon_a97c79c3__ from "../icon";
|
8
6
|
import * as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_popover_9b03f19d__ from "../popover";
|
7
|
+
import * as __WEBPACK_EXTERNAL_MODULE__popperjs_core_a5c7319c__ from "@popperjs/core";
|
8
|
+
import * as __WEBPACK_EXTERNAL_MODULE__loading_4d683b23__ from "../loading";
|
9
|
+
import * as __WEBPACK_EXTERNAL_MODULE__overflow_title_f9bafa47__ from "../overflow-title";
|
10
|
+
import * as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_icon_a97c79c3__ from "../icon";
|
9
11
|
import "../popover/popover.less";
|
10
12
|
import * as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_checkbox_13b1cb4a__ from "../checkbox";
|
11
13
|
import "../checkbox/checkbox.less";
|
@@ -13,6 +15,611 @@ import * as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_radio_d36f24cf__ from "../rad
|
|
13
15
|
import "../radio/radio.less";
|
14
16
|
/******/ var __webpack_modules__ = ({
|
15
17
|
|
18
|
+
/***/ 2439:
|
19
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
20
|
+
|
21
|
+
module.exports = __webpack_require__(2527);
|
22
|
+
|
23
|
+
|
24
|
+
/***/ }),
|
25
|
+
|
26
|
+
/***/ 7430:
|
27
|
+
/***/ ((module) => {
|
28
|
+
|
29
|
+
/**
|
30
|
+
* Copyright (c) 2015, Facebook, Inc.
|
31
|
+
* All rights reserved.
|
32
|
+
*
|
33
|
+
* This source code is licensed under the BSD-style license found in the
|
34
|
+
* LICENSE file in the root directory of this source tree. An additional grant
|
35
|
+
* of patent rights can be found in the PATENTS file in the same directory.
|
36
|
+
*
|
37
|
+
* @providesModule ExecutionEnvironment
|
38
|
+
*/
|
39
|
+
|
40
|
+
/*jslint evil: true */
|
41
|
+
|
42
|
+
|
43
|
+
|
44
|
+
var canUseDOM = !!(
|
45
|
+
typeof window !== 'undefined' &&
|
46
|
+
window.document &&
|
47
|
+
window.document.createElement
|
48
|
+
);
|
49
|
+
|
50
|
+
/**
|
51
|
+
* Simple, lightweight module assisting with the detection and context of
|
52
|
+
* Worker. Helps avoid circular dependencies and allows code to reason about
|
53
|
+
* whether or not they are in a Worker, even if they never include the main
|
54
|
+
* `ReactWorker` dependency.
|
55
|
+
*/
|
56
|
+
var ExecutionEnvironment = {
|
57
|
+
|
58
|
+
canUseDOM: canUseDOM,
|
59
|
+
|
60
|
+
canUseWorkers: typeof Worker !== 'undefined',
|
61
|
+
|
62
|
+
canUseEventListeners:
|
63
|
+
canUseDOM && !!(window.addEventListener || window.attachEvent),
|
64
|
+
|
65
|
+
canUseViewport: canUseDOM && !!window.screen,
|
66
|
+
|
67
|
+
isInWorker: !canUseDOM // For now, this is true - might change in the future.
|
68
|
+
|
69
|
+
};
|
70
|
+
|
71
|
+
module.exports = ExecutionEnvironment;
|
72
|
+
|
73
|
+
|
74
|
+
/***/ }),
|
75
|
+
|
76
|
+
/***/ 6377:
|
77
|
+
/***/ ((module) => {
|
78
|
+
|
79
|
+
/**
|
80
|
+
* Copyright 2004-present Facebook. All Rights Reserved.
|
81
|
+
*
|
82
|
+
* @providesModule UserAgent_DEPRECATED
|
83
|
+
*/
|
84
|
+
|
85
|
+
/**
|
86
|
+
* Provides entirely client-side User Agent and OS detection. You should prefer
|
87
|
+
* the non-deprecated UserAgent module when possible, which exposes our
|
88
|
+
* authoritative server-side PHP-based detection to the client.
|
89
|
+
*
|
90
|
+
* Usage is straightforward:
|
91
|
+
*
|
92
|
+
* if (UserAgent_DEPRECATED.ie()) {
|
93
|
+
* // IE
|
94
|
+
* }
|
95
|
+
*
|
96
|
+
* You can also do version checks:
|
97
|
+
*
|
98
|
+
* if (UserAgent_DEPRECATED.ie() >= 7) {
|
99
|
+
* // IE7 or better
|
100
|
+
* }
|
101
|
+
*
|
102
|
+
* The browser functions will return NaN if the browser does not match, so
|
103
|
+
* you can also do version compares the other way:
|
104
|
+
*
|
105
|
+
* if (UserAgent_DEPRECATED.ie() < 7) {
|
106
|
+
* // IE6 or worse
|
107
|
+
* }
|
108
|
+
*
|
109
|
+
* Note that the version is a float and may include a minor version number,
|
110
|
+
* so you should always use range operators to perform comparisons, not
|
111
|
+
* strict equality.
|
112
|
+
*
|
113
|
+
* **Note:** You should **strongly** prefer capability detection to browser
|
114
|
+
* version detection where it's reasonable:
|
115
|
+
*
|
116
|
+
* http://www.quirksmode.org/js/support.html
|
117
|
+
*
|
118
|
+
* Further, we have a large number of mature wrapper functions and classes
|
119
|
+
* which abstract away many browser irregularities. Check the documentation,
|
120
|
+
* grep for things, or ask on javascript@lists.facebook.com before writing yet
|
121
|
+
* another copy of "event || window.event".
|
122
|
+
*
|
123
|
+
*/
|
124
|
+
|
125
|
+
var _populated = false;
|
126
|
+
|
127
|
+
// Browsers
|
128
|
+
var _ie, _firefox, _opera, _webkit, _chrome;
|
129
|
+
|
130
|
+
// Actual IE browser for compatibility mode
|
131
|
+
var _ie_real_version;
|
132
|
+
|
133
|
+
// Platforms
|
134
|
+
var _osx, _windows, _linux, _android;
|
135
|
+
|
136
|
+
// Architectures
|
137
|
+
var _win64;
|
138
|
+
|
139
|
+
// Devices
|
140
|
+
var _iphone, _ipad, _native;
|
141
|
+
|
142
|
+
var _mobile;
|
143
|
+
|
144
|
+
function _populate() {
|
145
|
+
if (_populated) {
|
146
|
+
return;
|
147
|
+
}
|
148
|
+
|
149
|
+
_populated = true;
|
150
|
+
|
151
|
+
// To work around buggy JS libraries that can't handle multi-digit
|
152
|
+
// version numbers, Opera 10's user agent string claims it's Opera
|
153
|
+
// 9, then later includes a Version/X.Y field:
|
154
|
+
//
|
155
|
+
// Opera/9.80 (foo) Presto/2.2.15 Version/10.10
|
156
|
+
var uas = navigator.userAgent;
|
157
|
+
var agent = /(?:MSIE.(\d+\.\d+))|(?:(?:Firefox|GranParadiso|Iceweasel).(\d+\.\d+))|(?:Opera(?:.+Version.|.)(\d+\.\d+))|(?:AppleWebKit.(\d+(?:\.\d+)?))|(?:Trident\/\d+\.\d+.*rv:(\d+\.\d+))/.exec(uas);
|
158
|
+
var os = /(Mac OS X)|(Windows)|(Linux)/.exec(uas);
|
159
|
+
|
160
|
+
_iphone = /\b(iPhone|iP[ao]d)/.exec(uas);
|
161
|
+
_ipad = /\b(iP[ao]d)/.exec(uas);
|
162
|
+
_android = /Android/i.exec(uas);
|
163
|
+
_native = /FBAN\/\w+;/i.exec(uas);
|
164
|
+
_mobile = /Mobile/i.exec(uas);
|
165
|
+
|
166
|
+
// Note that the IE team blog would have you believe you should be checking
|
167
|
+
// for 'Win64; x64'. But MSDN then reveals that you can actually be coming
|
168
|
+
// from either x64 or ia64; so ultimately, you should just check for Win64
|
169
|
+
// as in indicator of whether you're in 64-bit IE. 32-bit IE on 64-bit
|
170
|
+
// Windows will send 'WOW64' instead.
|
171
|
+
_win64 = !!(/Win64/.exec(uas));
|
172
|
+
|
173
|
+
if (agent) {
|
174
|
+
_ie = agent[1] ? parseFloat(agent[1]) : (
|
175
|
+
agent[5] ? parseFloat(agent[5]) : NaN);
|
176
|
+
// IE compatibility mode
|
177
|
+
if (_ie && document && document.documentMode) {
|
178
|
+
_ie = document.documentMode;
|
179
|
+
}
|
180
|
+
// grab the "true" ie version from the trident token if available
|
181
|
+
var trident = /(?:Trident\/(\d+.\d+))/.exec(uas);
|
182
|
+
_ie_real_version = trident ? parseFloat(trident[1]) + 4 : _ie;
|
183
|
+
|
184
|
+
_firefox = agent[2] ? parseFloat(agent[2]) : NaN;
|
185
|
+
_opera = agent[3] ? parseFloat(agent[3]) : NaN;
|
186
|
+
_webkit = agent[4] ? parseFloat(agent[4]) : NaN;
|
187
|
+
if (_webkit) {
|
188
|
+
// We do not add the regexp to the above test, because it will always
|
189
|
+
// match 'safari' only since 'AppleWebKit' appears before 'Chrome' in
|
190
|
+
// the userAgent string.
|
191
|
+
agent = /(?:Chrome\/(\d+\.\d+))/.exec(uas);
|
192
|
+
_chrome = agent && agent[1] ? parseFloat(agent[1]) : NaN;
|
193
|
+
} else {
|
194
|
+
_chrome = NaN;
|
195
|
+
}
|
196
|
+
} else {
|
197
|
+
_ie = _firefox = _opera = _chrome = _webkit = NaN;
|
198
|
+
}
|
199
|
+
|
200
|
+
if (os) {
|
201
|
+
if (os[1]) {
|
202
|
+
// Detect OS X version. If no version number matches, set _osx to true.
|
203
|
+
// Version examples: 10, 10_6_1, 10.7
|
204
|
+
// Parses version number as a float, taking only first two sets of
|
205
|
+
// digits. If only one set of digits is found, returns just the major
|
206
|
+
// version number.
|
207
|
+
var ver = /(?:Mac OS X (\d+(?:[._]\d+)?))/.exec(uas);
|
208
|
+
|
209
|
+
_osx = ver ? parseFloat(ver[1].replace('_', '.')) : true;
|
210
|
+
} else {
|
211
|
+
_osx = false;
|
212
|
+
}
|
213
|
+
_windows = !!os[2];
|
214
|
+
_linux = !!os[3];
|
215
|
+
} else {
|
216
|
+
_osx = _windows = _linux = false;
|
217
|
+
}
|
218
|
+
}
|
219
|
+
|
220
|
+
var UserAgent_DEPRECATED = {
|
221
|
+
|
222
|
+
/**
|
223
|
+
* Check if the UA is Internet Explorer.
|
224
|
+
*
|
225
|
+
*
|
226
|
+
* @return float|NaN Version number (if match) or NaN.
|
227
|
+
*/
|
228
|
+
ie: function() {
|
229
|
+
return _populate() || _ie;
|
230
|
+
},
|
231
|
+
|
232
|
+
/**
|
233
|
+
* Check if we're in Internet Explorer compatibility mode.
|
234
|
+
*
|
235
|
+
* @return bool true if in compatibility mode, false if
|
236
|
+
* not compatibility mode or not ie
|
237
|
+
*/
|
238
|
+
ieCompatibilityMode: function() {
|
239
|
+
return _populate() || (_ie_real_version > _ie);
|
240
|
+
},
|
241
|
+
|
242
|
+
|
243
|
+
/**
|
244
|
+
* Whether the browser is 64-bit IE. Really, this is kind of weak sauce; we
|
245
|
+
* only need this because Skype can't handle 64-bit IE yet. We need to remove
|
246
|
+
* this when we don't need it -- tracked by #601957.
|
247
|
+
*/
|
248
|
+
ie64: function() {
|
249
|
+
return UserAgent_DEPRECATED.ie() && _win64;
|
250
|
+
},
|
251
|
+
|
252
|
+
/**
|
253
|
+
* Check if the UA is Firefox.
|
254
|
+
*
|
255
|
+
*
|
256
|
+
* @return float|NaN Version number (if match) or NaN.
|
257
|
+
*/
|
258
|
+
firefox: function() {
|
259
|
+
return _populate() || _firefox;
|
260
|
+
},
|
261
|
+
|
262
|
+
|
263
|
+
/**
|
264
|
+
* Check if the UA is Opera.
|
265
|
+
*
|
266
|
+
*
|
267
|
+
* @return float|NaN Version number (if match) or NaN.
|
268
|
+
*/
|
269
|
+
opera: function() {
|
270
|
+
return _populate() || _opera;
|
271
|
+
},
|
272
|
+
|
273
|
+
|
274
|
+
/**
|
275
|
+
* Check if the UA is WebKit.
|
276
|
+
*
|
277
|
+
*
|
278
|
+
* @return float|NaN Version number (if match) or NaN.
|
279
|
+
*/
|
280
|
+
webkit: function() {
|
281
|
+
return _populate() || _webkit;
|
282
|
+
},
|
283
|
+
|
284
|
+
/**
|
285
|
+
* For Push
|
286
|
+
* WILL BE REMOVED VERY SOON. Use UserAgent_DEPRECATED.webkit
|
287
|
+
*/
|
288
|
+
safari: function() {
|
289
|
+
return UserAgent_DEPRECATED.webkit();
|
290
|
+
},
|
291
|
+
|
292
|
+
/**
|
293
|
+
* Check if the UA is a Chrome browser.
|
294
|
+
*
|
295
|
+
*
|
296
|
+
* @return float|NaN Version number (if match) or NaN.
|
297
|
+
*/
|
298
|
+
chrome : function() {
|
299
|
+
return _populate() || _chrome;
|
300
|
+
},
|
301
|
+
|
302
|
+
|
303
|
+
/**
|
304
|
+
* Check if the user is running Windows.
|
305
|
+
*
|
306
|
+
* @return bool `true' if the user's OS is Windows.
|
307
|
+
*/
|
308
|
+
windows: function() {
|
309
|
+
return _populate() || _windows;
|
310
|
+
},
|
311
|
+
|
312
|
+
|
313
|
+
/**
|
314
|
+
* Check if the user is running Mac OS X.
|
315
|
+
*
|
316
|
+
* @return float|bool Returns a float if a version number is detected,
|
317
|
+
* otherwise true/false.
|
318
|
+
*/
|
319
|
+
osx: function() {
|
320
|
+
return _populate() || _osx;
|
321
|
+
},
|
322
|
+
|
323
|
+
/**
|
324
|
+
* Check if the user is running Linux.
|
325
|
+
*
|
326
|
+
* @return bool `true' if the user's OS is some flavor of Linux.
|
327
|
+
*/
|
328
|
+
linux: function() {
|
329
|
+
return _populate() || _linux;
|
330
|
+
},
|
331
|
+
|
332
|
+
/**
|
333
|
+
* Check if the user is running on an iPhone or iPod platform.
|
334
|
+
*
|
335
|
+
* @return bool `true' if the user is running some flavor of the
|
336
|
+
* iPhone OS.
|
337
|
+
*/
|
338
|
+
iphone: function() {
|
339
|
+
return _populate() || _iphone;
|
340
|
+
},
|
341
|
+
|
342
|
+
mobile: function() {
|
343
|
+
return _populate() || (_iphone || _ipad || _android || _mobile);
|
344
|
+
},
|
345
|
+
|
346
|
+
nativeApp: function() {
|
347
|
+
// webviews inside of the native apps
|
348
|
+
return _populate() || _native;
|
349
|
+
},
|
350
|
+
|
351
|
+
android: function() {
|
352
|
+
return _populate() || _android;
|
353
|
+
},
|
354
|
+
|
355
|
+
ipad: function() {
|
356
|
+
return _populate() || _ipad;
|
357
|
+
}
|
358
|
+
};
|
359
|
+
|
360
|
+
module.exports = UserAgent_DEPRECATED;
|
361
|
+
|
362
|
+
|
363
|
+
/***/ }),
|
364
|
+
|
365
|
+
/***/ 3541:
|
366
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
367
|
+
|
368
|
+
/**
|
369
|
+
* Copyright 2013-2015, Facebook, Inc.
|
370
|
+
* All rights reserved.
|
371
|
+
*
|
372
|
+
* This source code is licensed under the BSD-style license found in the
|
373
|
+
* LICENSE file in the root directory of this source tree. An additional grant
|
374
|
+
* of patent rights can be found in the PATENTS file in the same directory.
|
375
|
+
*
|
376
|
+
* @providesModule isEventSupported
|
377
|
+
*/
|
378
|
+
|
379
|
+
|
380
|
+
|
381
|
+
var ExecutionEnvironment = __webpack_require__(7430);
|
382
|
+
|
383
|
+
var useHasFeature;
|
384
|
+
if (ExecutionEnvironment.canUseDOM) {
|
385
|
+
useHasFeature =
|
386
|
+
document.implementation &&
|
387
|
+
document.implementation.hasFeature &&
|
388
|
+
// always returns true in newer browsers as per the standard.
|
389
|
+
// @see http://dom.spec.whatwg.org/#dom-domimplementation-hasfeature
|
390
|
+
document.implementation.hasFeature('', '') !== true;
|
391
|
+
}
|
392
|
+
|
393
|
+
/**
|
394
|
+
* Checks if an event is supported in the current execution environment.
|
395
|
+
*
|
396
|
+
* NOTE: This will not work correctly for non-generic events such as `change`,
|
397
|
+
* `reset`, `load`, `error`, and `select`.
|
398
|
+
*
|
399
|
+
* Borrows from Modernizr.
|
400
|
+
*
|
401
|
+
* @param {string} eventNameSuffix Event name, e.g. "click".
|
402
|
+
* @param {?boolean} capture Check if the capture phase is supported.
|
403
|
+
* @return {boolean} True if the event is supported.
|
404
|
+
* @internal
|
405
|
+
* @license Modernizr 3.0.0pre (Custom Build) | MIT
|
406
|
+
*/
|
407
|
+
function isEventSupported(eventNameSuffix, capture) {
|
408
|
+
if (!ExecutionEnvironment.canUseDOM ||
|
409
|
+
capture && !('addEventListener' in document)) {
|
410
|
+
return false;
|
411
|
+
}
|
412
|
+
|
413
|
+
var eventName = 'on' + eventNameSuffix;
|
414
|
+
var isSupported = eventName in document;
|
415
|
+
|
416
|
+
if (!isSupported) {
|
417
|
+
var element = document.createElement('div');
|
418
|
+
element.setAttribute(eventName, 'return;');
|
419
|
+
isSupported = typeof element[eventName] === 'function';
|
420
|
+
}
|
421
|
+
|
422
|
+
if (!isSupported && useHasFeature && eventNameSuffix === 'wheel') {
|
423
|
+
// This is the only way to test support for the `wheel` event in IE9+.
|
424
|
+
isSupported = document.implementation.hasFeature('Events.wheel', '3.0');
|
425
|
+
}
|
426
|
+
|
427
|
+
return isSupported;
|
428
|
+
}
|
429
|
+
|
430
|
+
module.exports = isEventSupported;
|
431
|
+
|
432
|
+
|
433
|
+
/***/ }),
|
434
|
+
|
435
|
+
/***/ 2527:
|
436
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
437
|
+
|
438
|
+
/**
|
439
|
+
* Copyright (c) 2015, Facebook, Inc.
|
440
|
+
* All rights reserved.
|
441
|
+
*
|
442
|
+
* This source code is licensed under the BSD-style license found in the
|
443
|
+
* LICENSE file in the root directory of this source tree. An additional grant
|
444
|
+
* of patent rights can be found in the PATENTS file in the same directory.
|
445
|
+
*
|
446
|
+
* @providesModule normalizeWheel
|
447
|
+
* @typechecks
|
448
|
+
*/
|
449
|
+
|
450
|
+
|
451
|
+
|
452
|
+
var UserAgent_DEPRECATED = __webpack_require__(6377);
|
453
|
+
|
454
|
+
var isEventSupported = __webpack_require__(3541);
|
455
|
+
|
456
|
+
|
457
|
+
// Reasonable defaults
|
458
|
+
var PIXEL_STEP = 10;
|
459
|
+
var LINE_HEIGHT = 40;
|
460
|
+
var PAGE_HEIGHT = 800;
|
461
|
+
|
462
|
+
/**
|
463
|
+
* Mouse wheel (and 2-finger trackpad) support on the web sucks. It is
|
464
|
+
* complicated, thus this doc is long and (hopefully) detailed enough to answer
|
465
|
+
* your questions.
|
466
|
+
*
|
467
|
+
* If you need to react to the mouse wheel in a predictable way, this code is
|
468
|
+
* like your bestest friend. * hugs *
|
469
|
+
*
|
470
|
+
* As of today, there are 4 DOM event types you can listen to:
|
471
|
+
*
|
472
|
+
* 'wheel' -- Chrome(31+), FF(17+), IE(9+)
|
473
|
+
* 'mousewheel' -- Chrome, IE(6+), Opera, Safari
|
474
|
+
* 'MozMousePixelScroll' -- FF(3.5 only!) (2010-2013) -- don't bother!
|
475
|
+
* 'DOMMouseScroll' -- FF(0.9.7+) since 2003
|
476
|
+
*
|
477
|
+
* So what to do? The is the best:
|
478
|
+
*
|
479
|
+
* normalizeWheel.getEventType();
|
480
|
+
*
|
481
|
+
* In your event callback, use this code to get sane interpretation of the
|
482
|
+
* deltas. This code will return an object with properties:
|
483
|
+
*
|
484
|
+
* spinX -- normalized spin speed (use for zoom) - x plane
|
485
|
+
* spinY -- " - y plane
|
486
|
+
* pixelX -- normalized distance (to pixels) - x plane
|
487
|
+
* pixelY -- " - y plane
|
488
|
+
*
|
489
|
+
* Wheel values are provided by the browser assuming you are using the wheel to
|
490
|
+
* scroll a web page by a number of lines or pixels (or pages). Values can vary
|
491
|
+
* significantly on different platforms and browsers, forgetting that you can
|
492
|
+
* scroll at different speeds. Some devices (like trackpads) emit more events
|
493
|
+
* at smaller increments with fine granularity, and some emit massive jumps with
|
494
|
+
* linear speed or acceleration.
|
495
|
+
*
|
496
|
+
* This code does its best to normalize the deltas for you:
|
497
|
+
*
|
498
|
+
* - spin is trying to normalize how far the wheel was spun (or trackpad
|
499
|
+
* dragged). This is super useful for zoom support where you want to
|
500
|
+
* throw away the chunky scroll steps on the PC and make those equal to
|
501
|
+
* the slow and smooth tiny steps on the Mac. Key data: This code tries to
|
502
|
+
* resolve a single slow step on a wheel to 1.
|
503
|
+
*
|
504
|
+
* - pixel is normalizing the desired scroll delta in pixel units. You'll
|
505
|
+
* get the crazy differences between browsers, but at least it'll be in
|
506
|
+
* pixels!
|
507
|
+
*
|
508
|
+
* - positive value indicates scrolling DOWN/RIGHT, negative UP/LEFT. This
|
509
|
+
* should translate to positive value zooming IN, negative zooming OUT.
|
510
|
+
* This matches the newer 'wheel' event.
|
511
|
+
*
|
512
|
+
* Why are there spinX, spinY (or pixels)?
|
513
|
+
*
|
514
|
+
* - spinX is a 2-finger side drag on the trackpad, and a shift + wheel turn
|
515
|
+
* with a mouse. It results in side-scrolling in the browser by default.
|
516
|
+
*
|
517
|
+
* - spinY is what you expect -- it's the classic axis of a mouse wheel.
|
518
|
+
*
|
519
|
+
* - I dropped spinZ/pixelZ. It is supported by the DOM 3 'wheel' event and
|
520
|
+
* probably is by browsers in conjunction with fancy 3D controllers .. but
|
521
|
+
* you know.
|
522
|
+
*
|
523
|
+
* Implementation info:
|
524
|
+
*
|
525
|
+
* Examples of 'wheel' event if you scroll slowly (down) by one step with an
|
526
|
+
* average mouse:
|
527
|
+
*
|
528
|
+
* OS X + Chrome (mouse) - 4 pixel delta (wheelDelta -120)
|
529
|
+
* OS X + Safari (mouse) - N/A pixel delta (wheelDelta -12)
|
530
|
+
* OS X + Firefox (mouse) - 0.1 line delta (wheelDelta N/A)
|
531
|
+
* Win8 + Chrome (mouse) - 100 pixel delta (wheelDelta -120)
|
532
|
+
* Win8 + Firefox (mouse) - 3 line delta (wheelDelta -120)
|
533
|
+
*
|
534
|
+
* On the trackpad:
|
535
|
+
*
|
536
|
+
* OS X + Chrome (trackpad) - 2 pixel delta (wheelDelta -6)
|
537
|
+
* OS X + Firefox (trackpad) - 1 pixel delta (wheelDelta N/A)
|
538
|
+
*
|
539
|
+
* On other/older browsers.. it's more complicated as there can be multiple and
|
540
|
+
* also missing delta values.
|
541
|
+
*
|
542
|
+
* The 'wheel' event is more standard:
|
543
|
+
*
|
544
|
+
* http://www.w3.org/TR/DOM-Level-3-Events/#events-wheelevents
|
545
|
+
*
|
546
|
+
* The basics is that it includes a unit, deltaMode (pixels, lines, pages), and
|
547
|
+
* deltaX, deltaY and deltaZ. Some browsers provide other values to maintain
|
548
|
+
* backward compatibility with older events. Those other values help us
|
549
|
+
* better normalize spin speed. Example of what the browsers provide:
|
550
|
+
*
|
551
|
+
* | event.wheelDelta | event.detail
|
552
|
+
* ------------------+------------------+--------------
|
553
|
+
* Safari v5/OS X | -120 | 0
|
554
|
+
* Safari v5/Win7 | -120 | 0
|
555
|
+
* Chrome v17/OS X | -120 | 0
|
556
|
+
* Chrome v17/Win7 | -120 | 0
|
557
|
+
* IE9/Win7 | -120 | undefined
|
558
|
+
* Firefox v4/OS X | undefined | 1
|
559
|
+
* Firefox v4/Win7 | undefined | 3
|
560
|
+
*
|
561
|
+
*/
|
562
|
+
function normalizeWheel(/*object*/ event) /*object*/ {
|
563
|
+
var sX = 0, sY = 0, // spinX, spinY
|
564
|
+
pX = 0, pY = 0; // pixelX, pixelY
|
565
|
+
|
566
|
+
// Legacy
|
567
|
+
if ('detail' in event) { sY = event.detail; }
|
568
|
+
if ('wheelDelta' in event) { sY = -event.wheelDelta / 120; }
|
569
|
+
if ('wheelDeltaY' in event) { sY = -event.wheelDeltaY / 120; }
|
570
|
+
if ('wheelDeltaX' in event) { sX = -event.wheelDeltaX / 120; }
|
571
|
+
|
572
|
+
// side scrolling on FF with DOMMouseScroll
|
573
|
+
if ( 'axis' in event && event.axis === event.HORIZONTAL_AXIS ) {
|
574
|
+
sX = sY;
|
575
|
+
sY = 0;
|
576
|
+
}
|
577
|
+
|
578
|
+
pX = sX * PIXEL_STEP;
|
579
|
+
pY = sY * PIXEL_STEP;
|
580
|
+
|
581
|
+
if ('deltaY' in event) { pY = event.deltaY; }
|
582
|
+
if ('deltaX' in event) { pX = event.deltaX; }
|
583
|
+
|
584
|
+
if ((pX || pY) && event.deltaMode) {
|
585
|
+
if (event.deltaMode == 1) { // delta in LINE units
|
586
|
+
pX *= LINE_HEIGHT;
|
587
|
+
pY *= LINE_HEIGHT;
|
588
|
+
} else { // delta in PAGE units
|
589
|
+
pX *= PAGE_HEIGHT;
|
590
|
+
pY *= PAGE_HEIGHT;
|
591
|
+
}
|
592
|
+
}
|
593
|
+
|
594
|
+
// Fall-back if spin cannot be determined
|
595
|
+
if (pX && !sX) { sX = (pX < 1) ? -1 : 1; }
|
596
|
+
if (pY && !sY) { sY = (pY < 1) ? -1 : 1; }
|
597
|
+
|
598
|
+
return { spinX : sX,
|
599
|
+
spinY : sY,
|
600
|
+
pixelX : pX,
|
601
|
+
pixelY : pY };
|
602
|
+
}
|
603
|
+
|
604
|
+
|
605
|
+
/**
|
606
|
+
* The best combination if you prefer spinX + spinY normalization. It favors
|
607
|
+
* the older DOMMouseScroll for Firefox, as FF does not include wheelDelta with
|
608
|
+
* 'wheel' event, making spin speed determination impossible.
|
609
|
+
*/
|
610
|
+
normalizeWheel.getEventType = function() /*string*/ {
|
611
|
+
return (UserAgent_DEPRECATED.firefox())
|
612
|
+
? 'DOMMouseScroll'
|
613
|
+
: (isEventSupported('wheel'))
|
614
|
+
? 'wheel'
|
615
|
+
: 'mousewheel';
|
616
|
+
};
|
617
|
+
|
618
|
+
module.exports = normalizeWheel;
|
619
|
+
|
620
|
+
|
621
|
+
/***/ }),
|
622
|
+
|
16
623
|
/***/ 7609:
|
17
624
|
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
18
625
|
|
@@ -428,67 +1035,722 @@ __webpack_require__.d(__webpack_exports__, {
|
|
428
1035
|
"default": () => (/* binding */ src)
|
429
1036
|
});
|
430
1037
|
|
431
|
-
;// CONCATENATED MODULE: external "../shared"
|
432
|
-
var x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
|
433
|
-
var y = x => () => x
|
434
|
-
const shared_namespaceObject = x({ ["debounce"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03__.debounce, ["random"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03__.random, ["withInstall"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03__.withInstall });
|
435
|
-
;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/typeof.js
|
436
|
-
function _typeof(o) {
|
437
|
-
"@babel/helpers - typeof";
|
1038
|
+
;// CONCATENATED MODULE: external "../shared"
|
1039
|
+
var x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
|
1040
|
+
var y = x => () => x
|
1041
|
+
const shared_namespaceObject = x({ ["bkZIndexManager"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03__.bkZIndexManager, ["debounce"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03__.debounce, ["random"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03__.random, ["resolveClassName"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03__.resolveClassName, ["withInstall"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03__.withInstall });
|
1042
|
+
;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/typeof.js
|
1043
|
+
function _typeof(o) {
|
1044
|
+
"@babel/helpers - typeof";
|
1045
|
+
|
1046
|
+
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
|
1047
|
+
return typeof o;
|
1048
|
+
} : function (o) {
|
1049
|
+
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
1050
|
+
}, _typeof(o);
|
1051
|
+
}
|
1052
|
+
;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/toPrimitive.js
|
1053
|
+
|
1054
|
+
function toPrimitive(t, r) {
|
1055
|
+
if ("object" != _typeof(t) || !t) return t;
|
1056
|
+
var e = t[Symbol.toPrimitive];
|
1057
|
+
if (void 0 !== e) {
|
1058
|
+
var i = e.call(t, r || "default");
|
1059
|
+
if ("object" != _typeof(i)) return i;
|
1060
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
1061
|
+
}
|
1062
|
+
return ("string" === r ? String : Number)(t);
|
1063
|
+
}
|
1064
|
+
;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/toPropertyKey.js
|
1065
|
+
|
1066
|
+
|
1067
|
+
function toPropertyKey(t) {
|
1068
|
+
var i = toPrimitive(t, "string");
|
1069
|
+
return "symbol" == _typeof(i) ? i : String(i);
|
1070
|
+
}
|
1071
|
+
;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/defineProperty.js
|
1072
|
+
|
1073
|
+
function _defineProperty(obj, key, value) {
|
1074
|
+
key = toPropertyKey(key);
|
1075
|
+
if (key in obj) {
|
1076
|
+
Object.defineProperty(obj, key, {
|
1077
|
+
value: value,
|
1078
|
+
enumerable: true,
|
1079
|
+
configurable: true,
|
1080
|
+
writable: true
|
1081
|
+
});
|
1082
|
+
} else {
|
1083
|
+
obj[key] = value;
|
1084
|
+
}
|
1085
|
+
return obj;
|
1086
|
+
}
|
1087
|
+
;// CONCATENATED MODULE: external "vue"
|
1088
|
+
var external_vue_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
|
1089
|
+
var external_vue_y = x => () => x
|
1090
|
+
const external_vue_namespaceObject = external_vue_x({ ["Fragment"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.Fragment, ["computed"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.computed, ["createTextVNode"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode, ["createVNode"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.createVNode, ["defineComponent"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent, ["h"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.h, ["inject"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.inject, ["nextTick"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.nextTick, ["onBeforeUnmount"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.onBeforeUnmount, ["onMounted"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.onMounted, ["provide"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.provide, ["ref"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.ref, ["render"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.render, ["resolveDirective"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.resolveDirective, ["shallowRef"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.shallowRef, ["watch"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.watch, ["withDirectives"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.withDirectives });
|
1091
|
+
;// CONCATENATED MODULE: external "../config-provider"
|
1092
|
+
var config_provider_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
|
1093
|
+
var config_provider_y = x => () => x
|
1094
|
+
const config_provider_namespaceObject = config_provider_x({ ["useLocale"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_config_provider_fe8577a3__.useLocale, ["usePrefix"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_config_provider_fe8577a3__.usePrefix });
|
1095
|
+
;// CONCATENATED MODULE: ../../packages/directives/src/clickoutside.ts
|
1096
|
+
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
|
1097
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
1098
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
1099
|
+
/*
|
1100
|
+
* Tencent is pleased to support the open source community by making
|
1101
|
+
* 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
|
1102
|
+
*
|
1103
|
+
* Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
|
1104
|
+
*
|
1105
|
+
* 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
|
1106
|
+
*
|
1107
|
+
* License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
|
1108
|
+
*
|
1109
|
+
* ---------------------------------------------------
|
1110
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
|
1111
|
+
* documentation files (the "Software"), to deal in the Software without restriction, including without limitation
|
1112
|
+
* the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
|
1113
|
+
* to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
1114
|
+
*
|
1115
|
+
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of
|
1116
|
+
* the Software.
|
1117
|
+
*
|
1118
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
|
1119
|
+
* THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
1120
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
|
1121
|
+
* CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
1122
|
+
* IN THE SOFTWARE.
|
1123
|
+
*/
|
1124
|
+
var isElement = function isElement(e) {
|
1125
|
+
if (typeof Element === 'undefined') return false;
|
1126
|
+
return e instanceof Element;
|
1127
|
+
};
|
1128
|
+
var nodeList = new Map();
|
1129
|
+
var startClick;
|
1130
|
+
document.addEventListener('mousedown', function (e) {
|
1131
|
+
return startClick = e;
|
1132
|
+
});
|
1133
|
+
document.addEventListener('mouseup', function (e) {
|
1134
|
+
var _iterator = _createForOfIteratorHelper(nodeList.values()),
|
1135
|
+
_step;
|
1136
|
+
try {
|
1137
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
1138
|
+
var handlers = _step.value;
|
1139
|
+
var _iterator2 = _createForOfIteratorHelper(handlers),
|
1140
|
+
_step2;
|
1141
|
+
try {
|
1142
|
+
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
1143
|
+
var documentHandler = _step2.value.documentHandler;
|
1144
|
+
documentHandler(e, startClick);
|
1145
|
+
}
|
1146
|
+
} catch (err) {
|
1147
|
+
_iterator2.e(err);
|
1148
|
+
} finally {
|
1149
|
+
_iterator2.f();
|
1150
|
+
}
|
1151
|
+
}
|
1152
|
+
} catch (err) {
|
1153
|
+
_iterator.e(err);
|
1154
|
+
} finally {
|
1155
|
+
_iterator.f();
|
1156
|
+
}
|
1157
|
+
});
|
1158
|
+
function createDocumentHandler(el, binding) {
|
1159
|
+
var excludes = [];
|
1160
|
+
if (Array.isArray(binding.arg)) {
|
1161
|
+
excludes = binding.arg;
|
1162
|
+
} else if (isElement(binding.arg)) {
|
1163
|
+
excludes.push(binding.arg);
|
1164
|
+
}
|
1165
|
+
return function (mouseup, mousedown) {
|
1166
|
+
var popperRef = binding.instance.popperRef;
|
1167
|
+
var mouseUpTarget = mouseup.target;
|
1168
|
+
var mouseDownTarget = mousedown === null || mousedown === void 0 ? void 0 : mousedown.target;
|
1169
|
+
var isBound = !binding || !binding.instance;
|
1170
|
+
var isTargetExists = !mouseUpTarget || !mouseDownTarget;
|
1171
|
+
var isContainedByEl = el.contains(mouseUpTarget) || el.contains(mouseDownTarget);
|
1172
|
+
var isSelf = el === mouseUpTarget;
|
1173
|
+
var isTargetExcluded = excludes.length && excludes.some(function (item) {
|
1174
|
+
return item === null || item === void 0 ? void 0 : item.contains(mouseUpTarget);
|
1175
|
+
}) || excludes.length && excludes.includes(mouseDownTarget);
|
1176
|
+
var isContainedByPopper = popperRef && (popperRef.contains(mouseUpTarget) || popperRef.contains(mouseDownTarget));
|
1177
|
+
if (isBound || isTargetExists || isContainedByEl || isSelf || isTargetExcluded || isContainedByPopper) {
|
1178
|
+
return;
|
1179
|
+
}
|
1180
|
+
binding.value(mouseup, mousedown);
|
1181
|
+
};
|
1182
|
+
}
|
1183
|
+
var ClickOutside = {
|
1184
|
+
beforeMount: function beforeMount(el, binding) {
|
1185
|
+
if (!nodeList.has(el)) {
|
1186
|
+
nodeList.set(el, []);
|
1187
|
+
}
|
1188
|
+
nodeList.get(el).push({
|
1189
|
+
documentHandler: createDocumentHandler(el, binding),
|
1190
|
+
bindingFn: binding.value
|
1191
|
+
});
|
1192
|
+
},
|
1193
|
+
updated: function updated(el, binding) {
|
1194
|
+
if (!nodeList.has(el)) {
|
1195
|
+
nodeList.set(el, []);
|
1196
|
+
}
|
1197
|
+
var handlers = nodeList.get(el);
|
1198
|
+
var oldHandlerIndex = handlers.findIndex(function (item) {
|
1199
|
+
return item.bindingFn === binding.oldValue;
|
1200
|
+
});
|
1201
|
+
var newHandler = {
|
1202
|
+
documentHandler: createDocumentHandler(el, binding),
|
1203
|
+
bindingFn: binding.value
|
1204
|
+
};
|
1205
|
+
if (oldHandlerIndex >= 0) {
|
1206
|
+
// replace the old handler to the new handler
|
1207
|
+
handlers.splice(oldHandlerIndex, 1, newHandler);
|
1208
|
+
} else {
|
1209
|
+
handlers.push(newHandler);
|
1210
|
+
}
|
1211
|
+
},
|
1212
|
+
unmounted: function unmounted(el) {
|
1213
|
+
// remove all listeners when a component unmounted
|
1214
|
+
nodeList["delete"](el);
|
1215
|
+
}
|
1216
|
+
};
|
1217
|
+
ClickOutside.install = function (app) {
|
1218
|
+
app.directive('bkTooltips', ClickOutside);
|
1219
|
+
};
|
1220
|
+
/* harmony default export */ const clickoutside = (ClickOutside);
|
1221
|
+
;// CONCATENATED MODULE: external "../popover"
|
1222
|
+
var popover_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
|
1223
|
+
var popover_y = x => () => x
|
1224
|
+
const popover_namespaceObject = popover_x({ ["$bkPopover"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_popover_9b03f19d__.$bkPopover, ["default"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_popover_9b03f19d__["default"] });
|
1225
|
+
;// CONCATENATED MODULE: ../../packages/directives/src/ellipsis.ts
|
1226
|
+
|
1227
|
+
/*
|
1228
|
+
* Tencent is pleased to support the open source community by making
|
1229
|
+
* 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
|
1230
|
+
*
|
1231
|
+
* Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
|
1232
|
+
*
|
1233
|
+
* 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
|
1234
|
+
*
|
1235
|
+
* License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
|
1236
|
+
*
|
1237
|
+
* ---------------------------------------------------
|
1238
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
|
1239
|
+
* documentation files (the "Software"), to deal in the Software without restriction, including without limitation
|
1240
|
+
* the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
|
1241
|
+
* to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
1242
|
+
*
|
1243
|
+
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of
|
1244
|
+
* the Software.
|
1245
|
+
*
|
1246
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
|
1247
|
+
* THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
1248
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
|
1249
|
+
* CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
1250
|
+
* IN THE SOFTWARE.
|
1251
|
+
*/
|
1252
|
+
|
1253
|
+
var resolveOptions = function resolveOptions(el, binding) {
|
1254
|
+
var options = {
|
1255
|
+
content: '',
|
1256
|
+
target: el
|
1257
|
+
};
|
1258
|
+
if (_typeof(binding) === 'object') {
|
1259
|
+
Object.assign(options, binding);
|
1260
|
+
if (Object.prototype.hasOwnProperty.call(binding, 'popoverOption')) {
|
1261
|
+
Object.assign(options, binding.popoverOption);
|
1262
|
+
}
|
1263
|
+
} else {
|
1264
|
+
options.content = binding;
|
1265
|
+
}
|
1266
|
+
return options;
|
1267
|
+
};
|
1268
|
+
var createInstance = function createInstance(el, binding) {
|
1269
|
+
var instance = null;
|
1270
|
+
var createTimer = null;
|
1271
|
+
var hidePopTimer = null;
|
1272
|
+
var options = resolveOptions(el, binding);
|
1273
|
+
var disabled = options.disabled;
|
1274
|
+
if (disabled || instance) {
|
1275
|
+
return;
|
1276
|
+
}
|
1277
|
+
var handleContentEnter = function handleContentEnter() {
|
1278
|
+
hidePopTimer && clearTimeout(hidePopTimer);
|
1279
|
+
hidePopTimer = null;
|
1280
|
+
};
|
1281
|
+
var handleContentLeave = function handleContentLeave() {
|
1282
|
+
var _instance, _instance2;
|
1283
|
+
if (createTimer) {
|
1284
|
+
clearTimeout(createTimer);
|
1285
|
+
}
|
1286
|
+
(_instance = instance) === null || _instance === void 0 || _instance.hide();
|
1287
|
+
(_instance2 = instance) === null || _instance2 === void 0 || _instance2.close();
|
1288
|
+
instance = null;
|
1289
|
+
};
|
1290
|
+
var handleMouseEnter = function handleMouseEnter() {
|
1291
|
+
handleContentLeave();
|
1292
|
+
createTimer && clearTimeout(createTimer);
|
1293
|
+
createTimer = setTimeout(function () {
|
1294
|
+
var targetOptions = resolveOptions(el, binding);
|
1295
|
+
targetOptions.isShow = true;
|
1296
|
+
targetOptions.content = typeof targetOptions.content === 'function' ? targetOptions.content() : targetOptions.content || el.innerText;
|
1297
|
+
targetOptions.allowHtml = true;
|
1298
|
+
Object.assign(targetOptions, {
|
1299
|
+
onContentMouseenter: handleContentEnter,
|
1300
|
+
onContentMouseleave: handleContentLeave
|
1301
|
+
});
|
1302
|
+
instance = (0,popover_namespaceObject.$bkPopover)(targetOptions);
|
1303
|
+
}, 300);
|
1304
|
+
};
|
1305
|
+
var handleMouseLeave = function handleMouseLeave() {
|
1306
|
+
hidePopTimer = setTimeout(function () {
|
1307
|
+
var _instance3, _instance4;
|
1308
|
+
if (createTimer) {
|
1309
|
+
clearTimeout(createTimer);
|
1310
|
+
}
|
1311
|
+
(_instance3 = instance) === null || _instance3 === void 0 || _instance3.hide();
|
1312
|
+
(_instance4 = instance) === null || _instance4 === void 0 || _instance4.close();
|
1313
|
+
instance = null;
|
1314
|
+
}, 120);
|
1315
|
+
};
|
1316
|
+
el.addEventListener('mouseenter', handleMouseEnter);
|
1317
|
+
el.addEventListener('mouseleave', handleMouseLeave);
|
1318
|
+
var destroyInstance = function destroyInstance(element) {
|
1319
|
+
var _ref, _ref2;
|
1320
|
+
handleMouseLeave();
|
1321
|
+
(_ref = element !== null && element !== void 0 ? element : el) === null || _ref === void 0 || _ref.removeEventListener('mouseenter', handleMouseEnter);
|
1322
|
+
(_ref2 = element !== null && element !== void 0 ? element : el) === null || _ref2 === void 0 || _ref2.removeEventListener('mouseleave', handleMouseLeave);
|
1323
|
+
};
|
1324
|
+
return {
|
1325
|
+
destroyInstance: destroyInstance,
|
1326
|
+
instance: instance
|
1327
|
+
};
|
1328
|
+
};
|
1329
|
+
var ellipsis = {
|
1330
|
+
mounted: function mounted(el, binding) {
|
1331
|
+
createInstance(el, binding);
|
1332
|
+
}
|
1333
|
+
};
|
1334
|
+
/* harmony default export */ const src_ellipsis = ((/* unused pure expression or super */ null && (ellipsis)));
|
1335
|
+
// EXTERNAL MODULE: ../../node_modules/normalize-wheel/index.js
|
1336
|
+
var normalize_wheel = __webpack_require__(2439);
|
1337
|
+
var normalize_wheel_default = /*#__PURE__*/__webpack_require__.n(normalize_wheel);
|
1338
|
+
;// CONCATENATED MODULE: ../../packages/directives/src/mousewheel.ts
|
1339
|
+
/*
|
1340
|
+
* Tencent is pleased to support the open source community by making
|
1341
|
+
* 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
|
1342
|
+
*
|
1343
|
+
* Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
|
1344
|
+
*
|
1345
|
+
* 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
|
1346
|
+
*
|
1347
|
+
* License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
|
1348
|
+
*
|
1349
|
+
* ---------------------------------------------------
|
1350
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
|
1351
|
+
* documentation files (the "Software"), to deal in the Software without restriction, including without limitation
|
1352
|
+
* the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
|
1353
|
+
* to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
1354
|
+
*
|
1355
|
+
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of
|
1356
|
+
* the Software.
|
1357
|
+
*
|
1358
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
|
1359
|
+
* THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
1360
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
|
1361
|
+
* CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
1362
|
+
* IN THE SOFTWARE.
|
1363
|
+
*/
|
1364
|
+
|
1365
|
+
var isFirefox = typeof navigator !== 'undefined' && navigator.userAgent.toLowerCase().indexOf('firefox') > -1;
|
1366
|
+
var mousewheelHandler = function mousewheelHandler(element, callback) {
|
1367
|
+
if (element !== null && element !== void 0 && element.addEventListener) {
|
1368
|
+
element.addEventListener(isFirefox ? 'DOMMouseScroll' : 'mousewheel', function (e) {
|
1369
|
+
var normalized = normalize_wheel_default()(e);
|
1370
|
+
callback === null || callback === void 0 || callback.apply(this, [e, normalized]);
|
1371
|
+
});
|
1372
|
+
}
|
1373
|
+
};
|
1374
|
+
var mousewheel = {
|
1375
|
+
beforeMount: function beforeMount(el, binding) {
|
1376
|
+
mousewheelHandler(el, binding.value);
|
1377
|
+
}
|
1378
|
+
};
|
1379
|
+
/* harmony default export */ const src_mousewheel = ((/* unused pure expression or super */ null && (mousewheel)));
|
1380
|
+
;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js
|
1381
|
+
function arrayLikeToArray_arrayLikeToArray(arr, len) {
|
1382
|
+
if (len == null || len > arr.length) len = arr.length;
|
1383
|
+
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
1384
|
+
return arr2;
|
1385
|
+
}
|
1386
|
+
;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js
|
438
1387
|
|
439
|
-
|
440
|
-
|
441
|
-
} : function (o) {
|
442
|
-
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
443
|
-
}, _typeof(o);
|
1388
|
+
function _arrayWithoutHoles(arr) {
|
1389
|
+
if (Array.isArray(arr)) return arrayLikeToArray_arrayLikeToArray(arr);
|
444
1390
|
}
|
445
|
-
;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/
|
1391
|
+
;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/iterableToArray.js
|
1392
|
+
function _iterableToArray(iter) {
|
1393
|
+
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
1394
|
+
}
|
1395
|
+
;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js
|
446
1396
|
|
447
|
-
function
|
448
|
-
if (
|
449
|
-
|
450
|
-
|
451
|
-
|
452
|
-
|
453
|
-
|
454
|
-
}
|
455
|
-
return ("string" === r ? String : Number)(t);
|
1397
|
+
function unsupportedIterableToArray_unsupportedIterableToArray(o, minLen) {
|
1398
|
+
if (!o) return;
|
1399
|
+
if (typeof o === "string") return arrayLikeToArray_arrayLikeToArray(o, minLen);
|
1400
|
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
1401
|
+
if (n === "Object" && o.constructor) n = o.constructor.name;
|
1402
|
+
if (n === "Map" || n === "Set") return Array.from(o);
|
1403
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray_arrayLikeToArray(o, minLen);
|
456
1404
|
}
|
457
|
-
;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/
|
1405
|
+
;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js
|
1406
|
+
function _nonIterableSpread() {
|
1407
|
+
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
1408
|
+
}
|
1409
|
+
;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/toConsumableArray.js
|
458
1410
|
|
459
1411
|
|
460
|
-
|
461
|
-
|
462
|
-
|
1412
|
+
|
1413
|
+
|
1414
|
+
function _toConsumableArray(arr) {
|
1415
|
+
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || unsupportedIterableToArray_unsupportedIterableToArray(arr) || _nonIterableSpread();
|
463
1416
|
}
|
464
|
-
;// CONCATENATED MODULE:
|
1417
|
+
;// CONCATENATED MODULE: external "@popperjs/core"
|
1418
|
+
var core_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
|
1419
|
+
var core_y = x => () => x
|
1420
|
+
const core_namespaceObject = core_x({ ["createPopper"]: () => __WEBPACK_EXTERNAL_MODULE__popperjs_core_a5c7319c__.createPopper });
|
1421
|
+
;// CONCATENATED MODULE: ../../packages/directives/src/tooltips.ts
|
465
1422
|
|
466
|
-
|
467
|
-
|
468
|
-
|
469
|
-
|
470
|
-
|
471
|
-
|
472
|
-
|
473
|
-
|
1423
|
+
|
1424
|
+
|
1425
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
1426
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
1427
|
+
/*
|
1428
|
+
* Tencent is pleased to support the open source community by making
|
1429
|
+
* 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
|
1430
|
+
*
|
1431
|
+
* Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
|
1432
|
+
*
|
1433
|
+
* 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
|
1434
|
+
*
|
1435
|
+
* License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
|
1436
|
+
*
|
1437
|
+
* ---------------------------------------------------
|
1438
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
|
1439
|
+
* documentation files (the "Software"), to deal in the Software without restriction, including without limitation
|
1440
|
+
* the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
|
1441
|
+
* to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
1442
|
+
*
|
1443
|
+
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of
|
1444
|
+
* the Software.
|
1445
|
+
*
|
1446
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
|
1447
|
+
* THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
1448
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
|
1449
|
+
* CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
1450
|
+
* IN THE SOFTWARE.
|
1451
|
+
*/
|
1452
|
+
|
1453
|
+
|
1454
|
+
|
1455
|
+
var tooltips_nodeList = new WeakMap();
|
1456
|
+
var tooltips = {
|
1457
|
+
beforeMount: function beforeMount(el, binding) {
|
1458
|
+
var opts = getOpts(binding);
|
1459
|
+
var trigger = opts.trigger,
|
1460
|
+
showOnInit = opts.showOnInit;
|
1461
|
+
var popper = renderContent(opts);
|
1462
|
+
var delayTimeout = null;
|
1463
|
+
if (showOnInit) {
|
1464
|
+
(0,external_vue_namespaceObject.nextTick)(function () {
|
1465
|
+
show(el);
|
1466
|
+
});
|
1467
|
+
}
|
1468
|
+
if (trigger === 'hover') {
|
1469
|
+
var hideTimeout = null;
|
1470
|
+
el.addEventListener('mouseenter', function () {
|
1471
|
+
delayTimeout = setTimeout(function () {
|
1472
|
+
show(el);
|
1473
|
+
clearTimeout(hideTimeout);
|
1474
|
+
clearTimeout(delayTimeout);
|
1475
|
+
}, opts.delay);
|
1476
|
+
});
|
1477
|
+
popper.addEventListener('mouseenter', function () {
|
1478
|
+
clearTimeout(hideTimeout);
|
1479
|
+
});
|
1480
|
+
el.addEventListener('mouseleave', function () {
|
1481
|
+
clearTimeout(delayTimeout);
|
1482
|
+
hideTimeout = setTimeout(function () {
|
1483
|
+
hide(el);
|
1484
|
+
}, 100);
|
1485
|
+
});
|
1486
|
+
el.addEventListener('click', function () {
|
1487
|
+
hide(el);
|
1488
|
+
});
|
1489
|
+
popper.addEventListener('mouseleave', function () {
|
1490
|
+
clearTimeout(delayTimeout);
|
1491
|
+
hideTimeout = setTimeout(function () {
|
1492
|
+
hide(el);
|
1493
|
+
}, 100);
|
1494
|
+
});
|
1495
|
+
} else if (trigger === 'click') {
|
1496
|
+
document.body.addEventListener('click', function (event) {
|
1497
|
+
if (el.contains(event.target) && !popper.hasAttribute('data-show')) {
|
1498
|
+
delayTimeout = setTimeout(function () {
|
1499
|
+
show(el);
|
1500
|
+
clearTimeout(delayTimeout);
|
1501
|
+
}, opts.delay);
|
1502
|
+
} else if (popper.hasAttribute('data-show')) {
|
1503
|
+
hide(el);
|
1504
|
+
}
|
1505
|
+
});
|
1506
|
+
}
|
1507
|
+
tooltips_nodeList.set(el, {
|
1508
|
+
opts: opts,
|
1509
|
+
popper: popper,
|
1510
|
+
popperInstance: null
|
474
1511
|
});
|
1512
|
+
},
|
1513
|
+
updated: function updated(el, binding) {
|
1514
|
+
if (tooltips_nodeList.get(el)) {
|
1515
|
+
tooltips_nodeList.get(el).opts = getOpts(binding);
|
1516
|
+
}
|
1517
|
+
},
|
1518
|
+
unmounted: function unmounted(el) {
|
1519
|
+
hide(el);
|
1520
|
+
tooltips_nodeList["delete"](el);
|
1521
|
+
}
|
1522
|
+
};
|
1523
|
+
/**
|
1524
|
+
* 初始化配置
|
1525
|
+
* @returns tooltips配置
|
1526
|
+
*/
|
1527
|
+
function initOptions() {
|
1528
|
+
var defaultOpts = {
|
1529
|
+
arrow: true,
|
1530
|
+
disabled: false,
|
1531
|
+
trigger: 'hover',
|
1532
|
+
theme: 'dark',
|
1533
|
+
content: '',
|
1534
|
+
showOnInit: false,
|
1535
|
+
placement: 'top',
|
1536
|
+
distance: 8,
|
1537
|
+
extCls: '',
|
1538
|
+
sameWidth: false,
|
1539
|
+
delay: 0,
|
1540
|
+
onShow: function onShow() {},
|
1541
|
+
onHide: function onHide() {}
|
1542
|
+
};
|
1543
|
+
return defaultOpts;
|
1544
|
+
}
|
1545
|
+
/**
|
1546
|
+
* 获取配置
|
1547
|
+
* @returns tooltips配置
|
1548
|
+
*/
|
1549
|
+
function getOpts(binding) {
|
1550
|
+
var opts = initOptions();
|
1551
|
+
if (_typeof(binding.value) === 'object') {
|
1552
|
+
Object.assign(opts, binding.value);
|
475
1553
|
} else {
|
476
|
-
|
1554
|
+
opts.content = binding.value;
|
477
1555
|
}
|
478
|
-
return
|
1556
|
+
return opts;
|
479
1557
|
}
|
480
|
-
|
481
|
-
|
482
|
-
|
483
|
-
|
484
|
-
|
485
|
-
|
486
|
-
|
487
|
-
|
488
|
-
|
489
|
-
|
490
|
-
var
|
491
|
-
|
1558
|
+
/**
|
1559
|
+
* 创建tooltips DOM
|
1560
|
+
* @param opts
|
1561
|
+
* @returns
|
1562
|
+
*/
|
1563
|
+
function renderContext(value, content) {
|
1564
|
+
if (typeof value === 'string') {
|
1565
|
+
content.innerText = value;
|
1566
|
+
} else {
|
1567
|
+
// 如果 content 是 Vue 组件的实例,则挂载它
|
1568
|
+
var container = document.createElement('div');
|
1569
|
+
var vnode = (0,external_vue_namespaceObject.h)(value);
|
1570
|
+
(0,external_vue_namespaceObject.render)(vnode, container);
|
1571
|
+
content.innerHTML = container.innerHTML;
|
1572
|
+
}
|
1573
|
+
}
|
1574
|
+
function renderContent(opts) {
|
1575
|
+
var value = opts.content,
|
1576
|
+
hasArrow = opts.arrow,
|
1577
|
+
theme = opts.theme,
|
1578
|
+
extCls = opts.extCls;
|
1579
|
+
var isLight = theme === 'light';
|
1580
|
+
var zIndex = shared_namespaceObject.bkZIndexManager.getPopperIndex();
|
1581
|
+
var content = document.createElement('div');
|
1582
|
+
var prefix = document.documentElement.style.getPropertyValue('--bk-prefix') || 'bk';
|
1583
|
+
content.className = "".concat((0,shared_namespaceObject.resolveClassName)('popper', prefix), " ").concat(isLight ? 'light' : 'dark', " ").concat(extCls);
|
1584
|
+
content.innerText = value;
|
1585
|
+
content.style.zIndex = String(zIndex);
|
1586
|
+
renderContext(value, content);
|
1587
|
+
if (hasArrow) {
|
1588
|
+
var arrow = renderArrow();
|
1589
|
+
content.appendChild(arrow);
|
1590
|
+
}
|
1591
|
+
return content;
|
1592
|
+
}
|
1593
|
+
/**
|
1594
|
+
* 渲染箭头dom
|
1595
|
+
* @returns arrow DOM
|
1596
|
+
*/
|
1597
|
+
function renderArrow() {
|
1598
|
+
var arrow = document.createElement('div');
|
1599
|
+
var prefix = document.documentElement.style.getPropertyValue('--bk-prefix') || 'bk';
|
1600
|
+
arrow.className = (0,shared_namespaceObject.resolveClassName)('popper-arrow', prefix);
|
1601
|
+
arrow.setAttribute('data-popper-arrow', '');
|
1602
|
+
return arrow;
|
1603
|
+
}
|
1604
|
+
/**
|
1605
|
+
* 创建popper实例
|
1606
|
+
* @param el
|
1607
|
+
* @param popper
|
1608
|
+
* @returns popper实例
|
1609
|
+
*/
|
1610
|
+
function createPopperInstance(el, popper) {
|
1611
|
+
var _nodeList$get = tooltips_nodeList.get(el),
|
1612
|
+
opts = _nodeList$get.opts;
|
1613
|
+
var placement = opts.placement,
|
1614
|
+
distance = opts.distance,
|
1615
|
+
sameWidth = opts.sameWidth;
|
1616
|
+
var popperInstance = (0,core_namespaceObject.createPopper)(el, popper, {
|
1617
|
+
placement: placement,
|
1618
|
+
modifiers: [{
|
1619
|
+
name: 'offset',
|
1620
|
+
options: {
|
1621
|
+
offset: [0, distance]
|
1622
|
+
}
|
1623
|
+
}, {
|
1624
|
+
name: 'arrow',
|
1625
|
+
options: {
|
1626
|
+
padding: 5
|
1627
|
+
}
|
1628
|
+
}].concat(_toConsumableArray(sameWidth ? [{
|
1629
|
+
name: 'sameWidth',
|
1630
|
+
enabled: true,
|
1631
|
+
phase: 'beforeWrite',
|
1632
|
+
requires: ['computeStyles'],
|
1633
|
+
fn: function fn(_ref) {
|
1634
|
+
var state = _ref.state;
|
1635
|
+
state.styles.popper.width = "".concat(state.rects.reference.width, "px");
|
1636
|
+
},
|
1637
|
+
effect: function effect(_ref2) {
|
1638
|
+
var state = _ref2.state;
|
1639
|
+
state.elements.popper.style.overflowWrap = 'break-word';
|
1640
|
+
state.elements.popper.style.width = "".concat(state.elements.reference.offsetWidth, "px");
|
1641
|
+
}
|
1642
|
+
}] : []))
|
1643
|
+
});
|
1644
|
+
return popperInstance;
|
1645
|
+
}
|
1646
|
+
/**
|
1647
|
+
* 显示
|
1648
|
+
* @param el
|
1649
|
+
*/
|
1650
|
+
function show(el) {
|
1651
|
+
var _nodeList$get2 = tooltips_nodeList.get(el),
|
1652
|
+
popper = _nodeList$get2.popper,
|
1653
|
+
opts = _nodeList$get2.opts;
|
1654
|
+
var disabled = opts.disabled,
|
1655
|
+
content = opts.content,
|
1656
|
+
hasArrow = opts.arrow,
|
1657
|
+
onShow = opts.onShow,
|
1658
|
+
boundary = opts.boundary,
|
1659
|
+
_opts$modifiers = opts.modifiers,
|
1660
|
+
modifiers = _opts$modifiers === void 0 ? [] : _opts$modifiers;
|
1661
|
+
if (disabled) return;
|
1662
|
+
renderContext(content, popper);
|
1663
|
+
if (hasArrow) {
|
1664
|
+
var arrow = renderArrow();
|
1665
|
+
popper.appendChild(arrow);
|
1666
|
+
}
|
1667
|
+
var container = document.body;
|
1668
|
+
if (boundary) {
|
1669
|
+
if (boundary === 'parent') {
|
1670
|
+
container = el.parentElement;
|
1671
|
+
} else if (boundary instanceof HTMLElement) {
|
1672
|
+
container = boundary;
|
1673
|
+
}
|
1674
|
+
}
|
1675
|
+
container.appendChild(popper);
|
1676
|
+
var popperInstance = createPopperInstance(el, popper);
|
1677
|
+
onShow();
|
1678
|
+
// Make the tooltip visible
|
1679
|
+
popper.setAttribute('data-show', '');
|
1680
|
+
// Enable the event listeners
|
1681
|
+
popperInstance.setOptions(function (options) {
|
1682
|
+
return _objectSpread(_objectSpread({}, options), {}, {
|
1683
|
+
modifiers: [].concat(_toConsumableArray(options.modifiers), _toConsumableArray(modifiers), [{
|
1684
|
+
name: 'eventListeners',
|
1685
|
+
enabled: true
|
1686
|
+
}])
|
1687
|
+
});
|
1688
|
+
});
|
1689
|
+
// Update its position
|
1690
|
+
popperInstance.forceUpdate();
|
1691
|
+
tooltips_nodeList.get(el).popperInstance = popperInstance;
|
1692
|
+
}
|
1693
|
+
/**
|
1694
|
+
* 隐藏
|
1695
|
+
* @param el
|
1696
|
+
*/
|
1697
|
+
function hide(el) {
|
1698
|
+
if (!tooltips_nodeList.get(el)) return;
|
1699
|
+
var _nodeList$get3 = tooltips_nodeList.get(el),
|
1700
|
+
popper = _nodeList$get3.popper,
|
1701
|
+
popperInstance = _nodeList$get3.popperInstance,
|
1702
|
+
opts = _nodeList$get3.opts;
|
1703
|
+
var onHide = opts.onHide;
|
1704
|
+
if (popper && document.body.contains(popper)) {
|
1705
|
+
var _popper$parentNode;
|
1706
|
+
popper.removeAttribute('data-show');
|
1707
|
+
popperInstance === null || popperInstance === void 0 || popperInstance.destroy();
|
1708
|
+
popper === null || popper === void 0 || (_popper$parentNode = popper.parentNode) === null || _popper$parentNode === void 0 || _popper$parentNode.removeChild(popper);
|
1709
|
+
onHide();
|
1710
|
+
}
|
1711
|
+
}
|
1712
|
+
/* harmony default export */ const src_tooltips = ((/* unused pure expression or super */ null && (tooltips)));
|
1713
|
+
;// CONCATENATED MODULE: external "../loading"
|
1714
|
+
var external_loading_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
|
1715
|
+
var external_loading_y = x => () => x
|
1716
|
+
const external_loading_namespaceObject = external_loading_x({ });
|
1717
|
+
;// CONCATENATED MODULE: external "../overflow-title"
|
1718
|
+
var external_overflow_title_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
|
1719
|
+
var external_overflow_title_y = x => () => x
|
1720
|
+
const external_overflow_title_namespaceObject = external_overflow_title_x({ });
|
1721
|
+
;// CONCATENATED MODULE: ../../packages/directives/src/index.ts
|
1722
|
+
/*
|
1723
|
+
* Tencent is pleased to support the open source community by making
|
1724
|
+
* 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
|
1725
|
+
*
|
1726
|
+
* Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
|
1727
|
+
*
|
1728
|
+
* 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
|
1729
|
+
*
|
1730
|
+
* License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
|
1731
|
+
*
|
1732
|
+
* ---------------------------------------------------
|
1733
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
|
1734
|
+
* documentation files (the "Software"), to deal in the Software without restriction, including without limitation
|
1735
|
+
* the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
|
1736
|
+
* to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
1737
|
+
*
|
1738
|
+
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of
|
1739
|
+
* the Software.
|
1740
|
+
*
|
1741
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
|
1742
|
+
* THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
1743
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
|
1744
|
+
* CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
1745
|
+
* IN THE SOFTWARE.
|
1746
|
+
*/
|
1747
|
+
|
1748
|
+
|
1749
|
+
|
1750
|
+
|
1751
|
+
|
1752
|
+
|
1753
|
+
// export { createInstance as bkEllipsisInstance } from './ellipsis';
|
492
1754
|
;// CONCATENATED MODULE: external "../icon"
|
493
1755
|
var icon_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
|
494
1756
|
var icon_y = x => () => x
|
@@ -841,22 +2103,6 @@ function _iterableToArrayLimit(r, l) {
|
|
841
2103
|
return a;
|
842
2104
|
}
|
843
2105
|
}
|
844
|
-
;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js
|
845
|
-
function _arrayLikeToArray(arr, len) {
|
846
|
-
if (len == null || len > arr.length) len = arr.length;
|
847
|
-
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
848
|
-
return arr2;
|
849
|
-
}
|
850
|
-
;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js
|
851
|
-
|
852
|
-
function _unsupportedIterableToArray(o, minLen) {
|
853
|
-
if (!o) return;
|
854
|
-
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
855
|
-
var n = Object.prototype.toString.call(o).slice(8, -1);
|
856
|
-
if (n === "Object" && o.constructor) n = o.constructor.name;
|
857
|
-
if (n === "Map" || n === "Set") return Array.from(o);
|
858
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
859
|
-
}
|
860
2106
|
;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/nonIterableRest.js
|
861
2107
|
function _nonIterableRest() {
|
862
2108
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
@@ -867,7 +2113,7 @@ function _nonIterableRest() {
|
|
867
2113
|
|
868
2114
|
|
869
2115
|
function _slicedToArray(arr, i) {
|
870
|
-
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) ||
|
2116
|
+
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || unsupportedIterableToArray_unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
871
2117
|
}
|
872
2118
|
;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js
|
873
2119
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
@@ -903,10 +2149,6 @@ function _asyncToGenerator(fn) {
|
|
903
2149
|
// EXTERNAL MODULE: ../../node_modules/@babel/runtime/regenerator/index.js
|
904
2150
|
var regenerator = __webpack_require__(2841);
|
905
2151
|
var regenerator_default = /*#__PURE__*/__webpack_require__.n(regenerator);
|
906
|
-
;// CONCATENATED MODULE: external "../popover"
|
907
|
-
var popover_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
|
908
|
-
var popover_y = x => () => x
|
909
|
-
const popover_namespaceObject = popover_x({ ["default"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_popover_9b03f19d__["default"] });
|
910
2152
|
;// CONCATENATED MODULE: external "../popover/popover.less"
|
911
2153
|
var popover_less_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
|
912
2154
|
var popover_less_y = x => () => x
|
@@ -927,27 +2169,6 @@ const radio_namespaceObject = radio_x({ ["default"]: () => __WEBPACK_EXTERNAL_MO
|
|
927
2169
|
var radio_less_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
|
928
2170
|
var radio_less_y = x => () => x
|
929
2171
|
const radio_less_namespaceObject = radio_less_x({ });
|
930
|
-
;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js
|
931
|
-
|
932
|
-
function _arrayWithoutHoles(arr) {
|
933
|
-
if (Array.isArray(arr)) return _arrayLikeToArray(arr);
|
934
|
-
}
|
935
|
-
;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/iterableToArray.js
|
936
|
-
function _iterableToArray(iter) {
|
937
|
-
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
938
|
-
}
|
939
|
-
;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js
|
940
|
-
function _nonIterableSpread() {
|
941
|
-
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
942
|
-
}
|
943
|
-
;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/toConsumableArray.js
|
944
|
-
|
945
|
-
|
946
|
-
|
947
|
-
|
948
|
-
function _toConsumableArray(arr) {
|
949
|
-
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
|
950
|
-
}
|
951
2172
|
;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/classCallCheck.js
|
952
2173
|
function _classCallCheck(instance, Constructor) {
|
953
2174
|
if (!(instance instanceof Constructor)) {
|
@@ -1484,12 +2705,12 @@ var SelectedItem = /*#__PURE__*/function () {
|
|
1484
2705
|
|
1485
2706
|
|
1486
2707
|
|
1487
|
-
function
|
2708
|
+
function input_createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = input_unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
|
1488
2709
|
function input_unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return input_arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return input_arrayLikeToArray(o, minLen); }
|
1489
2710
|
function input_arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
1490
2711
|
|
1491
|
-
function
|
1492
|
-
function
|
2712
|
+
function input_ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
2713
|
+
function input_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? input_ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : input_ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
1493
2714
|
/*
|
1494
2715
|
* Tencent is pleased to support the open source community by making
|
1495
2716
|
* 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
|
@@ -1526,7 +2747,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
1526
2747
|
/* harmony default export */ const input = ((0,external_vue_namespaceObject.defineComponent)({
|
1527
2748
|
name: 'SearchSelectInput',
|
1528
2749
|
directives: {
|
1529
|
-
clickoutside:
|
2750
|
+
clickoutside: clickoutside
|
1530
2751
|
},
|
1531
2752
|
props: {
|
1532
2753
|
data: {
|
@@ -1914,7 +3135,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
1914
3135
|
_context2.next = 18;
|
1915
3136
|
break;
|
1916
3137
|
}
|
1917
|
-
selectedItem = new SelectedItem(
|
3138
|
+
selectedItem = new SelectedItem(input_objectSpread(input_objectSpread({}, item), {}, {
|
1918
3139
|
id: (_item$realId = item.realId) !== null && _item$realId !== void 0 ? _item$realId : item.id
|
1919
3140
|
}), type);
|
1920
3141
|
selectedItem.addValues(item.value.name, false);
|
@@ -2127,7 +3348,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
2127
3348
|
return !item.isSelected;
|
2128
3349
|
}).slice();
|
2129
3350
|
} else {
|
2130
|
-
_iterator =
|
3351
|
+
_iterator = input_createForOfIteratorHelper(props.data.filter(function (item) {
|
2131
3352
|
return !item.isSelected;
|
2132
3353
|
}));
|
2133
3354
|
try {
|
@@ -2137,11 +3358,11 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
2137
3358
|
if (isMatched) {
|
2138
3359
|
list.push(item);
|
2139
3360
|
filterList = [];
|
2140
|
-
_iterator2 =
|
3361
|
+
_iterator2 = input_createForOfIteratorHelper(item.children || []);
|
2141
3362
|
try {
|
2142
3363
|
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
2143
3364
|
child = _step2.value;
|
2144
|
-
filterList.push(
|
3365
|
+
filterList.push(input_objectSpread(input_objectSpread({}, item), {}, {
|
2145
3366
|
realId: item.id,
|
2146
3367
|
id: (0,shared_namespaceObject.random)(10),
|
2147
3368
|
value: child
|
@@ -2153,7 +3374,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
2153
3374
|
_iterator2.f();
|
2154
3375
|
}
|
2155
3376
|
if (!filterList.length && !item.onlyRecommendChildren) {
|
2156
|
-
filterList.push(
|
3377
|
+
filterList.push(input_objectSpread(input_objectSpread({}, item), {}, {
|
2157
3378
|
realId: item.id,
|
2158
3379
|
id: (0,shared_namespaceObject.random)(10),
|
2159
3380
|
value: {
|
@@ -2165,12 +3386,12 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
2165
3386
|
(_list = list).push.apply(_list, filterList);
|
2166
3387
|
} else {
|
2167
3388
|
_filterList = [];
|
2168
|
-
_iterator3 =
|
3389
|
+
_iterator3 = input_createForOfIteratorHelper(item.children || []);
|
2169
3390
|
try {
|
2170
3391
|
for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
|
2171
3392
|
_child = _step3.value;
|
2172
3393
|
if (_child.name.toLocaleLowerCase().includes(keyword.value.toLocaleLowerCase())) {
|
2173
|
-
_filterList.push(
|
3394
|
+
_filterList.push(input_objectSpread(input_objectSpread({}, item), {}, {
|
2174
3395
|
realId: item.id,
|
2175
3396
|
id: (0,shared_namespaceObject.random)(10),
|
2176
3397
|
value: _child
|
@@ -2183,7 +3404,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
2183
3404
|
_iterator3.f();
|
2184
3405
|
}
|
2185
3406
|
if (!_filterList.length && !item.onlyRecommendChildren) {
|
2186
|
-
_filterList.push(
|
3407
|
+
_filterList.push(input_objectSpread(input_objectSpread({}, item), {}, {
|
2187
3408
|
value: {
|
2188
3409
|
id: keyword.value,
|
2189
3410
|
name: keyword.value
|
@@ -2250,7 +3471,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
2250
3471
|
}
|
2251
3472
|
return _context6.abrupt("return");
|
2252
3473
|
case 7:
|
2253
|
-
emit('add', formatItem || new SelectedItem(
|
3474
|
+
emit('add', formatItem || new SelectedItem(input_objectSpread({}, valueList[0]), 'text'));
|
2254
3475
|
keyword.value = '';
|
2255
3476
|
setMenuList();
|
2256
3477
|
return _context6.abrupt("return", true);
|
@@ -2359,7 +3580,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
2359
3580
|
return item.name === key.trim();
|
2360
3581
|
});
|
2361
3582
|
if (selectedItem) {
|
2362
|
-
var item = new SelectedItem(
|
3583
|
+
var item = new SelectedItem(input_objectSpread({}, selectedItem), 'default');
|
2363
3584
|
item.addValues(value);
|
2364
3585
|
return item;
|
2365
3586
|
}
|
@@ -2847,7 +4068,7 @@ var SearchSelectProps = {
|
|
2847
4068
|
/* harmony default export */ const search_select = ((0,external_vue_namespaceObject.defineComponent)({
|
2848
4069
|
name: 'SearchSelect',
|
2849
4070
|
directives: {
|
2850
|
-
clickoutside:
|
4071
|
+
clickoutside: clickoutside
|
2851
4072
|
},
|
2852
4073
|
props: SearchSelectProps,
|
2853
4074
|
emits: ['update:modelValue', 'search', 'selectKey'],
|