@94ai/nf-virtual-select 9.0.0 → 10.0.0
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 +65 -65
- package/lib/index.d.ts +1243 -1243
- package/lib/nf-virtual-select-container.vue.d.ts +34 -34
- package/lib/nf-virtual-select.cjs.js +14 -18
- package/lib/nf-virtual-select.esm-bundler.js +14 -18
- package/lib/nf-virtual-select.vue.d.ts +439 -439
- package/lib/style/css.d.ts +1 -0
- package/lib/style/index.d.ts +1 -0
- package/package/nf-virtual-select.vue +11 -11
- package/package.json +8 -8
package/lib/style/css.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
package/lib/style/index.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -435,7 +435,7 @@ export default {
|
|
|
435
435
|
},
|
|
436
436
|
// 绑定方法
|
|
437
437
|
bindEvents() {
|
|
438
|
-
const events = { ...
|
|
438
|
+
const events = { ...this.$listeners, ...this.itemOptions.events }
|
|
439
439
|
if (events?.change) {
|
|
440
440
|
delete events.change
|
|
441
441
|
}
|
|
@@ -448,7 +448,7 @@ export default {
|
|
|
448
448
|
if (events?.['visible-change']) {
|
|
449
449
|
delete events['visible-change']
|
|
450
450
|
}
|
|
451
|
-
return events
|
|
451
|
+
return events
|
|
452
452
|
},
|
|
453
453
|
isVirtualSelect() {
|
|
454
454
|
return this.virtualList || this.itemOptions.virtualList
|
|
@@ -476,8 +476,8 @@ export default {
|
|
|
476
476
|
},
|
|
477
477
|
matchedCount() {
|
|
478
478
|
const matchedNum = this.currentVal.filter(id =>
|
|
479
|
-
this.selectArr
|
|
480
|
-
).length
|
|
479
|
+
this.selectArr.some(obj => obj[this.keyValue[1]] === id)
|
|
480
|
+
).length;
|
|
481
481
|
return matchedNum
|
|
482
482
|
}
|
|
483
483
|
},
|
|
@@ -564,13 +564,13 @@ export default {
|
|
|
564
564
|
if ((this.isVirtualSelect)) {
|
|
565
565
|
// 虚拟
|
|
566
566
|
// 无回显值
|
|
567
|
-
let selectArr = this.optionsList
|
|
567
|
+
let selectArr = this.optionsList.map(it => ({
|
|
568
568
|
...it,
|
|
569
569
|
[this.keyValue[0]]: it[this.keyValue[0]],
|
|
570
570
|
[this.keyValue[1]]: it[this.keyValue[1]],
|
|
571
571
|
[this.dataKey]: typeof it[this.keyValue[1]] === 'boolean' ? `${it[this.keyValue[0]]}${it[this.keyValue[1]]}` : it[this.keyValue[1]],
|
|
572
572
|
disabled: it['disabled'] ?? false
|
|
573
|
-
}))
|
|
573
|
+
}))
|
|
574
574
|
if (this.currentVal && this.echoValueTop) {
|
|
575
575
|
// 有回显值
|
|
576
576
|
if ((this.itemOptions.multiple || this.multiple) && Array.isArray(this.currentVal)) {
|
|
@@ -596,7 +596,7 @@ export default {
|
|
|
596
596
|
} else {
|
|
597
597
|
// 非虚拟选择器
|
|
598
598
|
let selectArr = []
|
|
599
|
-
selectArr =
|
|
599
|
+
selectArr = this.optionsList.map(it => ({
|
|
600
600
|
...it,
|
|
601
601
|
[this.keyValue[0]]: it[this.keyValue[0]],
|
|
602
602
|
[this.keyValue[1]]: it[this.keyValue[1]],
|
|
@@ -605,7 +605,7 @@ export default {
|
|
|
605
605
|
if (this.isKeywordHighlight) {
|
|
606
606
|
if (this.keyword) {
|
|
607
607
|
const queryLower = this.keyword.toLowerCase().trim();
|
|
608
|
-
const queryText =
|
|
608
|
+
const queryText = this.keyword.replace(/\,/g, ',')
|
|
609
609
|
let querySet = null
|
|
610
610
|
if (queryText.includes(',')) {
|
|
611
611
|
querySet = new Set(queryText.split(","))
|
|
@@ -642,7 +642,7 @@ export default {
|
|
|
642
642
|
} else {
|
|
643
643
|
if(needReset) this.reset()
|
|
644
644
|
const queryLower = query.toLowerCase().trim();
|
|
645
|
-
const queryText =
|
|
645
|
+
const queryText = query.replace(/\,/g, ',')
|
|
646
646
|
let querySet = null
|
|
647
647
|
if (queryText.includes(',')) {
|
|
648
648
|
querySet = new Set(queryText.split(","))
|
|
@@ -668,7 +668,7 @@ export default {
|
|
|
668
668
|
const multiple_elements = selectArr.filter(item => this.currentVal.includes(item[this.keyValue[1]]))
|
|
669
669
|
selectArr = [...multiple_elements, ...selectArr.filter(item => !multiple_elements.includes(item))]
|
|
670
670
|
}
|
|
671
|
-
this.selectArr =
|
|
671
|
+
this.selectArr = selectArr.map(it => {
|
|
672
672
|
return {
|
|
673
673
|
[this.keyValue[0]]: it[this.keyValue[0]],
|
|
674
674
|
[this.keyValue[1]]: it[this.keyValue[1]],
|
|
@@ -690,7 +690,7 @@ export default {
|
|
|
690
690
|
}
|
|
691
691
|
},
|
|
692
692
|
async visibleChange(bool) {
|
|
693
|
-
const events = { ...
|
|
693
|
+
const events = { ...this.$listeners, ...this.itemOptions.events }
|
|
694
694
|
const fn = events['visible-change']
|
|
695
695
|
if (fn) {
|
|
696
696
|
let go = fn(bool)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@94ai/nf-virtual-select",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "10.0.0",
|
|
4
4
|
"description": "> TODO: description",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"author": "zoujiahe <zoujiahe@94ai.com>,DESKTOP-1EDDQ79\\dev026 <liuxiangxiang@94ai.com>",
|
|
@@ -14,12 +14,13 @@
|
|
|
14
14
|
"url": "http://gitlab.94ai.pro/zoujiahe/common-ui.git"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@94ai/common-utils": "^
|
|
18
|
-
"@94ai/nf-theme-chalk": "^
|
|
17
|
+
"@94ai/common-utils": "^10.0.0",
|
|
18
|
+
"@94ai/nf-theme-chalk": "^10.0.0",
|
|
19
19
|
"lodash-es": "^4.17.21",
|
|
20
20
|
"sortablejs": "^1.15.3",
|
|
21
21
|
"vue-demi": "^0.14.5",
|
|
22
|
-
"vue-virtual-scroll-list": "^2.3.5"
|
|
22
|
+
"vue-virtual-scroll-list": "^2.3.5",
|
|
23
|
+
"@94ai/vue2-runtime-helpers": "1.0.1"
|
|
23
24
|
},
|
|
24
25
|
"peerDependenciesMeta": {
|
|
25
26
|
"@vue/composition-api": {
|
|
@@ -28,11 +29,10 @@
|
|
|
28
29
|
},
|
|
29
30
|
"peerDependencies": {
|
|
30
31
|
"@vue/composition-api": "^1.0.0-rc.1",
|
|
31
|
-
"
|
|
32
|
-
"
|
|
32
|
+
"vue": "^2.0.0 || >=3.0.0",
|
|
33
|
+
"element-ui": ">=2.13.2"
|
|
33
34
|
},
|
|
34
35
|
"types": "lib/index.d.ts",
|
|
35
36
|
"main": "lib/nf-virtual-select.cjs.js",
|
|
36
|
-
"module": "lib/nf-virtual-select.esm-bundler.js"
|
|
37
|
-
"gitHead": "afe3016f0e42dfb7fedf6cbbe400ec08bf4b8662"
|
|
37
|
+
"module": "lib/nf-virtual-select.esm-bundler.js"
|
|
38
38
|
}
|