@94ai/nf-virtual-select 3.3.23 → 3.3.35

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.
@@ -382,15 +382,13 @@ const _sfc_main = {
382
382
  multiple: this.isMultipleSelect,
383
383
  options: this.optionsList
384
384
  };
385
- if (obj.element === "custom-select" || obj.element === "el-select") {
386
- if (obj.multiple) {
387
- obj = {
388
- "collapse-tags": true,
389
- ...obj
390
- };
391
- }
392
- delete obj.options;
385
+ if (obj.multiple) {
386
+ obj = {
387
+ "collapse-tags": true,
388
+ ...obj
389
+ };
393
390
  }
391
+ delete obj.options;
394
392
  return obj;
395
393
  },
396
394
  // 绑定方法
@@ -612,10 +610,11 @@ const _sfc_main = {
612
610
  }
613
611
  };
614
612
  var _sfc_render = function render2() {
613
+ var _a, _b;
615
614
  var _vm = this, _c = _vm._self._c;
616
615
  return _c("virtual-select-container", _vm._g({
617
616
  ref: "nfVirtualSelectContainer",
618
- class: ["nf-virtual-select nf-virtual-select-el-select", _vm.bindProps["collapse-tags"] ? "nf-virtual-select-collapse-tags" : ""],
617
+ class: ["nf-virtual-select nf-virtual-select-el-select", _vm.bindProps["collapse-tags"] ? "nf-virtual-select-collapse-tags" : "", _vm.bindProps.multiple && ((_a = _vm.currentVal) == null ? void 0 : _a.length) > 1 ? "nf-virtual-select-select-one-more" : "", _vm.bindProps.multiple && !((_b = _vm.currentVal) == null ? void 0 : _b.length) ? "nf-virtual-select-select-no-input" : ""],
619
618
  attrs: {
620
619
  "config": _vm.config,
621
620
  "tag": _vm.tag
@@ -380,15 +380,13 @@ const _sfc_main = {
380
380
  multiple: this.isMultipleSelect,
381
381
  options: this.optionsList
382
382
  };
383
- if (obj.element === "custom-select" || obj.element === "el-select") {
384
- if (obj.multiple) {
385
- obj = {
386
- "collapse-tags": true,
387
- ...obj
388
- };
389
- }
390
- delete obj.options;
383
+ if (obj.multiple) {
384
+ obj = {
385
+ "collapse-tags": true,
386
+ ...obj
387
+ };
391
388
  }
389
+ delete obj.options;
392
390
  return obj;
393
391
  },
394
392
  // 绑定方法
@@ -610,10 +608,11 @@ const _sfc_main = {
610
608
  }
611
609
  };
612
610
  var _sfc_render = function render2() {
611
+ var _a, _b;
613
612
  var _vm = this, _c = _vm._self._c;
614
613
  return _c("virtual-select-container", _vm._g({
615
614
  ref: "nfVirtualSelectContainer",
616
- class: ["nf-virtual-select nf-virtual-select-el-select", _vm.bindProps["collapse-tags"] ? "nf-virtual-select-collapse-tags" : ""],
615
+ class: ["nf-virtual-select nf-virtual-select-el-select", _vm.bindProps["collapse-tags"] ? "nf-virtual-select-collapse-tags" : "", _vm.bindProps.multiple && ((_a = _vm.currentVal) == null ? void 0 : _a.length) > 1 ? "nf-virtual-select-select-one-more" : "", _vm.bindProps.multiple && !((_b = _vm.currentVal) == null ? void 0 : _b.length) ? "nf-virtual-select-select-no-input" : ""],
617
616
  attrs: {
618
617
  "config": _vm.config,
619
618
  "tag": _vm.tag
@@ -4,7 +4,11 @@
4
4
  v-on="bindEvents"
5
5
  @visible-change="visibleChange"
6
6
  ref="nfVirtualSelectContainer"
7
- :class="['nf-virtual-select nf-virtual-select-el-select', bindProps['collapse-tags'] ? 'nf-virtual-select-collapse-tags' : '']"
7
+ :class="[
8
+ 'nf-virtual-select nf-virtual-select-el-select',
9
+ bindProps['collapse-tags'] ? 'nf-virtual-select-collapse-tags' : '',
10
+ (bindProps.multiple && currentVal?.length > 1) ? 'nf-virtual-select-select-one-more' : '',
11
+ (bindProps.multiple && !currentVal?.length) ? 'nf-virtual-select-select-no-input' : '']"
8
12
  :config="config"
9
13
  :tag="tag"
10
14
  >
@@ -345,15 +349,13 @@ export default {
345
349
  multiple: this.isMultipleSelect,
346
350
  options: this.optionsList
347
351
  }
348
- if (obj.element === 'custom-select' || (obj.element === 'el-select')) {
349
- if (obj.multiple) {
350
- obj = {
351
- 'collapse-tags': true,
352
- ...obj
353
- }
352
+ if (obj.multiple) {
353
+ obj = {
354
+ 'collapse-tags': true,
355
+ ...obj
354
356
  }
355
- delete obj.options
356
357
  }
358
+ delete obj.options
357
359
  return obj
358
360
  },
359
361
  // 绑定方法
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@94ai/nf-virtual-select",
3
- "version": "3.3.23",
3
+ "version": "3.3.35",
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": "^3.3.23",
18
- "@94ai/nf-theme-chalk": "^3.3.23",
17
+ "@94ai/common-utils": "^3.3.35",
18
+ "@94ai/nf-theme-chalk": "^3.3.35",
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": "ca963992af80cdcbc0e929fe51a4165e52c6119d"
36
+ "gitHead": "7ec765b1c35eb75e8c584e6945590005b48f2c09"
37
37
  }