@94ai/nf-virtual-select 3.2.16 → 3.2.21
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/lib/el-option-node.vue.d.ts +9 -0
- package/lib/index.d.ts +6 -6
- package/lib/nf-virtual-select.cjs.js +26 -9
- package/lib/nf-virtual-select.esm-bundler.js +24 -7
- package/lib/nf-virtual-select.vue.d.ts +2 -2
- package/package/el-option-node.vue +8 -1
- package/package/nf-virtual-select.vue +7 -4
- package/package.json +4 -3
|
@@ -15,6 +15,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
15
15
|
type: StringConstructor;
|
|
16
16
|
required: true;
|
|
17
17
|
};
|
|
18
|
+
showTip: {
|
|
19
|
+
type: BooleanConstructor;
|
|
20
|
+
default: boolean;
|
|
21
|
+
};
|
|
18
22
|
}, {}, {}, {}, {}, import("vue/types/v3-component-options").ComponentOptionsMixin, import("vue/types/v3-component-options").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<{
|
|
19
23
|
index: {
|
|
20
24
|
type: NumberConstructor;
|
|
@@ -32,7 +36,12 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
32
36
|
type: StringConstructor;
|
|
33
37
|
required: true;
|
|
34
38
|
};
|
|
39
|
+
showTip: {
|
|
40
|
+
type: BooleanConstructor;
|
|
41
|
+
default: boolean;
|
|
42
|
+
};
|
|
35
43
|
}>>, {
|
|
36
44
|
source: Record<string, any>;
|
|
45
|
+
showTip: boolean;
|
|
37
46
|
}>;
|
|
38
47
|
export default _default;
|
package/lib/index.d.ts
CHANGED
|
@@ -96,7 +96,7 @@ declare const _default: import("vue/types/v3-component-public-instance").Compone
|
|
|
96
96
|
};
|
|
97
97
|
size: {
|
|
98
98
|
type: StringConstructor;
|
|
99
|
-
default:
|
|
99
|
+
default: undefined;
|
|
100
100
|
};
|
|
101
101
|
keyValue: {
|
|
102
102
|
type: ArrayConstructor;
|
|
@@ -245,7 +245,7 @@ declare const _default: import("vue/types/v3-component-public-instance").Compone
|
|
|
245
245
|
};
|
|
246
246
|
size: {
|
|
247
247
|
type: StringConstructor;
|
|
248
|
-
default:
|
|
248
|
+
default: undefined;
|
|
249
249
|
};
|
|
250
250
|
keyValue: {
|
|
251
251
|
type: ArrayConstructor;
|
|
@@ -429,7 +429,7 @@ declare const _default: import("vue/types/v3-component-public-instance").Compone
|
|
|
429
429
|
};
|
|
430
430
|
size: {
|
|
431
431
|
type: StringConstructor;
|
|
432
|
-
default:
|
|
432
|
+
default: undefined;
|
|
433
433
|
};
|
|
434
434
|
keyValue: {
|
|
435
435
|
type: ArrayConstructor;
|
|
@@ -592,7 +592,7 @@ declare const _default: import("vue/types/v3-component-public-instance").Compone
|
|
|
592
592
|
};
|
|
593
593
|
size: {
|
|
594
594
|
type: StringConstructor;
|
|
595
|
-
default:
|
|
595
|
+
default: undefined;
|
|
596
596
|
};
|
|
597
597
|
keyValue: {
|
|
598
598
|
type: ArrayConstructor;
|
|
@@ -741,7 +741,7 @@ declare const _default: import("vue/types/v3-component-public-instance").Compone
|
|
|
741
741
|
};
|
|
742
742
|
size: {
|
|
743
743
|
type: StringConstructor;
|
|
744
|
-
default:
|
|
744
|
+
default: undefined;
|
|
745
745
|
};
|
|
746
746
|
keyValue: {
|
|
747
747
|
type: ArrayConstructor;
|
|
@@ -940,7 +940,7 @@ declare const _default: import("vue/types/v3-component-public-instance").Compone
|
|
|
940
940
|
};
|
|
941
941
|
size: {
|
|
942
942
|
type: StringConstructor;
|
|
943
|
-
default:
|
|
943
|
+
default: undefined;
|
|
944
944
|
};
|
|
945
945
|
keyValue: {
|
|
946
946
|
type: ArrayConstructor;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
3
|
const virtualList = require("vue-virtual-scroll-list");
|
|
4
4
|
const vue2RuntimeHelpers = require("@94ai/vue2-runtime-helpers");
|
|
5
|
-
const
|
|
5
|
+
const lodashEs = require("lodash-es");
|
|
6
6
|
const _sfc_main$1 = {
|
|
7
7
|
name: "ItemComponent",
|
|
8
8
|
props: {
|
|
@@ -27,6 +27,11 @@ const _sfc_main$1 = {
|
|
|
27
27
|
// 绑定的值
|
|
28
28
|
type: String,
|
|
29
29
|
required: true
|
|
30
|
+
},
|
|
31
|
+
showTip: {
|
|
32
|
+
// 提示
|
|
33
|
+
type: Boolean,
|
|
34
|
+
default: true
|
|
30
35
|
}
|
|
31
36
|
}
|
|
32
37
|
};
|
|
@@ -38,7 +43,6 @@ var _sfc_render$1 = function render() {
|
|
|
38
43
|
attrs: {
|
|
39
44
|
"label": _vm.source[_vm.label],
|
|
40
45
|
"value": _vm.source[_vm.value],
|
|
41
|
-
"title": _vm.source[_vm.label],
|
|
42
46
|
"disabled": _vm.source["disabled"]
|
|
43
47
|
}
|
|
44
48
|
}, [((_b = (_a = _vm.source) == null ? void 0 : _a.slotContent) == null ? void 0 : _b.firstCall) || ((_d = (_c2 = _vm.source) == null ? void 0 : _c2.slotContent) == null ? void 0 : _d.recall) ? _c("el-tooltip", {
|
|
@@ -54,7 +58,14 @@ var _sfc_render$1 = function render() {
|
|
|
54
58
|
"slot": "content"
|
|
55
59
|
},
|
|
56
60
|
slot: "content"
|
|
57
|
-
}, [_vm._v(" " + _vm._s((_f = (_e = _vm.source) == null ? void 0 : _e.slotContent) == null ? void 0 : _f.firstCall) + " "), _c("br"), _vm._v(" "), _c("br"), _vm._v(" " + _vm._s((_h = (_g = _vm.source) == null ? void 0 : _g.slotContent) == null ? void 0 : _h.recall) + " ")]), _c("span", [_vm._v(_vm._s(_vm.source[_vm.label]))])]) : _vm._e()
|
|
61
|
+
}, [_vm._v(" " + _vm._s((_f = (_e = _vm.source) == null ? void 0 : _e.slotContent) == null ? void 0 : _f.firstCall) + " "), _c("br"), _vm._v(" "), _c("br"), _vm._v(" " + _vm._s((_h = (_g = _vm.source) == null ? void 0 : _g.slotContent) == null ? void 0 : _h.recall) + " ")]), _c("span", [_vm._v(_vm._s(_vm.source[_vm.label]))])]) : _vm._e(), _vm.showTip ? _c("el-tooltip", {
|
|
62
|
+
attrs: {
|
|
63
|
+
"content": _vm.source[_vm.label],
|
|
64
|
+
"open-delay": 1e3,
|
|
65
|
+
"effect": "dark",
|
|
66
|
+
"placement": "left"
|
|
67
|
+
}
|
|
68
|
+
}, [_c("span", [_vm._v(_vm._s(_vm.source[_vm.label]))])]) : _vm._e()], 1);
|
|
58
69
|
};
|
|
59
70
|
var _sfc_staticRenderFns$1 = [];
|
|
60
71
|
var __component__$1 = /* @__PURE__ */ vue2RuntimeHelpers.normalizeComponent(_sfc_main$1, _sfc_render$1, _sfc_staticRenderFns$1, false, null, null, null, null);
|
|
@@ -174,7 +185,7 @@ const _sfc_main = {
|
|
|
174
185
|
},
|
|
175
186
|
size: {
|
|
176
187
|
type: String,
|
|
177
|
-
default:
|
|
188
|
+
default: void 0
|
|
178
189
|
},
|
|
179
190
|
// 默认['label','value']
|
|
180
191
|
keyValue: {
|
|
@@ -316,7 +327,7 @@ const _sfc_main = {
|
|
|
316
327
|
},
|
|
317
328
|
watch: {
|
|
318
329
|
options(newVal, value) {
|
|
319
|
-
if (!
|
|
330
|
+
if (!lodashEs.isEqual(newVal, value)) {
|
|
320
331
|
this.init();
|
|
321
332
|
}
|
|
322
333
|
},
|
|
@@ -407,7 +418,7 @@ const _sfc_main = {
|
|
|
407
418
|
disabled: it["disabled"] ?? false
|
|
408
419
|
}))) ?? [];
|
|
409
420
|
} else {
|
|
410
|
-
this.selectArr = this.optionsList ?
|
|
421
|
+
this.selectArr = this.optionsList ? lodashEs.cloneDeep(this.optionsList) : [];
|
|
411
422
|
if ((this.itemOptions.multiple || this.multiple) && Array.isArray(this.currentVal)) {
|
|
412
423
|
const multiple_elements = this.selectArr.filter((item) => this.currentVal.includes(item.value));
|
|
413
424
|
this.selectArr = [...multiple_elements, ...this.selectArr.filter((item) => !multiple_elements.includes(item))];
|
|
@@ -563,10 +574,16 @@ var _sfc_render = function render2() {
|
|
|
563
574
|
attrs: {
|
|
564
575
|
"label": item.label,
|
|
565
576
|
"value": item.value,
|
|
566
|
-
"disabled": item.disabled
|
|
567
|
-
|
|
577
|
+
"disabled": item.disabled
|
|
578
|
+
}
|
|
579
|
+
}, [_c("el-tooltip", {
|
|
580
|
+
attrs: {
|
|
581
|
+
"content": item.label,
|
|
582
|
+
"open-delay": 1e3,
|
|
583
|
+
"effect": "dark",
|
|
584
|
+
"placement": "left"
|
|
568
585
|
}
|
|
569
|
-
});
|
|
586
|
+
}, [_c("span", [_vm._v(_vm._s(item.label))])])], 1);
|
|
570
587
|
}), 1) : _vm._e()], 2);
|
|
571
588
|
};
|
|
572
589
|
var _sfc_staticRenderFns = [];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import virtualList from "vue-virtual-scroll-list";
|
|
2
2
|
import { normalizeComponent } from "@94ai/vue2-runtime-helpers";
|
|
3
|
-
import { isEqual, cloneDeep } from "lodash";
|
|
3
|
+
import { isEqual, cloneDeep } from "lodash-es";
|
|
4
4
|
const _sfc_main$1 = {
|
|
5
5
|
name: "ItemComponent",
|
|
6
6
|
props: {
|
|
@@ -25,6 +25,11 @@ const _sfc_main$1 = {
|
|
|
25
25
|
// 绑定的值
|
|
26
26
|
type: String,
|
|
27
27
|
required: true
|
|
28
|
+
},
|
|
29
|
+
showTip: {
|
|
30
|
+
// 提示
|
|
31
|
+
type: Boolean,
|
|
32
|
+
default: true
|
|
28
33
|
}
|
|
29
34
|
}
|
|
30
35
|
};
|
|
@@ -36,7 +41,6 @@ var _sfc_render$1 = function render() {
|
|
|
36
41
|
attrs: {
|
|
37
42
|
"label": _vm.source[_vm.label],
|
|
38
43
|
"value": _vm.source[_vm.value],
|
|
39
|
-
"title": _vm.source[_vm.label],
|
|
40
44
|
"disabled": _vm.source["disabled"]
|
|
41
45
|
}
|
|
42
46
|
}, [((_b = (_a = _vm.source) == null ? void 0 : _a.slotContent) == null ? void 0 : _b.firstCall) || ((_d = (_c2 = _vm.source) == null ? void 0 : _c2.slotContent) == null ? void 0 : _d.recall) ? _c("el-tooltip", {
|
|
@@ -52,7 +56,14 @@ var _sfc_render$1 = function render() {
|
|
|
52
56
|
"slot": "content"
|
|
53
57
|
},
|
|
54
58
|
slot: "content"
|
|
55
|
-
}, [_vm._v(" " + _vm._s((_f = (_e = _vm.source) == null ? void 0 : _e.slotContent) == null ? void 0 : _f.firstCall) + " "), _c("br"), _vm._v(" "), _c("br"), _vm._v(" " + _vm._s((_h = (_g = _vm.source) == null ? void 0 : _g.slotContent) == null ? void 0 : _h.recall) + " ")]), _c("span", [_vm._v(_vm._s(_vm.source[_vm.label]))])]) : _vm._e()
|
|
59
|
+
}, [_vm._v(" " + _vm._s((_f = (_e = _vm.source) == null ? void 0 : _e.slotContent) == null ? void 0 : _f.firstCall) + " "), _c("br"), _vm._v(" "), _c("br"), _vm._v(" " + _vm._s((_h = (_g = _vm.source) == null ? void 0 : _g.slotContent) == null ? void 0 : _h.recall) + " ")]), _c("span", [_vm._v(_vm._s(_vm.source[_vm.label]))])]) : _vm._e(), _vm.showTip ? _c("el-tooltip", {
|
|
60
|
+
attrs: {
|
|
61
|
+
"content": _vm.source[_vm.label],
|
|
62
|
+
"open-delay": 1e3,
|
|
63
|
+
"effect": "dark",
|
|
64
|
+
"placement": "left"
|
|
65
|
+
}
|
|
66
|
+
}, [_c("span", [_vm._v(_vm._s(_vm.source[_vm.label]))])]) : _vm._e()], 1);
|
|
56
67
|
};
|
|
57
68
|
var _sfc_staticRenderFns$1 = [];
|
|
58
69
|
var __component__$1 = /* @__PURE__ */ normalizeComponent(_sfc_main$1, _sfc_render$1, _sfc_staticRenderFns$1, false, null, null, null, null);
|
|
@@ -172,7 +183,7 @@ const _sfc_main = {
|
|
|
172
183
|
},
|
|
173
184
|
size: {
|
|
174
185
|
type: String,
|
|
175
|
-
default:
|
|
186
|
+
default: void 0
|
|
176
187
|
},
|
|
177
188
|
// 默认['label','value']
|
|
178
189
|
keyValue: {
|
|
@@ -561,10 +572,16 @@ var _sfc_render = function render2() {
|
|
|
561
572
|
attrs: {
|
|
562
573
|
"label": item.label,
|
|
563
574
|
"value": item.value,
|
|
564
|
-
"disabled": item.disabled
|
|
565
|
-
|
|
575
|
+
"disabled": item.disabled
|
|
576
|
+
}
|
|
577
|
+
}, [_c("el-tooltip", {
|
|
578
|
+
attrs: {
|
|
579
|
+
"content": item.label,
|
|
580
|
+
"open-delay": 1e3,
|
|
581
|
+
"effect": "dark",
|
|
582
|
+
"placement": "left"
|
|
566
583
|
}
|
|
567
|
-
});
|
|
584
|
+
}, [_c("span", [_vm._v(_vm._s(item.label))])])], 1);
|
|
568
585
|
}), 1) : _vm._e()], 2);
|
|
569
586
|
};
|
|
570
587
|
var _sfc_staticRenderFns = [];
|
|
@@ -92,7 +92,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
92
92
|
};
|
|
93
93
|
size: {
|
|
94
94
|
type: StringConstructor;
|
|
95
|
-
default:
|
|
95
|
+
default: undefined;
|
|
96
96
|
};
|
|
97
97
|
keyValue: {
|
|
98
98
|
type: ArrayConstructor;
|
|
@@ -255,7 +255,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
255
255
|
};
|
|
256
256
|
size: {
|
|
257
257
|
type: StringConstructor;
|
|
258
|
-
default:
|
|
258
|
+
default: undefined;
|
|
259
259
|
};
|
|
260
260
|
keyValue: {
|
|
261
261
|
type: ArrayConstructor;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<el-option :key="index" :label="source[label]" :value="source[value]" :
|
|
2
|
+
<el-option :key="index" :label="source[label]" :value="source[value]" :disabled="source['disabled']">
|
|
3
3
|
<el-tooltip v-if="source?.slotContent?.firstCall || source?.slotContent?.recall" effect="dark" placement="right">
|
|
4
4
|
<div slot="content" style="max-width: 350px;">
|
|
5
5
|
{{ source?.slotContent?.firstCall }} <br> <br>
|
|
@@ -7,6 +7,9 @@
|
|
|
7
7
|
</div>
|
|
8
8
|
<span>{{ source[label] }}</span>
|
|
9
9
|
</el-tooltip>
|
|
10
|
+
<el-tooltip v-if="showTip" :content="source[label]" :open-delay="1000" effect="dark" placement="left">
|
|
11
|
+
<span>{{ source[label] }}</span>
|
|
12
|
+
</el-tooltip>
|
|
10
13
|
</el-option>
|
|
11
14
|
</template>
|
|
12
15
|
|
|
@@ -31,6 +34,10 @@ export default {
|
|
|
31
34
|
value: { // 绑定的值
|
|
32
35
|
type: String,
|
|
33
36
|
required: true
|
|
37
|
+
},
|
|
38
|
+
showTip: { // 提示
|
|
39
|
+
type: Boolean,
|
|
40
|
+
default: true
|
|
34
41
|
}
|
|
35
42
|
}
|
|
36
43
|
}
|
|
@@ -65,8 +65,11 @@
|
|
|
65
65
|
:label="item.label"
|
|
66
66
|
:value="item.value"
|
|
67
67
|
:disabled="item.disabled"
|
|
68
|
-
|
|
69
|
-
|
|
68
|
+
>
|
|
69
|
+
<el-tooltip :content="item.label" :open-delay="1000" effect="dark" placement="left">
|
|
70
|
+
<span>{{ item.label }}</span>
|
|
71
|
+
</el-tooltip>
|
|
72
|
+
</el-option>
|
|
70
73
|
</el-select>
|
|
71
74
|
</div>
|
|
72
75
|
</template>
|
|
@@ -74,7 +77,7 @@
|
|
|
74
77
|
<script>
|
|
75
78
|
import virtualList from 'vue-virtual-scroll-list'
|
|
76
79
|
import ElOptionNode from './el-option-node.vue'
|
|
77
|
-
import { isEqual, cloneDeep } from 'lodash'
|
|
80
|
+
import { isEqual, cloneDeep } from 'lodash-es'
|
|
78
81
|
export default {
|
|
79
82
|
name: 'nf-virtual-select',
|
|
80
83
|
components: { 'virtual-list': virtualList },
|
|
@@ -188,7 +191,7 @@ export default {
|
|
|
188
191
|
},
|
|
189
192
|
size: {
|
|
190
193
|
type: String,
|
|
191
|
-
default:
|
|
194
|
+
default: undefined
|
|
192
195
|
},
|
|
193
196
|
// 默认['label','value']
|
|
194
197
|
keyValue: {
|
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.21",
|
|
4
4
|
"description": "> TODO: description",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"author": "DESKTOP-1EDDQ79\\dev026 <liuxiangxiang@94ai.com>",
|
|
@@ -14,7 +14,8 @@
|
|
|
14
14
|
"url": "http://94ai.gitlab.com/zoujiahe/common-ui.git"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@94ai/nf-theme-chalk": "^3.2.
|
|
17
|
+
"@94ai/nf-theme-chalk": "^3.2.21",
|
|
18
|
+
"lodash-es": "^4.17.21",
|
|
18
19
|
"vue-demi": "^0.14.5",
|
|
19
20
|
"vue-virtual-scroll-list": "^2.3.5"
|
|
20
21
|
},
|
|
@@ -31,5 +32,5 @@
|
|
|
31
32
|
"types": "lib/index.d.ts",
|
|
32
33
|
"main": "lib/nf-virtual-select.cjs.js",
|
|
33
34
|
"module": "lib/nf-virtual-select.esm-bundler.js",
|
|
34
|
-
"gitHead": "
|
|
35
|
+
"gitHead": "8da3362ffe37c1c3114c8bca6c0fe24ac21c0c78"
|
|
35
36
|
}
|