@94ai/nf-virtual-select 100.1.25 → 100.1.30

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/index.d.ts CHANGED
@@ -137,6 +137,10 @@ declare const _default: import("vue/types/v3-component-public-instance").Compone
137
137
  type: StringConstructor;
138
138
  default: string;
139
139
  };
140
+ isFitWidth: {
141
+ type: BooleanConstructor;
142
+ default: boolean;
143
+ };
140
144
  dataComponent: {
141
145
  type: ObjectConstructor;
142
146
  };
@@ -286,6 +290,10 @@ declare const _default: import("vue/types/v3-component-public-instance").Compone
286
290
  type: StringConstructor;
287
291
  default: string;
288
292
  };
293
+ isFitWidth: {
294
+ type: BooleanConstructor;
295
+ default: boolean;
296
+ };
289
297
  dataComponent: {
290
298
  type: ObjectConstructor;
291
299
  };
@@ -333,6 +341,7 @@ declare const _default: import("vue/types/v3-component-public-instance").Compone
333
341
  multiple: boolean;
334
342
  width: string;
335
343
  height: string;
344
+ isFitWidth: boolean;
336
345
  extraProps: Record<string, any>;
337
346
  dataKey: string | Function;
338
347
  }, true, import("vue/types/v3-component-options").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, any>> & Readonly<Readonly<import("vue-demi").ExtractPropTypes<{
@@ -470,6 +479,10 @@ declare const _default: import("vue/types/v3-component-public-instance").Compone
470
479
  type: StringConstructor;
471
480
  default: string;
472
481
  };
482
+ isFitWidth: {
483
+ type: BooleanConstructor;
484
+ default: boolean;
485
+ };
473
486
  dataComponent: {
474
487
  type: ObjectConstructor;
475
488
  };
@@ -498,6 +511,7 @@ declare const _default: import("vue/types/v3-component-public-instance").Compone
498
511
  bindEvents(): any;
499
512
  formatItemOptions(): any;
500
513
  optionsList(): any;
514
+ maxLimitElWidth(): any;
501
515
  }> & import("vue-demi").ComponentCustomProperties & Readonly<import("vue-demi").ExtractPropTypes<{
502
516
  offset: {
503
517
  type: NumberConstructor;
@@ -633,6 +647,10 @@ declare const _default: import("vue/types/v3-component-public-instance").Compone
633
647
  type: StringConstructor;
634
648
  default: string;
635
649
  };
650
+ isFitWidth: {
651
+ type: BooleanConstructor;
652
+ default: boolean;
653
+ };
636
654
  dataComponent: {
637
655
  type: ObjectConstructor;
638
656
  };
@@ -782,6 +800,10 @@ declare const _default: import("vue/types/v3-component-public-instance").Compone
782
800
  type: StringConstructor;
783
801
  default: string;
784
802
  };
803
+ isFitWidth: {
804
+ type: BooleanConstructor;
805
+ default: boolean;
806
+ };
785
807
  dataComponent: {
786
808
  type: ObjectConstructor;
787
809
  };
@@ -810,6 +832,7 @@ declare const _default: import("vue/types/v3-component-public-instance").Compone
810
832
  bindEvents(): any;
811
833
  formatItemOptions(): any;
812
834
  optionsList(): any;
835
+ maxLimitElWidth(): any;
813
836
  }, {}, import("vue/types/v3-component-options").ComponentOptionsMixin, import("vue/types/v3-component-options").ComponentOptionsMixin, {}, string, {
814
837
  value: string | number | unknown[];
815
838
  placeholder: string;
@@ -843,6 +866,7 @@ declare const _default: import("vue/types/v3-component-public-instance").Compone
843
866
  multiple: boolean;
844
867
  width: string;
845
868
  height: string;
869
+ isFitWidth: boolean;
846
870
  extraProps: Record<string, any>;
847
871
  dataKey: string | Function;
848
872
  }> & {
@@ -981,6 +1005,10 @@ declare const _default: import("vue/types/v3-component-public-instance").Compone
981
1005
  type: StringConstructor;
982
1006
  default: string;
983
1007
  };
1008
+ isFitWidth: {
1009
+ type: BooleanConstructor;
1010
+ default: boolean;
1011
+ };
984
1012
  dataComponent: {
985
1013
  type: ObjectConstructor;
986
1014
  };
