@94ai/nf-search-form 8.0.23 → 8.0.26

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.
@@ -1,21 +1,53 @@
1
1
  declare const _default: __VLS_WithTemplateSlots<import("vue-demi").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
2
2
  value?: number[] | undefined;
3
3
  tag?: string | undefined;
4
+ slotText?: {
5
+ prepend?: [string, string] | undefined;
6
+ append?: [string, string] | undefined;
7
+ suffix?: [string, string] | undefined;
8
+ prefix?: [string, string] | undefined;
9
+ } | undefined;
4
10
  }>, {
5
11
  value: () => never[];
6
12
  tag: string;
13
+ slotText: () => {};
7
14
  }>, {}, {}, {}, {}, import("vue/types/v3-component-options").ComponentOptionsMixin, import("vue/types/v3-component-options").ComponentOptionsMixin, {
8
15
  change: (event: [number | undefined, number | undefined]) => void;
9
16
  input: (event: [number | undefined, number | undefined]) => void;
10
17
  }, string, Readonly<import("vue-demi").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
11
18
  value?: number[] | undefined;
12
19
  tag?: string | undefined;
20
+ slotText?: {
21
+ prepend?: [string, string] | undefined;
22
+ append?: [string, string] | undefined;
23
+ suffix?: [string, string] | undefined;
24
+ prefix?: [string, string] | undefined;
25
+ } | undefined;
13
26
  }>, {
14
27
  value: () => never[];
15
28
  tag: string;
29
+ slotText: () => {};
16
30
  }>>>, {
17
31
  value: number[];
18
32
  tag: string;
33
+ slotText: {
34
+ prepend?: [
35
+ string,
36
+ string
37
+ ];
38
+ append?: [
39
+ string,
40
+ string
41
+ ];
42
+ suffix?: [
43
+ string,
44
+ string
45
+ ];
46
+ prefix?: [
47
+ string,
48
+ string
49
+ ];
50
+ };
19
51
  }>, {
20
52
  "pre-prepend"?(_: {
21
53
  slot: string;
@@ -23,6 +23,12 @@ __sfc_main$5.props = {
23
23
  required: false,
24
24
  type: String,
25
25
  default: "el-input-number"
26
+ },
27
+ slotText: {
28
+ key: "slotText",
29
+ required: false,
30
+ type: Object,
31
+ default: () => ({})
26
32
  }
27
33
  };
28
34
  __sfc_main$5.setup = (__props, __ctx) => {
@@ -57,7 +63,9 @@ __sfc_main$5.setup = (__props, __ctx) => {
57
63
  const inputAttr = vueDemi.computed(() => {
58
64
  return {
59
65
  controls: false,
60
- ...instance == null ? void 0 : instance.$attrs
66
+ type: props.tag === "el-input" ? (instance == null ? void 0 : instance.$attrs.type) || "number" : "",
67
+ ...instance == null ? void 0 : instance.$attrs,
68
+ clearable: false
61
69
  };
62
70
  });
63
71
  const customePlaceholder = vueDemi.computed(() => {
@@ -125,18 +133,30 @@ var _sfc_render$5 = function render() {
125
133
  },
126
134
  expression: "minNumber"
127
135
  }
128
- }, "component", _vm.inputAttr, false), _vm.inputlistens), [_vm._t("pre-prepend", null, {
136
+ }, "component", _vm.inputAttr, false), _vm.inputlistens), [_vm._t("pre-prepend", function() {
137
+ var _a;
138
+ return [((_a = _vm.slotText.prepend) == null ? void 0 : _a[0]) ? _c("span", [_vm._v(_vm._s(_vm.slotText.prepend[0]))]) : _vm._e()];
139
+ }, {
129
140
  "slot": "prepend"
130
- }), _vm._t("pre-append", null, {
141
+ }), _vm._t("pre-append", function() {
142
+ var _a;
143
+ return [((_a = _vm.slotText.append) == null ? void 0 : _a[0]) ? _c("span", [_vm._v(_vm._s(_vm.slotText.append[0]))]) : _vm._e()];
144
+ }, {
131
145
  "slot": "append"
132
- }), _vm._t("pre-suffix", null, {
146
+ }), _vm._t("pre-suffix", function() {
147
+ var _a;
148
+ return [((_a = _vm.slotText.suffix) == null ? void 0 : _a[0]) ? _c("span", [_vm._v(_vm._s(_vm.slotText.suffix[0]))]) : _vm._e()];
149
+ }, {
133
150
  "slot": "suffix"
134
- }), _vm._t("pre-prefix", null, {
151
+ }), _vm._t("pre-prefix", function() {
152
+ var _a;
153
+ return [((_a = _vm.slotText.prefix) == null ? void 0 : _a[0]) ? _c("span", [_vm._v(_vm._s(_vm.slotText.prefix[0]))]) : _vm._e()];
154
+ }, {
135
155
  "slot": "prefix"
136
156
  })], 2), _vm._t("symbol", function() {
137
157
  return [_c("span", {
138
- staticClass: "symbol"
139
- }, [_vm._v("~")])];
158
+ staticClass: "symbol iconfont icon-dao"
159
+ })];
140
160
  }), _c(_vm.tag, _vm._g(_vm._b({
141
161
  tag: "component",
142
162
  staticClass: "nf-number-range-el-input-number",
@@ -154,13 +174,25 @@ var _sfc_render$5 = function render() {
154
174
  },
155
175
  expression: "maxNumber"
156
176
  }
157
- }, "component", _vm.inputAttr, false), _vm.inputlistens), [_vm._t("after-prepend", null, {
177
+ }, "component", _vm.inputAttr, false), _vm.inputlistens), [_vm._t("after-prepend", function() {
178
+ var _a;
179
+ return [((_a = _vm.slotText.prepend) == null ? void 0 : _a[1]) ? _c("span", [_vm._v(_vm._s(_vm.slotText.prepend[1]))]) : _vm._e()];
180
+ }, {
158
181
  "slot": "prepend"
159
- }), _vm._t("after-append", null, {
182
+ }), _vm._t("after-append", function() {
183
+ var _a;
184
+ return [((_a = _vm.slotText.append) == null ? void 0 : _a[1]) ? _c("span", [_vm._v(_vm._s(_vm.slotText.append[1]))]) : _vm._e()];
185
+ }, {
160
186
  "slot": "append"
161
- }), _vm._t("after-suffix", null, {
187
+ }), _vm._t("after-suffix", function() {
188
+ var _a;
189
+ return [((_a = _vm.slotText.suffix) == null ? void 0 : _a[1]) ? _c("span", [_vm._v(_vm._s(_vm.slotText.suffix[1]))]) : _vm._e()];
190
+ }, {
162
191
  "slot": "suffix"
163
- }), _vm._t("after-prefix", null, {
192
+ }), _vm._t("after-prefix", function() {
193
+ var _a;
194
+ return [((_a = _vm.slotText.prefix) == null ? void 0 : _a[1]) ? _c("span", [_vm._v(_vm._s(_vm.slotText.prefix[1]))]) : _vm._e()];
195
+ }, {
164
196
  "slot": "prefix"
165
197
  })], 2)], 2);
