@94ai/nf-search-form 3.2.32 → 3.2.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.
package/lib/index.d.ts CHANGED
@@ -68,6 +68,10 @@ declare const _default: import("vue/types/v3-component-public-instance").Compone
68
68
  type: import("vue-demi").PropType<boolean>;
69
69
  default: boolean;
70
70
  };
71
+ itemWidth: {
72
+ type: import("vue-demi").PropType<number>;
73
+ default: number;
74
+ };
71
75
  rules: {
72
76
  type: import("vue-demi").PropType<Record<string, any>>;
73
77
  default: undefined;
@@ -469,6 +473,10 @@ declare const _default: import("vue/types/v3-component-public-instance").Compone
469
473
  type: import("vue-demi").PropType<boolean>;
470
474
  default: boolean;
471
475
  };
476
+ itemWidth: {
477
+ type: import("vue-demi").PropType<number>;
478
+ default: number;
479
+ };
472
480
  rules: {
473
481
  type: import("vue-demi").PropType<Record<string, any>>;
474
482
  default: undefined;
@@ -827,6 +835,7 @@ declare const _default: import("vue/types/v3-component-public-instance").Compone
827
835
  size: "medium" | "small" | "mini";
828
836
  selectEmptyWarningTips: string;
829
837
  disabled: boolean;
838
+ itemWidth: number;
830
839
  rules: Record<string, any>;
831
840
  inline: boolean;
832
841
  upIcon: string;
@@ -973,6 +982,10 @@ declare const _default: import("vue/types/v3-component-public-instance").Compone
973
982
  type: import("vue-demi").PropType<boolean>;
974
983
  default: boolean;
975
984
  };
985
+ itemWidth: {
986
+ type: import("vue-demi").PropType<number>;
987
+ default: number;
988
+ };
976
989
  rules: {
977
990
  type: import("vue-demi").PropType<Record<string, any>>;
978
991
  default: undefined;
@@ -1443,6 +1456,10 @@ declare const _default: import("vue/types/v3-component-public-instance").Compone
1443
1456
  type: import("vue-demi").PropType<boolean>;
1444
1457
  default: boolean;
1445
1458
  };
1459
+ itemWidth: {
1460
+ type: import("vue-demi").PropType<number>;
1461
+ default: number;
1462
+ };
1446
1463
  rules: {
1447
1464
  type: import("vue-demi").PropType<Record<string, any>>;
1448
1465
  default: undefined;
@@ -1844,6 +1861,10 @@ declare const _default: import("vue/types/v3-component-public-instance").Compone
1844
1861
  type: import("vue-demi").PropType<boolean>;
1845
1862
  default: boolean;
1846
1863
  };
1864
+ itemWidth: {
1865
+ type: import("vue-demi").PropType<number>;
1866
+ default: number;
1867
+ };
1847
1868
  rules: {
1848
1869
  type: import("vue-demi").PropType<Record<string, any>>;
1849
1870
  default: undefined;
@@ -2271,6 +2292,7 @@ declare const _default: import("vue/types/v3-component-public-instance").Compone
2271
2292
  size: "medium" | "small" | "mini";
2272
2293
  selectEmptyWarningTips: string;
2273
2294
  disabled: boolean;
2295
+ itemWidth: number;
2274
2296
  rules: Record<string, any>;
2275
2297
  inline: boolean;
2276
2298
  upIcon: string;
@@ -2418,6 +2440,10 @@ declare const _default: import("vue/types/v3-component-public-instance").Compone
2418
2440
  type: import("vue-demi").PropType<boolean>;
2419
2441
  default: boolean;
2420
2442
  };
2443
+ itemWidth: {
2444
+ type: import("vue-demi").PropType<number>;
2445
+ default: number;
2446
+ };
2421
2447
  rules: {
2422
2448
  type: import("vue-demi").PropType<Record<string, any>>;
2423
2449
  default: undefined;
@@ -8,6 +8,10 @@ declare const _default: __VLS_WithTemplateSlots<import("vue-demi").DefineCompone
8
8
  type: import("vue-demi").PropType<NfSearchFormItemOption>;
9
9
  default: () => {};
10
10
  };
11
+ itemWidth: {
12
+ type: import("vue-demi").PropType<number>;
13
+ default: number;
14
+ };
11
15
  }, {}, {}, {}, {}, import("vue/types/v3-component-options").ComponentOptionsMixin, import("vue/types/v3-component-options").ComponentOptionsMixin, {
12
16
  input: (event: any) => void;
13
17
  "update:value": (event: any) => void;
@@ -20,9 +24,14 @@ declare const _default: __VLS_WithTemplateSlots<import("vue-demi").DefineCompone
20
24
  type: import("vue-demi").PropType<NfSearchFormItemOption>;
21
25
  default: () => {};
22
26
  };