@@ -61,11 +61,19 @@ var _sfc_render$1 = function render() {
61
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
62
  attrs: {
63
63
  "content": _vm.source[_vm.label],
64
- "open-delay": 1e3,
64
+ "open-delay": 0,
65
65
  "effect": "dark",
66
66
  "placement": "left"
67
67
  }
68
- }, [_c("span", [_vm._v(_vm._s(_vm.source[_vm.label]))])]) : _vm._e()], 1);
68
+ }, [_c("div", {
69
+ staticStyle: {
70
+ "max-width": "120px"
71
+ },
72
+ attrs: {
73
+ "slot": "content"
74
+ },
75
+ slot: "content"
76
+ }, [_vm._v(" " + _vm._s(_vm.source[_vm.label]) + " ")]), _c("span", [_vm._v(_vm._s(_vm.source[_vm.label]))])]) : _vm._e()], 1);
69
77
  };
70
78
  var _sfc_staticRenderFns$1 = [];
71
79
  var __component__$1 = /* @__PURE__ */ vue2RuntimeHelpers.normalizeComponent(_sfc_main$1, _sfc_render$1, _sfc_staticRenderFns$1, false, null, null, null, null);
@@ -229,6 +237,10 @@ const _sfc_main = {
229
237
  type: String,
230
238
  default: "245px"
231
239
  },
240
+ isFitWidth: {
241
+ type: Boolean,
242
+ default: true
243
+ },
232
244
  dataComponent: {
233
245
  type: Object
234
246
  },
@@ -323,6 +335,9 @@ const _sfc_main = {
323
335
  } else {
324
336
  return [];
325
337
  }
338
+ },
339
+ maxLimitElWidth() {
340
+ return this.isFitWidth ? this.width : null;
326
341
  }
327
342
  },
328
343
  watch: {
@@ -519,7 +534,7 @@ var _sfc_render = function render2() {
519
534
  }, "el-select", _vm.bindProps, false), _vm.bindEvents), [_c("virtual-list", {
520
535
  ref: "virtualSelectList",
521
536
  staticClass: "nf-virtual-select-list",
522
- style: `max-height: ${_vm.height};width: ${_vm.width}; overflow-y: auto;`,
537
+ style: `max-height: ${_vm.height};width: ${_vm.maxLimitElWidth}; overflow-y: auto;`,
523
538
  attrs: {
524
539
  "offset": _vm.offset,
525
540
  "start": _vm.start,
@@ -59,11 +59,19 @@ var _sfc_render$1 = function render() {
59
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
60
  attrs: {
61
61
  "content": _vm.source[_vm.label],
62
- "open-delay": 1e3,
62
+ "open-delay": 0,
63
63
  "effect": "dark",
64
64
  "placement": "left"
65
65
  }
66
- }, [_c("span", [_vm._v(_vm._s(_vm.source[_vm.label]))])]) : _vm._e()], 1);
66
+ }, [_c("div", {
67
+ staticStyle: {
68
+ "max-width": "120px"
69
+ },
70
+ attrs: {
71
+ "slot": "content"
72
+ },
73
+ slot: "content"
74
+ }, [_vm._v(" " + _vm._s(_vm.source[_vm.label]) + " ")]), _c("span", [_vm._v(_vm._s(_vm.source[_vm.label]))])]) : _vm._e()], 1);
67
75
  };
68
76
  var _sfc_staticRenderFns$1 = [];
69
77
  var __component__$1 = /* @__PURE__ */ normalizeComponent(_sfc_main$1, _sfc_render$1, _sfc_staticRenderFns$1, false, null, null, null, null);
@@ -227,6 +235,10 @@ const _sfc_main = {
227
235
  type: String,
228
236
  default: "245px"
229
237
  },
238
+ isFitWidth: {
239
+ type: Boolean,
240
+ default: true
241
+ },
230
242
  dataComponent: {
231
243
  type: Object
232
244
  },
@@ -321,6 +333,9 @@ const _sfc_main = {
321
333
  } else {
322
334
  return [];
323
335
  }
336
+ },
337
+ maxLimitElWidth() {
338
+ return this.isFitWidth ? this.width : null;
324
339
  }
325
340
  },
