@fmdeui/fmui 1.0.155 → 1.0.157
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/es/components/fm-inputdropdown/index.d.ts +9 -0
- package/es/components/fm-inputdropdown/index.vue.d.ts +15 -0
- package/es/components/fm-inputnumber/index.d.ts +4 -0
- package/es/components/fm-inputnumber/index.vue.d.ts +4 -0
- package/es/packages/components/fm-inputdropdown/index2.vue.mjs +9 -2
- package/es/packages/components/fm-inputnumber/index2.vue.mjs +72 -9
- package/es/packages/stores/ainputdropdow.mjs +2 -2
- package/es/stores/ainputdropdow.d.ts +3 -3
- package/index.js +84 -14
- package/index.min.js +7 -7
- package/index.min.mjs +6 -6
- package/index.mjs +84 -14
- package/lib/components/fm-inputdropdown/index.d.ts +9 -0
- package/lib/components/fm-inputdropdown/index.vue.d.ts +15 -0
- package/lib/components/fm-inputnumber/index.d.ts +4 -0
- package/lib/components/fm-inputnumber/index.vue.d.ts +4 -0
- package/lib/packages/components/fm-inputdropdown/index2.vue.js +9 -2
- package/lib/packages/components/fm-inputnumber/index2.vue.js +72 -9
- package/lib/packages/stores/ainputdropdow.js +2 -2
- package/lib/stores/ainputdropdow.d.ts +3 -3
- package/locale/en.js +1 -1
- package/locale/en.min.js +1 -1
- package/locale/en.min.mjs +1 -1
- package/locale/en.mjs +1 -1
- package/locale/zh-cn.js +1 -1
- package/locale/zh-cn.min.js +1 -1
- package/locale/zh-cn.min.mjs +1 -1
- package/locale/zh-cn.mjs +1 -1
- package/package.json +1 -1
- /package/es/{component.css → defaults.css} +0 -0
- /package/lib/{component.css → version.css} +0 -0
|
@@ -70,6 +70,10 @@ export declare const Fminputdropdown: DefineComponent<ExtractPropTypes<{
|
|
|
70
70
|
};
|
|
71
71
|
default: never[];
|
|
72
72
|
};
|
|
73
|
+
bizType: {
|
|
74
|
+
type: NumberConstructor;
|
|
75
|
+
default: number;
|
|
76
|
+
};
|
|
73
77
|
freshSize: {
|
|
74
78
|
type: (NumberConstructor | StringConstructor)[];
|
|
75
79
|
default: number;
|
|
@@ -159,6 +163,10 @@ export declare const Fminputdropdown: DefineComponent<ExtractPropTypes<{
|
|
|
159
163
|
};
|
|
160
164
|
default: never[];
|
|
161
165
|
};
|
|
166
|
+
bizType: {
|
|
167
|
+
type: NumberConstructor;
|
|
168
|
+
default: number;
|
|
169
|
+
};
|
|
162
170
|
freshSize: {
|
|
163
171
|
type: (NumberConstructor | StringConstructor)[];
|
|
164
172
|
default: number;
|
|
@@ -189,6 +197,7 @@ export declare const Fminputdropdown: DefineComponent<ExtractPropTypes<{
|
|
|
189
197
|
apiAction: string;
|
|
190
198
|
basecode: string;
|
|
191
199
|
multibasecode: any[];
|
|
200
|
+
bizType: number;
|
|
192
201
|
freshSize: string | number;
|
|
193
202
|
autoLoadData: boolean;
|
|
194
203
|
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
@@ -88,6 +88,13 @@ declare const _default: DefineComponent<ExtractPropTypes<{
|
|
|
88
88
|
};
|
|
89
89
|
default: never[];
|
|
90
90
|
};
|
|
91
|
+
/**
|
|
92
|
+
* 业务类型
|
|
93
|
+
*/
|
|
94
|
+
bizType: {
|
|
95
|
+
type: NumberConstructor;
|
|
96
|
+
default: number;
|
|
97
|
+
};
|
|
91
98
|
freshSize: {
|
|
92
99
|
type: (NumberConstructor | StringConstructor)[];
|
|
93
100
|
default: number;
|
|
@@ -198,6 +205,13 @@ declare const _default: DefineComponent<ExtractPropTypes<{
|
|
|
198
205
|
};
|
|
199
206
|
default: never[];
|
|
200
207
|
};
|
|
208
|
+
/**
|
|
209
|
+
* 业务类型
|
|
210
|
+
*/
|
|
211
|
+
bizType: {
|
|
212
|
+
type: NumberConstructor;
|
|
213
|
+
default: number;
|
|
214
|
+
};
|
|
201
215
|
freshSize: {
|
|
202
216
|
type: (NumberConstructor | StringConstructor)[];
|
|
203
217
|
default: number;
|
|
@@ -231,6 +245,7 @@ declare const _default: DefineComponent<ExtractPropTypes<{
|
|
|
231
245
|
apiAction: string;
|
|
232
246
|
basecode: string;
|
|
233
247
|
multibasecode: any[];
|
|
248
|
+
bizType: number;
|
|
234
249
|
freshSize: string | number;
|
|
235
250
|
autoLoadData: boolean;
|
|
236
251
|
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
@@ -107,8 +107,12 @@ export declare const FmInputNumber: {
|
|
|
107
107
|
}, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & VNodeProps & AllowedComponentProps & ComponentCustomProps & (new () => {
|
|
108
108
|
$slots: {
|
|
109
109
|
prepend?(_: {}): any;
|
|
110
|
+
prepend?(_: {}): any;
|
|
111
|
+
append?(_: {}): any;
|
|
110
112
|
append?(_: {}): any;
|
|
111
113
|
prefix?(_: {}): any;
|
|
114
|
+
prefix?(_: {}): any;
|
|
115
|
+
suffix?(_: {}): any;
|
|
112
116
|
suffix?(_: {}): any;
|
|
113
117
|
};
|
|
114
118
|
});
|
|
@@ -3,8 +3,12 @@ declare function __VLS_template(): {
|
|
|
3
3
|
attrs: Partial<{}>;
|
|
4
4
|
slots: {
|
|
5
5
|
prepend?(_: {}): any;
|
|
6
|
+
prepend?(_: {}): any;
|
|
7
|
+
append?(_: {}): any;
|
|
6
8
|
append?(_: {}): any;
|
|
7
9
|
prefix?(_: {}): any;
|
|
10
|
+
prefix?(_: {}): any;
|
|
11
|
+
suffix?(_: {}): any;
|
|
8
12
|
suffix?(_: {}): any;
|
|
9
13
|
};
|
|
10
14
|
refs: {};
|
|
@@ -72,6 +72,13 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
72
72
|
type: Array,
|
|
73
73
|
default: []
|
|
74
74
|
},
|
|
75
|
+
/**
|
|
76
|
+
* 业务类型
|
|
77
|
+
*/
|
|
78
|
+
bizType: {
|
|
79
|
+
type: Number,
|
|
80
|
+
default: 0
|
|
81
|
+
},
|
|
75
82
|
freshSize: {
|
|
76
83
|
type: [Number, String],
|
|
77
84
|
default: 20
|
|
@@ -115,13 +122,13 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
115
122
|
const handClick = async () => {
|
|
116
123
|
if (props.autoLoadData && props.basecode && props.basecode != "") {
|
|
117
124
|
const useBaseApi = usefminputdropdownstore();
|
|
118
|
-
state.optionData = await useBaseApi.getOptionsData(props.apiService, props.apiAction, props.basecode, false, props.multibasecode);
|
|
125
|
+
state.optionData = await useBaseApi.getOptionsData(props.apiService, props.apiAction, props.basecode, false, props.multibasecode, props.bizType);
|
|
119
126
|
}
|
|
120
127
|
};
|
|
121
128
|
const handRestdata = async () => {
|
|
122
129
|
if (props.basecode && props.basecode != "") {
|
|
123
130
|
const useBaseApi = usefminputdropdownstore();
|
|
124
|
-
state.optionData = await useBaseApi.getOptionsData(props.apiService, props.apiAction, props.basecode, true, []);
|
|
131
|
+
state.optionData = await useBaseApi.getOptionsData(props.apiService, props.apiAction, props.basecode, true, [], props.bizType);
|
|
125
132
|
}
|
|
126
133
|
};
|
|
127
134
|
return (_ctx, _cache) => {
|
|
@@ -35,6 +35,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
35
35
|
const handleInput = (val) => {
|
|
36
36
|
if (val === "" || val === null || val === void 0) {
|
|
37
37
|
const validNum = props.defaultValue !== -1 ? props.defaultValue : 0;
|
|
38
|
+
modelValue.value = validNum;
|
|
38
39
|
emit("handleInput", validNum);
|
|
39
40
|
return;
|
|
40
41
|
}
|
|
@@ -46,23 +47,47 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
46
47
|
emit("handleInput", validNum);
|
|
47
48
|
return;
|
|
48
49
|
}
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
50
|
+
let cleaned = String(val).replace(/[^\d.]/g, "");
|
|
51
|
+
const dotIndex = cleaned.indexOf(".");
|
|
52
|
+
if (dotIndex !== -1) {
|
|
53
|
+
const before = cleaned.substring(0, dotIndex + 1);
|
|
54
|
+
const after = cleaned.substring(dotIndex + 1).replace(/\./g, "");
|
|
55
|
+
cleaned = before + after;
|
|
56
|
+
}
|
|
57
|
+
if (cleaned.startsWith(".")) {
|
|
58
|
+
cleaned = "0" + cleaned;
|
|
59
|
+
}
|
|
60
|
+
const parts = cleaned.split(".");
|
|
61
|
+
parts[0] = parts[0].replace(/^0+/, "") || "0";
|
|
62
|
+
cleaned = parts.join(".");
|
|
63
|
+
if (cleaned.includes(".")) {
|
|
64
|
+
const [intPart, decPart] = cleaned.split(".");
|
|
65
|
+
cleaned = `${intPart}.${decPart.substring(0, props.decimalPlaces)}`;
|
|
52
66
|
}
|
|
53
|
-
|
|
67
|
+
modelValue.value = cleaned;
|
|
68
|
+
emit("handleInput", cleaned);
|
|
54
69
|
};
|
|
55
70
|
watch(() => modelValue.value, (newvalue, oldValue) => {
|
|
56
|
-
if (
|
|
57
|
-
|
|
71
|
+
if (props.bType == "number") {
|
|
72
|
+
if (newvalue === null || newvalue === void 0 || newvalue === "") {
|
|
73
|
+
modelValue.value = props.defaultValue == -1 ? 0 : props.defaultValue;
|
|
74
|
+
}
|
|
75
|
+
} else {
|
|
76
|
+
if (newvalue === null || newvalue === void 0 || newvalue === "") {
|
|
77
|
+
const validNum = props.defaultValue == -1 ? 0 : props.defaultValue;
|
|
78
|
+
modelValue.value = validNum;
|
|
79
|
+
} else {
|
|
80
|
+
emit("handleInput", newvalue);
|
|
81
|
+
}
|
|
58
82
|
}
|
|
59
83
|
});
|
|
60
84
|
return (_ctx, _cache) => {
|
|
85
|
+
const _component_el_input = resolveComponent("el-input");
|
|
61
86
|
const _component_el_input_number = resolveComponent("el-input-number");
|
|
62
|
-
return openBlock(), createBlock(
|
|
87
|
+
return __props.bType !== "money" ? (openBlock(), createBlock(_component_el_input, {
|
|
88
|
+
key: 0,
|
|
63
89
|
modelValue: modelValue.value,
|
|
64
90
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => modelValue.value = $event),
|
|
65
|
-
controls: false,
|
|
66
91
|
placeholder: __props.placeholder,
|
|
67
92
|
onInput: handleInput
|
|
68
93
|
}, createSlots({
|
|
@@ -97,7 +122,45 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
97
122
|
]),
|
|
98
123
|
key: "3"
|
|
99
124
|
} : void 0
|
|
100
|
-
]), 1032, ["modelValue", "placeholder"])
|
|
125
|
+
]), 1032, ["modelValue", "placeholder"])) : (openBlock(), createBlock(_component_el_input_number, {
|
|
126
|
+
key: 1,
|
|
127
|
+
modelValue: modelValue.value,
|
|
128
|
+
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => modelValue.value = $event),
|
|
129
|
+
controls: false,
|
|
130
|
+
placeholder: __props.placeholder
|
|
131
|
+
}, createSlots({
|
|
132
|
+
_: 2
|
|
133
|
+
/* DYNAMIC */
|
|
134
|
+
}, [
|
|
135
|
+
_ctx.$slots.prepend ? {
|
|
136
|
+
name: "prepend",
|
|
137
|
+
fn: withCtx(() => [
|
|
138
|
+
renderSlot(_ctx.$slots, "prepend")
|
|
139
|
+
]),
|
|
140
|
+
key: "0"
|
|
141
|
+
} : void 0,
|
|
142
|
+
_ctx.$slots.append ? {
|
|
143
|
+
name: "append",
|
|
144
|
+
fn: withCtx(() => [
|
|
145
|
+
renderSlot(_ctx.$slots, "append")
|
|
146
|
+
]),
|
|
147
|
+
key: "1"
|
|
148
|
+
} : void 0,
|
|
149
|
+
_ctx.$slots.prefix ? {
|
|
150
|
+
name: "prefix",
|
|
151
|
+
fn: withCtx(() => [
|
|
152
|
+
renderSlot(_ctx.$slots, "prefix")
|
|
153
|
+
]),
|
|
154
|
+
key: "2"
|
|
155
|
+
} : void 0,
|
|
156
|
+
_ctx.$slots.suffix ? {
|
|
157
|
+
name: "suffix",
|
|
158
|
+
fn: withCtx(() => [
|
|
159
|
+
renderSlot(_ctx.$slots, "suffix")
|
|
160
|
+
]),
|
|
161
|
+
key: "3"
|
|
162
|
+
} : void 0
|
|
163
|
+
]), 1032, ["modelValue", "placeholder"]));
|
|
101
164
|
};
|
|
102
165
|
}
|
|
103
166
|
});
|
|
@@ -7,14 +7,14 @@ const usefminputdropdownstore = defineStore("fminputdropdownstore", () => {
|
|
|
7
7
|
const state = reactive({
|
|
8
8
|
optionsData: {}
|
|
9
9
|
});
|
|
10
|
-
const getOptionsData = async (apiService, apiAction, basecode, reload = false, multibasecode = []) => {
|
|
10
|
+
const getOptionsData = async (apiService, apiAction, basecode, reload = false, multibasecode = [], bizType = 0) => {
|
|
11
11
|
var _a, _b;
|
|
12
12
|
if (!reload) {
|
|
13
13
|
if (state.optionsData[basecode] && state.optionsData[basecode].length > 0) {
|
|
14
14
|
return state.optionsData[basecode];
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
|
-
const res = await useBaseApi(apiService, { loading: true }).get(null, apiAction + "/?codetype=" + basecode + "&mcodes=" + multibasecode.join(","));
|
|
17
|
+
const res = await useBaseApi(apiService, { loading: true }).get(null, apiAction + "/?codetype=" + basecode + "&mcodes=" + multibasecode.join(",") + "&bizType=" + bizType);
|
|
18
18
|
if (multibasecode.length > 0) {
|
|
19
19
|
const mdata = (_a = res.data.result) != null ? _a : [];
|
|
20
20
|
multibasecode.forEach((p) => {
|
|
@@ -3,15 +3,15 @@ export declare const usefminputdropdownstore: StoreDefinition<"fminputdropdownst
|
|
|
3
3
|
state: {
|
|
4
4
|
optionsData: any;
|
|
5
5
|
};
|
|
6
|
-
getOptionsData: (apiService: string, apiAction: string, basecode: string, reload?: boolean, multibasecode?: Array<any
|
|
6
|
+
getOptionsData: (apiService: string, apiAction: string, basecode: string, reload?: boolean, multibasecode?: Array<any>, bizType?: number) => Promise<any>;
|
|
7
7
|
}, "state">, Pick<{
|
|
8
8
|
state: {
|
|
9
9
|
optionsData: any;
|
|
10
10
|
};
|
|
11
|
-
getOptionsData: (apiService: string, apiAction: string, basecode: string, reload?: boolean, multibasecode?: Array<any
|
|
11
|
+
getOptionsData: (apiService: string, apiAction: string, basecode: string, reload?: boolean, multibasecode?: Array<any>, bizType?: number) => Promise<any>;
|
|
12
12
|
}, never>, Pick<{
|
|
13
13
|
state: {
|
|
14
14
|
optionsData: any;
|
|
15
15
|
};
|
|
16
|
-
getOptionsData: (apiService: string, apiAction: string, basecode: string, reload?: boolean, multibasecode?: Array<any
|
|
16
|
+
getOptionsData: (apiService: string, apiAction: string, basecode: string, reload?: boolean, multibasecode?: Array<any>, bizType?: number) => Promise<any>;
|
|
17
17
|
}, "getOptionsData">>;
|
package/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! fmdeui-fmui v1.0.
|
|
1
|
+
/*! fmdeui-fmui v1.0.157 */
|
|
2
2
|
(function (global, factory) {
|
|
3
3
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('vxe-table'), require('@vxe-ui/plugin-render-element'), require('@vxe-ui/plugin-export-xlsx'), require('vxe-pc-ui'), require('exceljs'), require('@element-plus/icons-vue'), require('vue'), require('element-plus'), require('lodash-es'), require('js-cookie'), require('pinia'), require('vue-router'), require('@vueuse/core'), require('crypto-js'), require('xlsx-js-style'), require('vue-i18n'), require('sortablejs'), require('screenfull'), require('push.js'), require('mitt'), require('@microsoft/signalr'), require('axios')) :
|
|
4
4
|
typeof define === 'function' && define.amd ? define(['exports', 'vxe-table', '@vxe-ui/plugin-render-element', '@vxe-ui/plugin-export-xlsx', 'vxe-pc-ui', 'exceljs', '@element-plus/icons-vue', 'vue', 'element-plus', 'lodash-es', 'js-cookie', 'pinia', 'vue-router', '@vueuse/core', 'crypto-js', 'xlsx-js-style', 'vue-i18n', 'sortablejs', 'screenfull', 'push.js', 'mitt', '@microsoft/signalr', 'axios'], factory) :
|
|
@@ -4060,14 +4060,14 @@
|
|
|
4060
4060
|
const state = vue.reactive({
|
|
4061
4061
|
optionsData: {}
|
|
4062
4062
|
});
|
|
4063
|
-
const getOptionsData = async (apiService, apiAction, basecode, reload = false, multibasecode = []) => {
|
|
4063
|
+
const getOptionsData = async (apiService, apiAction, basecode, reload = false, multibasecode = [], bizType = 0) => {
|
|
4064
4064
|
var _a, _b;
|
|
4065
4065
|
if (!reload) {
|
|
4066
4066
|
if (state.optionsData[basecode] && state.optionsData[basecode].length > 0) {
|
|
4067
4067
|
return state.optionsData[basecode];
|
|
4068
4068
|
}
|
|
4069
4069
|
}
|
|
4070
|
-
const res = await useBaseApi(apiService, { loading: true }).get(null, apiAction + "/?codetype=" + basecode + "&mcodes=" + multibasecode.join(","));
|
|
4070
|
+
const res = await useBaseApi(apiService, { loading: true }).get(null, apiAction + "/?codetype=" + basecode + "&mcodes=" + multibasecode.join(",") + "&bizType=" + bizType);
|
|
4071
4071
|
if (multibasecode.length > 0) {
|
|
4072
4072
|
const mdata = (_a = res.data.result) != null ? _a : [];
|
|
4073
4073
|
multibasecode.forEach((p) => {
|
|
@@ -27264,6 +27264,13 @@
|
|
|
27264
27264
|
type: Array,
|
|
27265
27265
|
default: []
|
|
27266
27266
|
},
|
|
27267
|
+
/**
|
|
27268
|
+
* 业务类型
|
|
27269
|
+
*/
|
|
27270
|
+
bizType: {
|
|
27271
|
+
type: Number,
|
|
27272
|
+
default: 0
|
|
27273
|
+
},
|
|
27267
27274
|
freshSize: {
|
|
27268
27275
|
type: [Number, String],
|
|
27269
27276
|
default: 20
|
|
@@ -27307,13 +27314,13 @@
|
|
|
27307
27314
|
const handClick = async () => {
|
|
27308
27315
|
if (props.autoLoadData && props.basecode && props.basecode != "") {
|
|
27309
27316
|
const useBaseApi = usefminputdropdownstore();
|
|
27310
|
-
state.optionData = await useBaseApi.getOptionsData(props.apiService, props.apiAction, props.basecode, false, props.multibasecode);
|
|
27317
|
+
state.optionData = await useBaseApi.getOptionsData(props.apiService, props.apiAction, props.basecode, false, props.multibasecode, props.bizType);
|
|
27311
27318
|
}
|
|
27312
27319
|
};
|
|
27313
27320
|
const handRestdata = async () => {
|
|
27314
27321
|
if (props.basecode && props.basecode != "") {
|
|
27315
27322
|
const useBaseApi = usefminputdropdownstore();
|
|
27316
|
-
state.optionData = await useBaseApi.getOptionsData(props.apiService, props.apiAction, props.basecode, true, []);
|
|
27323
|
+
state.optionData = await useBaseApi.getOptionsData(props.apiService, props.apiAction, props.basecode, true, [], props.bizType);
|
|
27317
27324
|
}
|
|
27318
27325
|
};
|
|
27319
27326
|
return (_ctx, _cache) => {
|
|
@@ -27433,6 +27440,7 @@
|
|
|
27433
27440
|
const handleInput = (val) => {
|
|
27434
27441
|
if (val === "" || val === null || val === void 0) {
|
|
27435
27442
|
const validNum = props.defaultValue !== -1 ? props.defaultValue : 0;
|
|
27443
|
+
modelValue.value = validNum;
|
|
27436
27444
|
emit("handleInput", validNum);
|
|
27437
27445
|
return;
|
|
27438
27446
|
}
|
|
@@ -27444,23 +27452,47 @@
|
|
|
27444
27452
|
emit("handleInput", validNum);
|
|
27445
27453
|
return;
|
|
27446
27454
|
}
|
|
27447
|
-
|
|
27448
|
-
|
|
27449
|
-
|
|
27455
|
+
let cleaned = String(val).replace(/[^\d.]/g, "");
|
|
27456
|
+
const dotIndex = cleaned.indexOf(".");
|
|
27457
|
+
if (dotIndex !== -1) {
|
|
27458
|
+
const before = cleaned.substring(0, dotIndex + 1);
|
|
27459
|
+
const after = cleaned.substring(dotIndex + 1).replace(/\./g, "");
|
|
27460
|
+
cleaned = before + after;
|
|
27461
|
+
}
|
|
27462
|
+
if (cleaned.startsWith(".")) {
|
|
27463
|
+
cleaned = "0" + cleaned;
|
|
27450
27464
|
}
|
|
27451
|
-
|
|
27465
|
+
const parts = cleaned.split(".");
|
|
27466
|
+
parts[0] = parts[0].replace(/^0+/, "") || "0";
|
|
27467
|
+
cleaned = parts.join(".");
|
|
27468
|
+
if (cleaned.includes(".")) {
|
|
27469
|
+
const [intPart, decPart] = cleaned.split(".");
|
|
27470
|
+
cleaned = `${intPart}.${decPart.substring(0, props.decimalPlaces)}`;
|
|
27471
|
+
}
|
|
27472
|
+
modelValue.value = cleaned;
|
|
27473
|
+
emit("handleInput", cleaned);
|
|
27452
27474
|
};
|
|
27453
27475
|
vue.watch(() => modelValue.value, (newvalue, oldValue) => {
|
|
27454
|
-
if (
|
|
27455
|
-
|
|
27476
|
+
if (props.bType == "number") {
|
|
27477
|
+
if (newvalue === null || newvalue === void 0 || newvalue === "") {
|
|
27478
|
+
modelValue.value = props.defaultValue == -1 ? 0 : props.defaultValue;
|
|
27479
|
+
}
|
|
27480
|
+
} else {
|
|
27481
|
+
if (newvalue === null || newvalue === void 0 || newvalue === "") {
|
|
27482
|
+
const validNum = props.defaultValue == -1 ? 0 : props.defaultValue;
|
|
27483
|
+
modelValue.value = validNum;
|
|
27484
|
+
} else {
|
|
27485
|
+
emit("handleInput", newvalue);
|
|
27486
|
+
}
|
|
27456
27487
|
}
|
|
27457
27488
|
});
|
|
27458
27489
|
return (_ctx, _cache) => {
|
|
27490
|
+
const _component_el_input = vue.resolveComponent("el-input");
|
|
27459
27491
|
const _component_el_input_number = vue.resolveComponent("el-input-number");
|
|
27460
|
-
return vue.openBlock(), vue.createBlock(
|
|
27492
|
+
return __props.bType !== "money" ? (vue.openBlock(), vue.createBlock(_component_el_input, {
|
|
27493
|
+
key: 0,
|
|
27461
27494
|
modelValue: modelValue.value,
|
|
27462
27495
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => modelValue.value = $event),
|
|
27463
|
-
controls: false,
|
|
27464
27496
|
placeholder: __props.placeholder,
|
|
27465
27497
|
onInput: handleInput
|
|
27466
27498
|
}, vue.createSlots({
|
|
@@ -27495,7 +27527,45 @@
|
|
|
27495
27527
|
]),
|
|
27496
27528
|
key: "3"
|
|
27497
27529
|
} : void 0
|
|
27498
|
-
]), 1032, ["modelValue", "placeholder"])
|
|
27530
|
+
]), 1032, ["modelValue", "placeholder"])) : (vue.openBlock(), vue.createBlock(_component_el_input_number, {
|
|
27531
|
+
key: 1,
|
|
27532
|
+
modelValue: modelValue.value,
|
|
27533
|
+
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => modelValue.value = $event),
|
|
27534
|
+
controls: false,
|
|
27535
|
+
placeholder: __props.placeholder
|
|
27536
|
+
}, vue.createSlots({
|
|
27537
|
+
_: 2
|
|
27538
|
+
/* DYNAMIC */
|
|
27539
|
+
}, [
|
|
27540
|
+
_ctx.$slots.prepend ? {
|
|
27541
|
+
name: "prepend",
|
|
27542
|
+
fn: vue.withCtx(() => [
|
|
27543
|
+
vue.renderSlot(_ctx.$slots, "prepend")
|
|
27544
|
+
]),
|
|
27545
|
+
key: "0"
|
|
27546
|
+
} : void 0,
|
|
27547
|
+
_ctx.$slots.append ? {
|
|
27548
|
+
name: "append",
|
|
27549
|
+
fn: vue.withCtx(() => [
|
|
27550
|
+
vue.renderSlot(_ctx.$slots, "append")
|
|
27551
|
+
]),
|
|
27552
|
+
key: "1"
|
|
27553
|
+
} : void 0,
|
|
27554
|
+
_ctx.$slots.prefix ? {
|
|
27555
|
+
name: "prefix",
|
|
27556
|
+
fn: vue.withCtx(() => [
|
|
27557
|
+
vue.renderSlot(_ctx.$slots, "prefix")
|
|
27558
|
+
]),
|
|
27559
|
+
key: "2"
|
|
27560
|
+
} : void 0,
|
|
27561
|
+
_ctx.$slots.suffix ? {
|
|
27562
|
+
name: "suffix",
|
|
27563
|
+
fn: vue.withCtx(() => [
|
|
27564
|
+
vue.renderSlot(_ctx.$slots, "suffix")
|
|
27565
|
+
]),
|
|
27566
|
+
key: "3"
|
|
27567
|
+
} : void 0
|
|
27568
|
+
]), 1032, ["modelValue", "placeholder"]));
|
|
27499
27569
|
};
|
|
27500
27570
|
}
|
|
27501
27571
|
});
|