@94ai/nf-virtual-select 3.2.72 → 3.2.75
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.
|
@@ -311,6 +311,7 @@ const _sfc_main = {
|
|
|
311
311
|
},
|
|
312
312
|
// 绑定方法
|
|
313
313
|
bindEvents() {
|
|
314
|
+
var _a;
|
|
314
315
|
const events = {
|
|
315
316
|
...this.$listeners || {},
|
|
316
317
|
...this.itemOptions.events
|
|
@@ -318,6 +319,9 @@ const _sfc_main = {
|
|
|
318
319
|
if (events == null ? void 0 : events.change) {
|
|
319
320
|
delete events.change;
|
|
320
321
|
}
|
|
322
|
+
if ((events == null ? void 0 : events["visible-change"]) && (this.virtualList || ((_a = this.itemOptions) == null ? void 0 : _a.virtualList))) {
|
|
323
|
+
delete events["visible-change"];
|
|
324
|
+
}
|
|
321
325
|
return events || {};
|
|
322
326
|
},
|
|
323
327
|
formatItemOptions() {
|
|
@@ -494,12 +498,24 @@ const _sfc_main = {
|
|
|
494
498
|
this.init();
|
|
495
499
|
}
|
|
496
500
|
},
|
|
497
|
-
visibleChange(bool) {
|
|
501
|
+
async visibleChange(bool) {
|
|
502
|
+
const events = {
|
|
503
|
+
...this.$listeners || {},
|
|
504
|
+
...this.itemOptions.events
|
|
505
|
+
};
|
|
506
|
+
if (events["visible-change"]) {
|
|
507
|
+
const go = await events["visible-change"](bool);
|
|
508
|
+
if (go === "break") {
|
|
509
|
+
return go;
|
|
510
|
+
}
|
|
511
|
+
}
|
|
498
512
|
if (!bool) {
|
|
499
513
|
this.reset();
|
|
500
514
|
this.init();
|
|
501
515
|
}
|
|
502
|
-
|
|
516
|
+
if (!events["visible-change"]) {
|
|
517
|
+
this.$emit("visible-change", bool);
|
|
518
|
+
}
|
|
503
519
|
}
|
|
504
520
|
},
|
|
505
521
|
beforeDestroy() {
|
|
@@ -543,7 +559,7 @@ var _sfc_render = function render2() {
|
|
|
543
559
|
}), _c("virtual-list", {
|
|
544
560
|
ref: "virtualSelectList",
|
|
545
561
|
staticClass: "nf-virtual-select-list",
|
|
546
|
-
style: `max-height: ${_vm.height};min-width: ${_vm.width};max-width: ${_vm.maxWidth}
|
|
562
|
+
style: `max-height: ${_vm.height};min-width: ${_vm.width};max-width: ${_vm.maxWidth};`,
|
|
547
563
|
attrs: {
|
|
548
564
|
"offset": _vm.offset,
|
|
549
565
|
"start": _vm.start,
|
|
@@ -309,6 +309,7 @@ const _sfc_main = {
|
|
|
309
309
|
},
|
|
310
310
|
// 绑定方法
|
|
311
311
|
bindEvents() {
|
|
312
|
+
var _a;
|
|
312
313
|
const events = {
|
|
313
314
|
...this.$listeners || {},
|
|
314
315
|
...this.itemOptions.events
|
|
@@ -316,6 +317,9 @@ const _sfc_main = {
|
|
|
316
317
|
if (events == null ? void 0 : events.change) {
|
|
317
318
|
delete events.change;
|
|
318
319
|
}
|
|
320
|
+
if ((events == null ? void 0 : events["visible-change"]) && (this.virtualList || ((_a = this.itemOptions) == null ? void 0 : _a.virtualList))) {
|
|
321
|
+
delete events["visible-change"];
|
|
322
|
+
}
|
|
319
323
|
return events || {};
|
|
320
324
|
},
|
|
321
325
|
formatItemOptions() {
|
|
@@ -492,12 +496,24 @@ const _sfc_main = {
|
|
|
492
496
|
this.init();
|
|
493
497
|
}
|
|
494
498
|
},
|
|
495
|
-
visibleChange(bool) {
|
|
499
|
+
async visibleChange(bool) {
|
|
500
|
+
const events = {
|
|
501
|
+
...this.$listeners || {},
|
|
502
|
+
...this.itemOptions.events
|
|
503
|
+
};
|
|
504
|
+
if (events["visible-change"]) {
|
|
505
|
+
const go = await events["visible-change"](bool);
|
|
506
|
+
if (go === "break") {
|
|
507
|
+
return go;
|
|
508
|
+
}
|
|
509
|
+
}
|
|
496
510
|
if (!bool) {
|
|
497
511
|
this.reset();
|
|
498
512
|
this.init();
|
|
499
513
|
}
|
|
500
|
-
|
|
514
|
+
if (!events["visible-change"]) {
|
|
515
|
+
this.$emit("visible-change", bool);
|
|
516
|
+
}
|
|
501
517
|
}
|
|
502
518
|
},
|
|
503
519
|
beforeDestroy() {
|
|
@@ -541,7 +557,7 @@ var _sfc_render = function render2() {
|
|
|
541
557
|
}), _c("virtual-list", {
|
|
542
558
|
ref: "virtualSelectList",
|
|
543
559
|
staticClass: "nf-virtual-select-list",
|
|
544
|
-
style: `max-height: ${_vm.height};min-width: ${_vm.width};max-width: ${_vm.maxWidth}
|
|
560
|
+
style: `max-height: ${_vm.height};min-width: ${_vm.width};max-width: ${_vm.maxWidth};`,
|
|
545
561
|
attrs: {
|
|
546
562
|
"offset": _vm.offset,
|
|
547
563
|
"start": _vm.start,
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
@totop="totop"
|
|
48
48
|
@tobottom="tobottom"
|
|
49
49
|
@resized="resized"
|
|
50
|
-
:style="`max-height: ${height};min-width: ${width};max-width: ${maxWidth}
|
|
50
|
+
:style="`max-height: ${height};min-width: ${width};max-width: ${maxWidth};`"
|
|
51
51
|
>
|
|
52
52
|
<slot slot="footer" name="footer" />
|
|
53
53
|
<slot slot="header" name="header" />
|
|
@@ -350,6 +350,9 @@ export default {
|
|
|
350
350
|
if (events?.change) {
|
|
351
351
|
delete events.change
|
|
352
352
|
}
|
|
353
|
+
if (events?.['visible-change'] && (this.virtualList || this.itemOptions?.virtualList)) {
|
|
354
|
+
delete events['visible-change']
|
|
355
|
+
}
|
|
353
356
|
return events || {}
|
|
354
357
|
},
|
|
355
358
|
formatItemOptions() {
|
|
@@ -528,12 +531,21 @@ export default {
|
|
|
528
531
|
this.init()
|
|
529
532
|
}
|
|
530
533
|
},
|
|
531
|
-
visibleChange(bool) {
|
|
534
|
+
async visibleChange(bool) {
|
|
535
|
+
const events = { ...(this.$listeners || {}), ...this.itemOptions.events }
|
|
536
|
+
if (events['visible-change']) {
|
|
537
|
+
const go = await (events['visible-change'])(bool)
|
|
538
|
+
if (go === 'break') {
|
|
539
|
+
return go
|
|
540
|
+
}
|
|
541
|
+
}
|
|
532
542
|
if (!bool) {
|
|
533
543
|
this.reset()
|
|
534
544
|
this.init()
|
|
535
545
|
}
|
|
536
|
-
|
|
546
|
+
if (!events['visible-change']) {
|
|
547
|
+
this.$emit('visible-change', bool)
|
|
548
|
+
}
|
|
537
549
|
}
|
|
538
550
|
},
|
|
539
551
|
beforeDestroy() {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@94ai/nf-virtual-select",
|
|
3
|
-
"version": "3.2.
|
|
3
|
+
"version": "3.2.75",
|
|
4
4
|
"description": "> TODO: description",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"author": "DESKTOP-1EDDQ79\\dev026 <liuxiangxiang@94ai.com>",
|
|
@@ -14,8 +14,8 @@
|
|
|
14
14
|
"url": "http://94ai.gitlab.com/zoujiahe/common-ui.git"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@94ai/common-utils": "^3.2.
|
|
18
|
-
"@94ai/nf-theme-chalk": "^3.2.
|
|
17
|
+
"@94ai/common-utils": "^3.2.75",
|
|
18
|
+
"@94ai/nf-theme-chalk": "^3.2.75",
|
|
19
19
|
"lodash-es": "^4.17.21",
|
|
20
20
|
"vue-demi": "^0.14.5",
|
|
21
21
|
"vue-virtual-scroll-list": "^2.3.5"
|
|
@@ -33,5 +33,5 @@
|
|
|
33
33
|
"types": "lib/index.d.ts",
|
|
34
34
|
"main": "lib/nf-virtual-select.cjs.js",
|
|
35
35
|
"module": "lib/nf-virtual-select.esm-bundler.js",
|
|
36
|
-
"gitHead": "
|
|
36
|
+
"gitHead": "3e303fef4a30e065979f80c4df5000243b57d652"
|
|
37
37
|
}
|