166
198
  };
@@ -7975,6 +8007,9 @@ __sfc_main.setup = (__props, __ctx) => {
7975
8007
  handleExchangeKey(data);
7976
8008
  return data;
7977
8009
  };
8010
+ const setNfSearchFormModel = (formData) => {
8011
+ commonUtils.mapDispose.setRecursionValue(nfSearchFormModel.value, formData, true);
8012
+ };
7978
8013
  return Object.assign({
7979
8014
  resolveValue: commonUtils.resolveValue,
7980
8015
  defaultButtonSlot,
@@ -8008,6 +8043,10 @@ __sfc_main.setup = (__props, __ctx) => {
8008
8043
  * 获取表单实时数据(已深拷贝)
8009
8044
  */
8010
8045
  getFormData,
8046
+ /**
8047
+ * 修改表单数据
8048
+ */
8049
+ setNfSearchFormModel,
8011
8050
  /**
8012
8051
  * 列编辑显示的列prop
8013
8052
  */
@@ -8374,7 +8413,7 @@ var _sfc_render = function render6() {
8374
8413
  "size": _vm.resolveValue(item.size || _vm.size, _vm.nfSearchFormModel),
8375
8414
  "round": _vm.resolveValue(item.round || _vm.queryBtnRound, _vm.nfSearchFormModel),
8376
8415
  "circle": _vm.resolveValue(item.circle || _vm.queryBtnCircle, _vm.nfSearchFormModel),
8377
- "loading": _vm.resolveValue(item.loading || _vm.queryBtnLoading, _vm.nfSearchFormModel, _vm.nfSearchFormModel),
8416
+ "loading": _vm.resolveValue(item.loading || _vm.queryBtnLoading, _vm.nfSearchFormModel),
8378
8417
  "disabled": _vm.resolveValue(item.disabled || _vm.queryBtnDisabled, _vm.nfSearchFormModel)
8379
8418
  },
8380
8419
  on: {
@@ -21,6 +21,12 @@ __sfc_main$5.props = {
21
21
  required: false,
22
22
  type: String,
23
23
  default: "el-input-number"
24
+ },
25
+ slotText: {
26
+ key: "slotText",
27
+ required: false,
28
+ type: Object,
29
+ default: () => ({})
24
30
  }
25
31
  };
26
32
  __sfc_main$5.setup = (__props, __ctx) => {
@@ -55,7 +61,9 @@ __sfc_main$5.setup = (__props, __ctx) => {
55
61
  const inputAttr = computed(() => {
56
62
  return {
57
63
  controls: false,
58
- ...instance == null ? void 0 : instance.$attrs
64
+ type: props.tag === "el-input" ? (instance == null ? void 0 : instance.$attrs.type) || "number" : "",
65
+ ...instance == null ? void 0 : instance.$attrs,
66
+ clearable: false
59
67
  };
60
68
  });
61
69
  const customePlaceholder = computed(() => {
@@ -123,18 +131,30 @@ var _sfc_render$5 = function render() {
123
131
  },
124
132
  expression: "minNumber"
125
133
  }
126
- }, "component", _vm.inputAttr, false), _vm.inputlistens), [_vm._t("pre-prepend", null, {
134
+ }, "component", _vm.inputAttr, false), _vm.inputlistens), [_vm._t("pre-prepend", function() {
135
+ var _a;
136
+ return [((_a = _vm.slotText.prepend) == null ? void 0 : _a[0]) ? _c("span", [_vm._v(_vm._s(_vm.slotText.prepend[0]))]) : _vm._e()];
137
+ }, {
127
138
  "slot": "prepend"
128
- }), _vm._t("pre-append", null, {
139
+ }), _vm._t("pre-append", function() {
140
+ var _a;
141
+ return [((_a = _vm.slotText.append) == null ? void 0 : _a[0]) ? _c("span", [_vm._v(_vm._s(_vm.slotText.append[0]))]) : _vm._e()];
142
+ }, {
129
143
  "slot": "append"
130
- }), _vm._t("pre-suffix", null, {
144
+ }), _vm._t("pre-suffix", function() {
145
+ var _a;
146
+ return [((_a = _vm.slotText.suffix) == null ? void 0 : _a[0]) ? _c("span", [_vm._v(_vm._s(_vm.slotText.suffix[0]))]) : _vm._e()];
147
+ }, {
131
148
  "slot": "suffix"
132
- }), _vm._t("pre-prefix", null, {
149
+ }), _vm._t("pre-prefix", function() {
150
+ var _a;
151
+ return [((_a = _vm.slotText.prefix) == null ? void 0 : _a[0]) ? _c("span", [_vm._v(_vm._s(_vm.slotText.prefix[0]))]) : _vm._e()];
152
+ }, {
133
153
  "slot": "prefix"
134
154
  })], 2), _vm._t("symbol", function() {
135
155
  return [_c("span", {
136
- staticClass: "symbol"
137
- }, [_vm._v("~")])];
156
+ staticClass: "symbol iconfont icon-dao"
157
+ })];
138
158
  }), _c(_vm.tag, _vm._g(_vm._b({
139
159
  tag: "component",
140
160
  staticClass: "nf-number-range-el-input-number",
@@ -152,13 +172,25 @@ var _sfc_render$5 = function render() {
152
172
  },
153
173
  expression: "maxNumber"
154
174
  }
155
- }, "component", _vm.inputAttr, false), _vm.inputlistens), [_vm._t("after-prepend", null, {
175
+ }, "component", _vm.inputAttr, false), _vm.inputlistens), [_vm._t("after-prepend", function() {
176
+ var _a;
177
+ return [((_a = _vm.slotText.prepend) == null ? void 0 : _a[1]) ? _c("span", [_vm._v(_vm._s(_vm.slotText.prepend[1]))]) : _vm._e()];
178
+ }, {
156
179
  "slot": "prepend"
157
- }), _vm._t("after-append", null, {
180
+ }), _vm._t("after-append", function() {
181
+ var _a;
182
+ return [((_a = _vm.slotText.append) == null ? void 0 : _a[1]) ? _c("span", [_vm._v(_vm._s(_vm.slotText.append[1]))]) : _vm._e()];
183
+ }, {
158
184
  "slot": "append"
159
- }), _vm._t("after-suffix", null, {
185
+ }), _vm._t("after-suffix", function() {
186
+ var _a;
187
+ return [((_a = _vm.slotText.suffix) == null ? void 0 : _a[1]) ? _c("span", [_vm._v(_vm._s(_vm.slotText.suffix[1]))]) : _vm._e()];
188
+ }, {
160
189
  "slot": "suffix"
161
- }), _vm._t("after-prefix", null, {
190
+ }), _vm._t("after-prefix", function() {
191
+ var _a;
192
+ return [((_a = _vm.slotText.prefix) == null ? void 0 : _a[1]) ? _c("span", [_vm._v(_vm._s(_vm.slotText.prefix[1]))]) : _vm._e()];
193
+ }, {
162
194
  "slot": "prefix"
163
195
  })], 2)], 2);
