@94ai/nf-virtual-select 5.0.36 → 5.0.38
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.
|
@@ -2505,6 +2505,16 @@ const _sfc_main = {
|
|
|
2505
2505
|
type: Boolean,
|
|
2506
2506
|
default: false
|
|
2507
2507
|
},
|
|
2508
|
+
/** 是否可全选(必须先配置multiple为true) */
|
|
2509
|
+
selectAll: {
|
|
2510
|
+
type: Boolean,
|
|
2511
|
+
default: false
|
|
2512
|
+
},
|
|
2513
|
+
/** 全部 文字(兼容国际化翻译) */
|
|
2514
|
+
selectAllText: {
|
|
2515
|
+
type: String,
|
|
2516
|
+
default: "全部"
|
|
2517
|
+
},
|
|
2508
2518
|
width: {
|
|
2509
2519
|
type: String,
|
|
2510
2520
|
default: "100%"
|
|
@@ -2821,7 +2831,7 @@ const _sfc_main = {
|
|
|
2821
2831
|
}
|
|
2822
2832
|
};
|
|
2823
2833
|
var _sfc_render = function render2() {
|
|
2824
|
-
var _a, _b;
|
|
2834
|
+
var _a, _b, _c2, _d, _e, _f;
|
|
2825
2835
|
var _vm = this, _c = _vm._self._c;
|
|
2826
2836
|
return _c("virtual-select-container", _vm._g({
|
|
2827
2837
|
ref: "nfVirtualSelectContainer",
|
|
@@ -2894,7 +2904,20 @@ var _sfc_render = function render2() {
|
|
|
2894
2904
|
"slot": "footer"
|
|
2895
2905
|
}), _vm._t("header", null, {
|
|
2896
2906
|
"slot": "header"
|
|
2897
|
-
})], 2), _vm._t("default")] : [_vm._t("header"), _vm.
|
|
2907
|
+
})], 2), _vm._t("default")] : [_vm._t("header"), _vm.bindProps.multiple && _vm.bindProps.selectAll ? _c("div", {
|
|
2908
|
+
staticClass: "el-select-dropdown__item top-select-all",
|
|
2909
|
+
class: ((_c2 = _vm.currentVal) == null ? void 0 : _c2.length) === ((_d = _vm.selectArr) == null ? void 0 : _d.length) ? "selected" : ""
|
|
2910
|
+
}, [_c("el-checkbox", {
|
|
2911
|
+
attrs: {
|
|
2912
|
+
"value": ((_e = _vm.currentVal) == null ? void 0 : _e.length) === ((_f = _vm.selectArr) == null ? void 0 : _f.length)
|
|
2913
|
+
},
|
|
2914
|
+
on: {
|
|
2915
|
+
"change": (check) => {
|
|
2916
|
+
const checkList = check ? _vm.selectArr.map((items) => items[_vm.keyValue[1]]) : [];
|
|
2917
|
+
_vm.currentVal = checkList;
|
|
2918
|
+
}
|
|
2919
|
+
}
|
|
2920
|
+
}, [_vm._v(_vm._s(_vm.selectAllText))])], 1) : _vm._e(), _vm._l(_vm.selectArr, function(item, index2) {
|
|
2898
2921
|
return _c("el-option", {
|
|
2899
2922
|
key: item[_vm.keyValue[0]] + "_" + index2,
|
|
2900
2923
|
attrs: {
|
|
@@ -2503,6 +2503,16 @@ const _sfc_main = {
|
|
|
2503
2503
|
type: Boolean,
|
|
2504
2504
|
default: false
|
|
2505
2505
|
},
|
|
2506
|
+
/** 是否可全选(必须先配置multiple为true) */
|
|
2507
|
+
selectAll: {
|
|
2508
|
+
type: Boolean,
|
|
2509
|
+
default: false
|
|
2510
|
+
},
|
|
2511
|
+
/** 全部 文字(兼容国际化翻译) */
|
|
2512
|
+
selectAllText: {
|
|
2513
|
+
type: String,
|
|
2514
|
+
default: "全部"
|
|
2515
|
+
},
|
|
2506
2516
|
width: {
|
|
2507
2517
|
type: String,
|
|
2508
2518
|
default: "100%"
|
|
@@ -2819,7 +2829,7 @@ const _sfc_main = {
|
|
|
2819
2829
|
}
|
|
2820
2830
|
};
|
|
2821
2831
|
var _sfc_render = function render2() {
|
|
2822
|
-
var _a, _b;
|
|
2832
|
+
var _a, _b, _c2, _d, _e, _f;
|
|
2823
2833
|
var _vm = this, _c = _vm._self._c;
|
|
2824
2834
|
return _c("virtual-select-container", _vm._g({
|
|
2825
2835
|
ref: "nfVirtualSelectContainer",
|
|
@@ -2892,7 +2902,20 @@ var _sfc_render = function render2() {
|
|
|
2892
2902
|
"slot": "footer"
|
|
2893
2903
|
}), _vm._t("header", null, {
|
|
2894
2904
|
"slot": "header"
|
|
2895
|
-
})], 2), _vm._t("default")] : [_vm._t("header"), _vm.
|
|
2905
|
+
})], 2), _vm._t("default")] : [_vm._t("header"), _vm.bindProps.multiple && _vm.bindProps.selectAll ? _c("div", {
|
|
2906
|
+
staticClass: "el-select-dropdown__item top-select-all",
|
|
2907
|
+
class: ((_c2 = _vm.currentVal) == null ? void 0 : _c2.length) === ((_d = _vm.selectArr) == null ? void 0 : _d.length) ? "selected" : ""
|
|
2908
|
+
}, [_c("el-checkbox", {
|
|
2909
|
+
attrs: {
|
|
2910
|
+
"value": ((_e = _vm.currentVal) == null ? void 0 : _e.length) === ((_f = _vm.selectArr) == null ? void 0 : _f.length)
|
|
2911
|
+
},
|
|
2912
|
+
on: {
|
|
2913
|
+
"change": (check) => {
|
|
2914
|
+
const checkList = check ? _vm.selectArr.map((items) => items[_vm.keyValue[1]]) : [];
|
|
2915
|
+
_vm.currentVal = checkList;
|
|
2916
|
+
}
|
|
2917
|
+
}
|
|
2918
|
+
}, [_vm._v(_vm._s(_vm.selectAllText))])], 1) : _vm._e(), _vm._l(_vm.selectArr, function(item, index2) {
|
|
2896
2919
|
return _c("el-option", {
|
|
2897
2920
|
key: item[_vm.keyValue[0]] + "_" + index2,
|
|
2898
2921
|
attrs: {
|
|
@@ -58,6 +58,19 @@
|
|
|
58
58
|
</template>
|
|
59
59
|
<template v-else>
|
|
60
60
|
<slot name="header" />
|
|
61
|
+
<div
|
|
62
|
+
v-if="bindProps.multiple && bindProps.selectAll"
|
|
63
|
+
class="el-select-dropdown__item top-select-all"
|
|
64
|
+
:class="currentVal?.length === selectArr?.length ? 'selected' : ''"
|
|
65
|
+
>
|
|
66
|
+
<el-checkbox
|
|
67
|
+
:value="currentVal?.length === selectArr?.length"
|
|
68
|
+
@change="check => {
|
|
69
|
+
const checkList = check ? selectArr.map(items => items[keyValue[1]]) : [];
|
|
70
|
+
currentVal = checkList
|
|
71
|
+
}"
|
|
72
|
+
>{{selectAllText}}</el-checkbox>
|
|
73
|
+
</div>
|
|
61
74
|
<el-option
|
|
62
75
|
v-for="(item, index) in selectArr"
|
|
63
76
|
:key="item[keyValue[0]] + '_' + index"
|
|
@@ -264,6 +277,16 @@ export default {
|
|
|
264
277
|
type: Boolean,
|
|
265
278
|
default: false
|
|
266
279
|
},
|
|
280
|
+
/** 是否可全选(必须先配置multiple为true) */
|
|
281
|
+
selectAll: {
|
|
282
|
+
type: Boolean,
|
|
283
|
+
default: false
|
|
284
|
+
},
|
|
285
|
+
/** 全部 文字(兼容国际化翻译) */
|
|
286
|
+
selectAllText: {
|
|
287
|
+
type: String,
|
|
288
|
+
default: '全部'
|
|
289
|
+
},
|
|
267
290
|
width: {
|
|
268
291
|
type: String,
|
|
269
292
|
default: '100%'
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@94ai/nf-virtual-select",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.38",
|
|
4
4
|
"description": "> TODO: description",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"author": "zoujiahe <zoujiahe@94ai.com>,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": "^5.0.
|
|
18
|
-
"@94ai/nf-theme-chalk": "^5.0.
|
|
17
|
+
"@94ai/common-utils": "^5.0.38",
|
|
18
|
+
"@94ai/nf-theme-chalk": "^5.0.38",
|
|
19
19
|
"lodash-es": "^4.17.21",
|
|
20
20
|
"sortablejs": "^1.15.2",
|
|
21
21
|
"vue-demi": "^0.14.5",
|
|
@@ -34,5 +34,5 @@
|
|
|
34
34
|
"types": "lib/index.d.ts",
|
|
35
35
|
"main": "lib/nf-virtual-select.cjs.js",
|
|
36
36
|
"module": "lib/nf-virtual-select.esm-bundler.js",
|
|
37
|
-
"gitHead": "
|
|
37
|
+
"gitHead": "2afbe191194d16dea560fe11950a816732150001"
|
|
38
38
|
}
|