326
341
  watch: {
@@ -517,7 +532,7 @@ var _sfc_render = function render2() {
517
532
  }, "el-select", _vm.bindProps, false), _vm.bindEvents), [_c("virtual-list", {
518
533
  ref: "virtualSelectList",
519
534
  staticClass: "nf-virtual-select-list",
520
- style: `max-height: ${_vm.height};width: ${_vm.width}; overflow-y: auto;`,
535
+ style: `max-height: ${_vm.height};width: ${_vm.maxLimitElWidth}; overflow-y: auto;`,
521
536
  attrs: {
522
537
  "offset": _vm.offset,
523
538
  "start": _vm.start,
@@ -133,6 +133,10 @@ declare const _default: import("vue").DefineComponent<{
133
133
  type: StringConstructor;
134
134
  default: string;
135
135
  };
136
+ isFitWidth: {
137
+ type: BooleanConstructor;
138
+ default: boolean;
139
+ };
136
140
  dataComponent: {
137
141
  type: ObjectConstructor;
138
142
  };
@@ -161,6 +165,7 @@ declare const _default: import("vue").DefineComponent<{
161
165
  bindEvents(): any;
162
166
  formatItemOptions(): any;
163
167
  optionsList(): any;
168
+ maxLimitElWidth(): any;
164
169
  }, {}, import("vue/types/v3-component-options").ComponentOptionsMixin, import("vue/types/v3-component-options").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<{
165
170
  offset: {
166
171
  type: NumberConstructor;
@@ -296,6 +301,10 @@ declare const _default: import("vue").DefineComponent<{
296
301
  type: StringConstructor;
297
302
  default: string;
298
303
  };
304
+ isFitWidth: {
305
+ type: BooleanConstructor;
306
+ default: boolean;
307
+ };
299
308
  dataComponent: {
300
309
  type: ObjectConstructor;
301
310
  };
@@ -343,6 +352,7 @@ declare const _default: import("vue").DefineComponent<{
343
352
  multiple: boolean;
344
353
  width: string;
345
354
  height: string;
355
+ isFitWidth: boolean;
346
356
  extraProps: Record<string, any>;
347
357
  dataKey: string | Function;
348
358
  }>;
@@ -7,7 +7,10 @@
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">
10
+ <el-tooltip v-if="showTip" :content="source[label]" :open-delay="0" effect="dark" placement="left">
11
+ <div slot="content" style="max-width: 120px;">
12
+ {{ source[label] }}
13
+ </div>
11
14
  <span>{{ source[label] }}</span>
12
15
  </el-tooltip>
13
16
  </el-option>
@@ -41,7 +41,7 @@
41
41
  @resized="resized"
42
42
  ref="virtualSelectList"
43
43
  class="nf-virtual-select-list"
44
- :style="`max-height: ${height};width: ${width}; overflow-y: auto;`"
44
+ :style="`max-height: ${height};width: ${maxLimitElWidth}; overflow-y: auto;`"
45
45
  :data-key="dataKey"
46
46
  :estimate-size="estimateSize"
47
47
  :data-sources="selectArr"
@@ -236,6 +236,10 @@ export default {
236
236
  type: String,
237
237
  default: '245px'
238
238
  },
239
+ isFitWidth: {
240
+ type: Boolean,
241
+ default: true
242
+ },
239
243
  dataComponent: {
240
244
  type: Object,
241
245
  },
@@ -326,6 +330,9 @@ export default {
326
330
  } else {
327
331
  return [];
328
332
  }
333
+ },
334
+ maxLimitElWidth() {
335
+ return this.isFitWidth ? this.width : null
329
336
  }
330
337
  },
331
338
  watch: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@94ai/nf-virtual-select",
3
- "version": "100.1.25",
3
+ "version": "100.1.30",
4
4
  "description": "> TODO: description",
5
5
  "keywords": [],
6
6
  "author": "DESKTOP-1EDDQ79\\dev026 <liuxiangxiang@94ai.com>",
@@ -14,7 +14,7 @@
14
14
  "url": "http://94ai.gitlab.com/zoujiahe/common-ui.git"
15
15
  },
16
16
  "dependencies": {
17
- "@94ai/nf-theme-chalk": "^100.1.25",
17
+ "@94ai/nf-theme-chalk": "^100.1.30",
18
18
  "lodash-es": "^4.17.21",
19
19
  "vue-demi": "^0.14.5",
20
20
  "vue-virtual-scroll-list": "^2.3.5"
@@ -32,5 +32,5 @@
32
32
  "types": "lib/index.d.ts",
33
33
  "main": "lib/nf-virtual-select.cjs.js",
34
34
  "module": "lib/nf-virtual-select.esm-bundler.js",
35
- "gitHead": "9d708da760ec394ed82d237b8aa22f92c81a0aab"
35
+ "gitHead": "02e302f26f86f86c1a1fb75ad208754857ce610f"
36
36
  }