164
196
  };
@@ -7973,6 +8005,9 @@ __sfc_main.setup = (__props, __ctx) => {
7973
8005
  handleExchangeKey(data);
7974
8006
  return data;
7975
8007
  };
8008
+ const setNfSearchFormModel = (formData) => {
8009
+ mapDispose.setRecursionValue(nfSearchFormModel.value, formData, true);
8010
+ };
7976
8011
  return Object.assign({
7977
8012
  resolveValue,
7978
8013
  defaultButtonSlot,
@@ -8006,6 +8041,10 @@ __sfc_main.setup = (__props, __ctx) => {
8006
8041
  * 获取表单实时数据(已深拷贝)
8007
8042
  */
8008
8043
  getFormData,
8044
+ /**
8045
+ * 修改表单数据
8046
+ */
8047
+ setNfSearchFormModel,
8009
8048
  /**
8010
8049
  * 列编辑显示的列prop
8011
8050
  */
@@ -8372,7 +8411,7 @@ var _sfc_render = function render6() {
8372
8411
  "size": _vm.resolveValue(item.size || _vm.size, _vm.nfSearchFormModel),
8373
8412
  "round": _vm.resolveValue(item.round || _vm.queryBtnRound, _vm.nfSearchFormModel),
8374
8413
  "circle": _vm.resolveValue(item.circle || _vm.queryBtnCircle, _vm.nfSearchFormModel),
8375
- "loading": _vm.resolveValue(item.loading || _vm.queryBtnLoading, _vm.nfSearchFormModel, _vm.nfSearchFormModel),
8414
+ "loading": _vm.resolveValue(item.loading || _vm.queryBtnLoading, _vm.nfSearchFormModel),
8376
8415
  "disabled": _vm.resolveValue(item.disabled || _vm.queryBtnDisabled, _vm.nfSearchFormModel)
8377
8416
  },
8378
8417
  on: {
@@ -12,13 +12,21 @@
12
12
  class="nf-number-range-el-input-number"
13
13
  v-on="inputlistens"
14
14
  >
15
- <slot slot="prepend" name="pre-prepend" />
16
- <slot slot="append" name="pre-append" />
17
- <slot slot="suffix" name="pre-suffix" />
18
- <slot slot="prefix" name="pre-prefix" />
15
+ <slot slot="prepend" name="pre-prepend">
16
+ <span v-if="slotText.prepend?.[0]">{{ slotText.prepend[0] }}</span>
17
+ </slot>
18
+ <slot slot="append" name="pre-append">
19
+ <span v-if="slotText.append?.[0]">{{ slotText.append[0] }}</span>
20
+ </slot>
21
+ <slot slot="suffix" name="pre-suffix">
22
+ <span v-if="slotText.suffix?.[0]">{{ slotText.suffix[0] }}</span>
23
+ </slot>
24
+ <slot slot="prefix" name="pre-prefix">
25
+ <span v-if="slotText.prefix?.[0]">{{ slotText.prefix[0] }}</span>
26
+ </slot>
19
27
  </component>
20
28
  <slot name='symbol'>
21
- <span class="symbol">~</span>
29
+ <span class="symbol iconfont icon-dao" />
22
30
  </slot>
23
31
  <component
24
32
  :is="tag"
@@ -32,10 +40,18 @@
32
40
  class="nf-number-range-el-input-number"
33
41
  v-on="inputlistens"
34
42
  >
35
- <slot slot="prepend" name="after-prepend" />
36
- <slot slot="append" name="after-append" />
37
- <slot slot="suffix" name="after-suffix" />
38
- <slot slot="prefix" name="after-prefix" />
43
+ <slot slot="prepend" name="after-prepend">
44
+ <span v-if="slotText.prepend?.[1]">{{ slotText.prepend[1] }}</span>
45
+ </slot>
46
+ <slot slot="append" name="after-append">
47
+ <span v-if="slotText.append?.[1]">{{ slotText.append[1] }}</span>
48
+ </slot>
49
+ <slot slot="suffix" name="after-suffix">
50
+ <span v-if="slotText.suffix?.[1]">{{ slotText.suffix[1] }}</span>
51
+ </slot>
52
+ <slot slot="prefix" name="after-prefix">
53
+ <span v-if="slotText.prefix?.[1]">{{ slotText.prefix[1] }}</span>
54
+ </slot>
39
55
  </component>
40
56
  </div>
41
57
  </template>
@@ -59,9 +75,16 @@ import {
59
75
  const props = withDefaults(defineProps<{
60
76
  value?: number[],
61
77
  tag?: string
78
+ slotText?: {
79
+ prepend?: [string, string]
80
+ append?: [string, string]
81
+ suffix?: [string, string]
82
+ prefix?: [string, string]
83
+ }
62
84
  }>(), {
63
85
  value: () => [],
64
86
  tag: 'el-input-number',
87
+ slotText: () => ({})
65
88
  })
66
89
 
67
90
  const minNumber = ref<number>()
@@ -104,7 +127,9 @@ const stepStrictly = computed(() => {
104
127
  const inputAttr = computed(() => {
105
128
  return {
106
129
  controls: false,
107
- ...instance?.$attrs
130
+ type: (props.tag === 'el-input') ? (instance?.$attrs.type || 'number') : '',
131
+ ...instance?.$attrs,
132
+ clearable: false
108
133
  }
109
134
  })
110
135
  const customePlaceholder = computed(() => {
@@ -234,7 +234,7 @@
234
234
  :size="resolveValue(item.size || size, nfSearchFormModel)"
235
235
  :round="resolveValue(item.round || queryBtnRound, nfSearchFormModel)"
236
236
  :circle="resolveValue(item.circle || queryBtnCircle, nfSearchFormModel)"
237
- :loading="resolveValue(item.loading || queryBtnLoading, nfSearchFormModel, nfSearchFormModel)"
237
+ :loading="resolveValue(item.loading || queryBtnLoading, nfSearchFormModel)"
238
238
  :disabled="resolveValue(item.disabled || queryBtnDisabled, nfSearchFormModel)"
239
239
  :class="resolveValue(item.class, nfSearchFormModel)"
240
240
  @click="onNfSearchFormClick(item)"
@@ -1348,11 +1348,22 @@ const getFormData = () => {
1348
1348
  return data
1349
1349
  }
1350
1350
 
1351
+ /**
1352
+ * 修改表单数据
1353
+ */
1354
+ const setNfSearchFormModel = (formData) => {
1355
+ mapDispose.setRecursionValue(nfSearchFormModel.value, formData, true)
1356
+ }
1357
+
1351
1358
  defineExpose({
1352
1359
  /**
1353
1360
  * 获取表单实时数据(已深拷贝)
1354
1361
  */
1355
1362
  getFormData,
1363
+ /**
1364
+ * 修改表单数据
1365
+ */
1366
+ setNfSearchFormModel,
1356
1367
  /**
1357
1368
  * 列编辑显示的列prop
1358
1369
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@94ai/nf-search-form",
3
- "version": "8.0.23",
3
+ "version": "8.0.26",
4
4
  "description": "> TODO: description",
5
5
  "keywords": [],
6
6
  "author": "zoujiahe <zoujiahe@94ai.com>",
@@ -14,23 +14,23 @@
14
14
  "url": "http://94ai.gitlab.com/zoujiahe/common-ui.git"
15
15
  },
16
16
  "dependencies": {
17
- "@94ai/common-constants": "^8.0.23",
18
- "@94ai/common-utils": "^8.0.23",
19
- "@94ai/nf-button": "^8.0.23",
20
- "@94ai/nf-double-half-year": "^8.0.23",
21
- "@94ai/nf-double-quarter": "^8.0.23",
22
- "@94ai/nf-double-week": "^8.0.23",
23
- "@94ai/nf-double-year": "^8.0.23",
24
- "@94ai/nf-drawer": "^8.0.23",
25
- "@94ai/nf-form": "^8.0.23",
26
- "@94ai/nf-form-item": "^8.0.23",
27
- "@94ai/nf-half-year-picker": "^8.0.23",
28
- "@94ai/nf-lazy-select": "^8.0.23",
29
- "@94ai/nf-message": "^8.0.23",
30
- "@94ai/nf-quarter-picker": "^8.0.23",
31
- "@94ai/nf-theme-chalk": "^8.0.23",
32
- "@94ai/nf-transfer-select": "^8.0.23",
33
- "@94ai/nf-virtual-select": "^8.0.23",
17
+ "@94ai/common-constants": "^8.0.26",
18
+ "@94ai/common-utils": "^8.0.26",
19
+ "@94ai/nf-button": "^8.0.26",
20
+ "@94ai/nf-double-half-year": "^8.0.26",
21
+ "@94ai/nf-double-quarter": "^8.0.26",
22
+ "@94ai/nf-double-week": "^8.0.26",
23
+ "@94ai/nf-double-year": "^8.0.26",
24
+ "@94ai/nf-drawer": "^8.0.26",
25
+ "@94ai/nf-form": "^8.0.26",
26
+ "@94ai/nf-form-item": "^8.0.26",
27
+ "@94ai/nf-half-year-picker": "^8.0.26",
28
+ "@94ai/nf-lazy-select": "^8.0.26",
29
+ "@94ai/nf-message": "^8.0.26",
30
+ "@94ai/nf-quarter-picker": "^8.0.26",
31
+ "@94ai/nf-theme-chalk": "^8.0.26",
32
+ "@94ai/nf-transfer-select": "^8.0.26",
33
+ "@94ai/nf-virtual-select": "^8.0.26",
34
34
  "idb-keyval": "^6.2.1",
35
35
  "resize-observer-polyfill": "^1.5.1",
36
36
  "vue-demi": "^0.14.5",
@@ -50,5 +50,5 @@
50
50
  "types": "lib/index.d.ts",
51
51
  "main": "lib/nf-search-form.cjs.js",
52
52
  "module": "lib/nf-search-form.esm-bundler.js",
53
- "gitHead": "ca1689a2c0ec736df12a5d3a2c6edc51abb2e89b"
53
+ "gitHead": "dda2dd703950f91e3422378c9882e58266c30a9a"
54
54
  }