27
+ itemWidth: {
28
+ type: import("vue-demi").PropType<number>;
29
+ default: number;
30
+ };
23
31
  }>>, {
24
32
  value: any;
25
33
  itemOptions: NfSearchFormItemOption;
34
+ itemWidth: number;
26
35
  }>, Partial<Record<string, (_: {}) => any>> & Partial<Record<string, (_: {}) => any>>>;
27
36
  export default _default;
28
37
  type __VLS_WithTemplateSlots<T, S> = T & {
@@ -334,6 +334,12 @@ __sfc_main$3.props = {
334
334
  required: false,
335
335
  type: null,
336
336
  default: () => ({})
337
+ },
338
+ itemWidth: {
339
+ key: "itemWidth",
340
+ required: false,
341
+ type: Number,
342
+ default: 227
337
343
  }
338
344
  };
339
345
  __sfc_main$3.setup = (__props, __ctx) => {
@@ -344,6 +350,9 @@ __sfc_main$3.setup = (__props, __ctx) => {
344
350
  const slotName = vueDemi.computed(() => {
345
351
  return props.itemOptions.slot || "";
346
352
  });
353
+ const width = vueDemi.computed(() => {
354
+ return (props.itemOptions.width || props.itemWidth) + "px";
355
+ });
347
356
  const currentVal = vueDemi.computed({
348
357
  get() {
349
358
  return props.value;
@@ -496,6 +505,7 @@ __sfc_main$3.setup = (__props, __ctx) => {
496
505
  };
497
506
  return {
498
507
  slotName,
508
+ width,
499
509
  currentVal,
500
510
  bindProps,
501
511
  bindEvents,
@@ -530,7 +540,10 @@ var _sfc_render$3 = function render3() {
530
540
  var _vm = this, _c = _vm._self._c;
531
541
  _vm._self._setupProxy;
532
542
  return _c("div", {
533
- staticClass: "nf-search-form-item"
543
+ staticClass: "nf-search-form-item",
544
+ style: {
545
+ width: _vm.width
546
+ }
534
547
  }, [_vm.slotName ? [_vm._t(_vm.slotName)] : [_vm.isInput ? _c("el-input", _vm._g(_vm._b({
535
548
  attrs: {
536
549
  "placeholder": _vm.itemOptions.placeholder
@@ -559,6 +572,7 @@ var _sfc_render$3 = function render3() {
559
572
  }
560
573
  }, "el-input-number", _vm.bindProps, false), _vm.bindEvents)) : _vm._e(), _vm.isSelect ? _c("nf-virtual-select", _vm._g(_vm._b({
561
574
  attrs: {
575
+ "width": _vm.width,
562
576
  "item-options": _vm.itemOptions,
563
577
  "placeholder": _vm.itemOptions.placeholder
564
578
  },
@@ -6580,6 +6594,12 @@ __sfc_main.props = {
6580
6594
  type: String,
6581
6595
  default: "block"
6582
6596
  },
6597
+ itemWidth: {
6598
+ key: "itemWidth",
6599
+ required: false,
6600
+ type: Number,
6601
+ default: 227
6602
+ },
6583
6603
  labelWidth: {
6584
6604
  key: "labelWidth",
6585
6605
  required: false,
@@ -7488,6 +7508,7 @@ var _sfc_render = function render6() {
7488
7508
  }, [_c("search-form-item", {
7489
7509
  key: item.key,
7490
7510
  attrs: {
7511
+ "item-width": _vm.itemWidth,
7491
7512
  "item-options": item
7492
7513
  },
7493
7514
  model: {
@@ -332,6 +332,12 @@ __sfc_main$3.props = {
332
332
  required: false,
333
333
  type: null,
334
334
  default: () => ({})
335
+ },
336
+ itemWidth: {
337
+ key: "itemWidth",
338
+ required: false,
339
+ type: Number,
340
+ default: 227
335
341
  }
336
342
  };
337
343
  __sfc_main$3.setup = (__props, __ctx) => {
@@ -342,6 +348,9 @@ __sfc_main$3.setup = (__props, __ctx) => {
342
348
  const slotName = computed(() => {
343
349
  return props.itemOptions.slot || "";
344
350
  });
351
+ const width = computed(() => {
352
+ return (props.itemOptions.width || props.itemWidth) + "px";
353
+ });
345
354
  const currentVal = computed({
346
355
  get() {
347
356
  return props.value;
@@ -494,6 +503,7 @@ __sfc_main$3.setup = (__props, __ctx) => {
494
503
  };
495
504
  return {
496
505
  slotName,
506
+ width,
497
507
  currentVal,
498
508
  bindProps,
499
509
  bindEvents,
@@ -528,7 +538,10 @@ var _sfc_render$3 = function render3() {
528
538
  var _vm = this, _c = _vm._self._c;
529
539
  _vm._self._setupProxy;
530
540
  return _c("div", {
531
- staticClass: "nf-search-form-item"
541
+ staticClass: "nf-search-form-item",
542
+ style: {
543
+ width: _vm.width
544
+ }
532
545
  }, [_vm.slotName ? [_vm._t(_vm.slotName)] : [_vm.isInput ? _c("el-input", _vm._g(_vm._b({
533
546
  attrs: {
534
547
  "placeholder": _vm.itemOptions.placeholder
@@ -557,6 +570,7 @@ var _sfc_render$3 = function render3() {
557
570
  }
558
571
  }, "el-input-number", _vm.bindProps, false), _vm.bindEvents)) : _vm._e(), _vm.isSelect ? _c("nf-virtual-select", _vm._g(_vm._b({
559
572
  attrs: {
573
+ "width": _vm.width,
560
574
  "item-options": _vm.itemOptions,
561
575
  "placeholder": _vm.itemOptions.placeholder
562
576
  },
@@ -6578,6 +6592,12 @@ __sfc_main.props = {
6578
6592
  type: String,
6579
6593
  default: "block"
6580
6594
  },
6595
+ itemWidth: {
6596
+ key: "itemWidth",
6597
+ required: false,
6598
+ type: Number,
6599
+ default: 227
6600
+ },
6581
6601
  labelWidth: {
6582
6602
  key: "labelWidth",
6583
6603
  required: false,
@@ -7486,6 +7506,7 @@ var _sfc_render = function render6() {
7486
7506
  }, [_c("search-form-item", {
7487
7507
  key: item.key,
7488
7508
  attrs: {
7509
+ "item-width": _vm.itemWidth,
7489
7510
  "item-options": item
7490
7511
  },
7491
7512
  model: {
@@ -69,6 +69,10 @@ declare const _default: __VLS_WithTemplateSlots<import("vue-demi").DefineCompone
69
69
  type: import("vue-demi").PropType<boolean>;
70
70
  default: boolean;
71
71
  };
72
+ itemWidth: {
73
+ type: import("vue-demi").PropType<number>;
74
+ default: number;
75
+ };
72
76
  rules: {
73
77
  type: import("vue-demi").PropType<Record<string, any>>;
74
78
  default: undefined;
@@ -547,6 +551,10 @@ declare const _default: __VLS_WithTemplateSlots<import("vue-demi").DefineCompone
547
551
  type: import("vue-demi").PropType<boolean>;
548
552
  default: boolean;
549
553
  };
554
+ itemWidth: {
555
+ type: import("vue-demi").PropType<number>;
556
+ default: number;
557
+ };
550
558
  rules: {
551
559
  type: import("vue-demi").PropType<Record<string, any>>;
552
560
  default: undefined;
@@ -897,6 +905,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue-demi").DefineCompone
897
905
  size: 'medium' | 'small' | 'mini';
898
906
  selectEmptyWarningTips: string;
899
907
  disabled: boolean;
908
+ itemWidth: number;
900
909
  rules: Record<string, any>;
901
910
  inline: boolean;
902
911
  upIcon: string;
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <div class="nf-search-form-item">
2
+ <div class="nf-search-form-item" :style="{ width }">
3
3
  <template v-if="slotName">
4
4
  <slot :name="slotName" />
5
5
  </template>
@@ -22,6 +22,7 @@
22
22
  />
23
23
  <nf-virtual-select
24
24
  v-if="isSelect"
25
+ :width="width"
25
26
  v-model="currentVal"
26
27
  v-bind="bindProps"
27
28
  v-on="bindEvents"
@@ -203,9 +204,14 @@ const props = withDefaults(defineProps<{
203
204
  * 单个表单项渲染数据
204
205
  */
205
206
  itemOptions?: NfSearchFormItemOption,
207
+ /**
208
+ * content宽度
209
+ */
210
+ itemWidth?: number,
206
211
  }>(), {
207
212
  value: undefined,
208
213
  itemOptions: () => ({}),
214
+ itemWidth: 227,
209
215
  })
210
216
 
211
217
  const instance = getCurrentInstance()?.proxy
@@ -214,6 +220,10 @@ const slotName = computed(() => {
214
220
  return props.itemOptions.slot || ''
215
221
  })
216
222
 
223
+ const width = computed(() => {
224
+ return (props.itemOptions.width || props.itemWidth) + 'px'
225
+ })
226
+
217
227
  // 双向绑定数据值
218
228
  const currentVal = computed({
219
229
  get() {
@@ -53,6 +53,7 @@
53
53
  >
54
54
  <search-form-item
55
55
  :key="item.key"
56
+ :item-width="itemWidth"
56
57
  v-model="nfSearchFormModel[item.prop]"
57
58
  :item-options="item">
58
59
  <!-- 定制化SearchItem?提示-->
@@ -331,6 +332,10 @@ const props = withDefaults(defineProps<{
331
332
  inline?: boolean
332
333
  btnBoxLabel?: string
333
334
  btnModel?: 'inline' | 'block'
335
+ /**
336
+ * 兼容ai-search-form控制item父dom宽度
337
+ */
338
+ itemWidth?: number
334
339
  /**
335
340
  * label宽度
336
341
  */
@@ -478,6 +483,7 @@ const props = withDefaults(defineProps<{
478
483
  formOptions: () => [],
479
484
  showItems: () => [],
480
485
  closable: false,
486
+ itemWidth: 227,
481
487
  btnItems: () => '',
482
488
  columnEdit: false,
483
489
  btnBoxLabel: '',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@94ai/nf-search-form",
3
- "version": "3.2.32",
3
+ "version": "3.2.35",
4
4
  "description": "> TODO: description",
5
5
  "keywords": [],
6
6
  "author": "zoujiahe <zoujiahe@94ai.com>",
@@ -14,20 +14,20 @@
14
14
  "url": "http://94ai.gitlab.com/zoujiahe/common-ui.git"
15
15
  },
16
16
  "dependencies": {
17
- "@94ai/nf-action": "^3.2.32",
18
- "@94ai/nf-double-half-year": "^3.2.32",
19
- "@94ai/nf-double-quarter": "^3.2.32",
20
- "@94ai/nf-double-week": "^3.2.32",
21
- "@94ai/nf-double-year": "^3.2.32",
22
- "@94ai/nf-drawer": "^3.2.32",
23
- "@94ai/nf-form": "^3.2.32",
24
- "@94ai/nf-form-item": "^3.2.32",
25
- "@94ai/nf-half-year-picker": "^3.2.32",
26
- "@94ai/nf-message": "^3.2.32",
27
- "@94ai/nf-quarter-picker": "^3.2.32",
28
- "@94ai/nf-select-transfer": "^3.2.32",
29
- "@94ai/nf-theme-chalk": "^3.2.32",
30
- "@94ai/nf-virtual-select": "^3.2.32",
17
+ "@94ai/nf-action": "^3.2.35",
18
+ "@94ai/nf-double-half-year": "^3.2.35",
19
+ "@94ai/nf-double-quarter": "^3.2.35",
20
+ "@94ai/nf-double-week": "^3.2.35",
21
+ "@94ai/nf-double-year": "^3.2.35",
22
+ "@94ai/nf-drawer": "^3.2.35",
23
+ "@94ai/nf-form": "^3.2.35",
24
+ "@94ai/nf-form-item": "^3.2.35",
25
+ "@94ai/nf-half-year-picker": "^3.2.35",
26
+ "@94ai/nf-message": "^3.2.35",
27
+ "@94ai/nf-quarter-picker": "^3.2.35",
28
+ "@94ai/nf-select-transfer": "^3.2.35",
29
+ "@94ai/nf-theme-chalk": "^3.2.35",
30
+ "@94ai/nf-virtual-select": "^3.2.35",
31
31
  "vue-cookies": "^1.8.3",
32
32
  "vue-demi": "^0.14.5",
33
33
  "vuedraggable": "^2.24.3"
@@ -45,5 +45,5 @@
45
45
  "types": "lib/index.d.ts",
46
46
  "main": "lib/nf-search-form.cjs.js",
47
47
  "module": "lib/nf-search-form.esm-bundler.js",
48
- "gitHead": "10cdc1cc67171a0545ae2b2afd2794caff180e53"
48
+ "gitHead": "98f8d6851ec74d978e54fa3f16676b24eba5e63f"
49
49
  }