@94ai/nf-virtual-select 3.2.16 → 3.2.20
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.
|
@@ -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;
|
|
@@ -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);
|
|
@@ -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);
|
|
@@ -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 = [];
|
|
@@ -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 },
|
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.20",
|
|
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.20",
|
|
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": "60e08cb237f842c3fc38168cbd911ec3a4c9d440"
|
|
35
36
|
}
|