@fecp/designer 5.5.34 → 5.5.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/es/designer/package.json.mjs +1 -1
- package/es/designer/src/packages/dialog/useDialogDialog.mjs +1 -1
- package/es/designer/src/packages/dialogGlobal/useDialogGlobalDialog.mjs +1 -1
- package/es/designer/src/packages/form/property/widgets.vue.mjs +5 -8
- package/es/designer.css +18 -17
- package/es/packages/vue/src/components/forms/formItem/FormItem.vue.mjs +1 -1
- package/es/packages/vue/src/components/forms/number/Number.vue.mjs +57 -38
- package/lib/designer/package.json.js +1 -1
- package/lib/designer/src/packages/dialog/useDialogDialog.js +1 -1
- package/lib/designer/src/packages/dialogGlobal/useDialogGlobalDialog.js +1 -1
- package/lib/designer/src/packages/form/property/widgets.vue.js +5 -8
- package/lib/designer.css +18 -17
- package/lib/packages/vue/src/components/forms/formItem/FormItem.vue.js +1 -1
- package/lib/packages/vue/src/components/forms/number/Number.vue.js +57 -38
- package/package.json +1 -1
|
@@ -52,8 +52,8 @@ import _export_sfc from "../../../../../_virtual/_plugin-vue_export-helper.mjs";
|
|
|
52
52
|
import "../../../components/TemplateSelector.vue.mjs";
|
|
53
53
|
import "../../table/default.mjs";
|
|
54
54
|
/* empty css */
|
|
55
|
-
/* empty css
|
|
56
|
-
/* empty css
|
|
55
|
+
/* empty css */
|
|
56
|
+
/* empty css */
|
|
57
57
|
import "../../../store/index.mjs";
|
|
58
58
|
/* empty css */
|
|
59
59
|
import { ElCollapse, ElCollapseItem } from "../../../../../node_modules/element-plus/es/components/collapse/index.mjs";
|
|
@@ -786,10 +786,7 @@ const _sfc_main = {
|
|
|
786
786
|
]),
|
|
787
787
|
_: 1
|
|
788
788
|
}),
|
|
789
|
-
|
|
790
|
-
key: 0,
|
|
791
|
-
label: "数值范围"
|
|
792
|
-
}, {
|
|
789
|
+
createVNode(_component_el_form_item, { label: "数值范围" }, {
|
|
793
790
|
default: withCtx(() => [
|
|
794
791
|
createElementVNode("div", _hoisted_12, [
|
|
795
792
|
createVNode(_component_el_input_number, {
|
|
@@ -814,7 +811,7 @@ const _sfc_main = {
|
|
|
814
811
|
])
|
|
815
812
|
]),
|
|
816
813
|
_: 1
|
|
817
|
-
})
|
|
814
|
+
})
|
|
818
815
|
], 64)) : createCommentVNode("", true),
|
|
819
816
|
unref(currentItem).fieldType === "text" || unref(currentItem).fieldType === "number" ? (openBlock(), createElementBlock(Fragment, { key: 5 }, [
|
|
820
817
|
createVNode(_component_el_form_item, { label: "前置内容" }, {
|
|
@@ -1182,7 +1179,7 @@ const _sfc_main = {
|
|
|
1182
1179
|
};
|
|
1183
1180
|
}
|
|
1184
1181
|
};
|
|
1185
|
-
const widgets = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
1182
|
+
const widgets = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-b6039888"]]);
|
|
1186
1183
|
export {
|
|
1187
1184
|
widgets as default
|
|
1188
1185
|
};
|
package/es/designer.css
CHANGED
|
@@ -3249,17 +3249,17 @@ to {
|
|
|
3249
3249
|
width: 100%;
|
|
3250
3250
|
}
|
|
3251
3251
|
|
|
3252
|
-
.collapse-header[data-v-
|
|
3252
|
+
.collapse-header[data-v-b6039888] {
|
|
3253
3253
|
display: flex;
|
|
3254
3254
|
align-items: center;
|
|
3255
3255
|
justify-content: space-between;
|
|
3256
3256
|
width: 100%;
|
|
3257
3257
|
padding-right: 20px;
|
|
3258
3258
|
}
|
|
3259
|
-
.setting[data-v-
|
|
3259
|
+
.setting[data-v-b6039888] .el-collapse-item__content {
|
|
3260
3260
|
position: relative;
|
|
3261
3261
|
}
|
|
3262
|
-
.field-type-select[data-v-
|
|
3262
|
+
.field-type-select[data-v-b6039888] {
|
|
3263
3263
|
position: absolute;
|
|
3264
3264
|
top: 11px;
|
|
3265
3265
|
right: 16px;
|
|
@@ -3270,41 +3270,41 @@ to {
|
|
|
3270
3270
|
transition: all 0.3s;
|
|
3271
3271
|
border-radius: 4px;
|
|
3272
3272
|
}
|
|
3273
|
-
.field-type-select[data-v-
|
|
3273
|
+
.field-type-select[data-v-b6039888] .el-select__wrapper {
|
|
3274
3274
|
background: transparent;
|
|
3275
3275
|
box-shadow: none;
|
|
3276
3276
|
}
|
|
3277
|
-
.field-type-select[data-v-
|
|
3277
|
+
.field-type-select[data-v-b6039888] .el-select__selected-item {
|
|
3278
3278
|
text-align: center;
|
|
3279
3279
|
}
|
|
3280
|
-
.width-input[data-v-
|
|
3280
|
+
.width-input[data-v-b6039888] {
|
|
3281
3281
|
width: 100%;
|
|
3282
3282
|
}
|
|
3283
|
-
.data-source-fields[data-v-
|
|
3283
|
+
.data-source-fields[data-v-b6039888] {
|
|
3284
3284
|
display: flex;
|
|
3285
3285
|
flex-direction: column;
|
|
3286
3286
|
gap: 8px;
|
|
3287
3287
|
margin-bottom: 18px;
|
|
3288
3288
|
}
|
|
3289
|
-
.data-source-fields .field-item[data-v-
|
|
3289
|
+
.data-source-fields .field-item[data-v-b6039888] {
|
|
3290
3290
|
display: flex;
|
|
3291
3291
|
align-items: center;
|
|
3292
3292
|
gap: 8px;
|
|
3293
3293
|
}
|
|
3294
|
-
.data-source-fields .field-item .field-label[data-v-
|
|
3294
|
+
.data-source-fields .field-item .field-label[data-v-b6039888] {
|
|
3295
3295
|
width: 80px;
|
|
3296
3296
|
font-size: 13px;
|
|
3297
3297
|
color: #606266;
|
|
3298
3298
|
text-align: right;
|
|
3299
3299
|
flex-shrink: 0;
|
|
3300
3300
|
}
|
|
3301
|
-
.data-source-fields .field-item .field-label[data-v-
|
|
3301
|
+
.data-source-fields .field-item .field-label[data-v-b6039888]::after {
|
|
3302
3302
|
content: ":";
|
|
3303
3303
|
}
|
|
3304
|
-
.data-source-fields .field-item .el-input[data-v-
|
|
3304
|
+
.data-source-fields .field-item .el-input[data-v-b6039888] {
|
|
3305
3305
|
flex: 1;
|
|
3306
3306
|
}
|
|
3307
|
-
[data-v-
|
|
3307
|
+
[data-v-b6039888] .el-form-item__content {
|
|
3308
3308
|
flex-wrap: wrap !important;
|
|
3309
3309
|
}
|
|
3310
3310
|
.buttons-table[data-v-b5400259] {
|
|
@@ -5840,21 +5840,22 @@ body,
|
|
|
5840
5840
|
outline: none;
|
|
5841
5841
|
box-shadow: 0 1px 0 0 #c0c4cc inset, 0 -1px 0 0 #c0c4cc inset, -1px 0 0 0 #c0c4cc inset;
|
|
5842
5842
|
}
|
|
5843
|
-
.info-icon[data-v-
|
|
5843
|
+
.info-icon[data-v-2860c795] {
|
|
5844
5844
|
margin-left: 4px;
|
|
5845
5845
|
color: #f5b041;
|
|
5846
5846
|
cursor: help;
|
|
5847
|
-
font-size: 14px;
|
|
5847
|
+
font-size: 14px;
|
|
5848
|
+
pointer-events: all;
|
|
5848
5849
|
}
|
|
5849
|
-
.credit-icon[data-v-
|
|
5850
|
+
.credit-icon[data-v-2860c795] {
|
|
5850
5851
|
color: #2e8bff;
|
|
5851
5852
|
margin-right: 2px;
|
|
5852
5853
|
}
|
|
5853
|
-
.regulation-icon[data-v-
|
|
5854
|
+
.regulation-icon[data-v-2860c795] {
|
|
5854
5855
|
color: #f56c6c;
|
|
5855
5856
|
margin-right: 2px;
|
|
5856
5857
|
}
|
|
5857
|
-
[data-v-
|
|
5858
|
+
[data-v-2860c795] .el-form-item__label {
|
|
5858
5859
|
padding: 0 8px 0 0;
|
|
5859
5860
|
}
|
|
5860
5861
|
.el-page-header.is-contentful .el-page-header__main{border-top:1px solid var(--el-border-color-light);margin-top:16px}.el-page-header__header{justify-content:space-between;align-items:center;line-height:24px;display:flex}.el-page-header__left{align-items:center;margin-right:40px;display:flex;position:relative}.el-page-header__back{cursor:pointer;align-items:center;display:flex}.el-page-header__left .el-divider--vertical{margin:0 16px}.el-page-header__icon{align-items:center;margin-right:10px;font-size:16px;display:flex}.el-page-header__icon .el-icon{font-size:inherit}.el-page-header__title{font-size:14px;font-weight:500}.el-page-header__content{color:var(--el-text-color-primary);font-size:18px}.el-page-header__breadcrumb{margin-bottom:16px}.fec-header[data-v-a55fc4ab] {
|
|
@@ -205,7 +205,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
205
205
|
};
|
|
206
206
|
}
|
|
207
207
|
});
|
|
208
|
-
const _FormItem = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
208
|
+
const _FormItem = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-2860c795"]]);
|
|
209
209
|
export {
|
|
210
210
|
_FormItem as default
|
|
211
211
|
};
|
|
@@ -81,6 +81,12 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
81
81
|
});
|
|
82
82
|
const parser = (value) => {
|
|
83
83
|
let result = moneyCheck(value);
|
|
84
|
+
if (precision.value > 0 && result.includes(".")) {
|
|
85
|
+
const [intPart, decPart] = result.split(".");
|
|
86
|
+
if (decPart && decPart.length > precision.value) {
|
|
87
|
+
result = intPart + "." + decPart.slice(0, precision.value);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
84
90
|
return result;
|
|
85
91
|
};
|
|
86
92
|
const compValue = computed({
|
|
@@ -126,7 +132,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
126
132
|
true
|
|
127
133
|
);
|
|
128
134
|
} else {
|
|
129
|
-
textValue.value = displayValue;
|
|
135
|
+
textValue.value = Number(displayValue.toFixed(precision.value));
|
|
130
136
|
}
|
|
131
137
|
if (!showThousandsSeparator.value) {
|
|
132
138
|
textValue.value = delcommafy(textValue.value);
|
|
@@ -134,44 +140,25 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
134
140
|
};
|
|
135
141
|
watch(
|
|
136
142
|
() => props.modelValue,
|
|
137
|
-
() => {
|
|
143
|
+
(value) => {
|
|
138
144
|
initTextValue();
|
|
139
145
|
},
|
|
140
146
|
{ immediate: true }
|
|
141
147
|
);
|
|
148
|
+
const handleInput = (value) => {
|
|
149
|
+
if (precision.value > 0) {
|
|
150
|
+
const dotIndex = value.indexOf(".");
|
|
151
|
+
if (dotIndex !== -1) {
|
|
152
|
+
const afterDot = value.slice(dotIndex + 1);
|
|
153
|
+
if (afterDot.length > precision.value) {
|
|
154
|
+
textValue.value = value.slice(0, dotIndex + 1 + precision.value);
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
};
|
|
142
159
|
const handleBlur = (event) => {
|
|
143
160
|
let value = event.target.value;
|
|
144
|
-
|
|
145
|
-
compValue.value = value;
|
|
146
|
-
return;
|
|
147
|
-
}
|
|
148
|
-
let cleanValue = delcommafy(value.toString());
|
|
149
|
-
let numValue = Number(cleanValue);
|
|
150
|
-
if (isNaN(numValue)) return;
|
|
151
|
-
numValue = Number(numValue.toFixed(precision.value));
|
|
152
|
-
switch (props.format) {
|
|
153
|
-
case "wan":
|
|
154
|
-
numValue = numMulti(numValue, 1e4);
|
|
155
|
-
break;
|
|
156
|
-
case "million":
|
|
157
|
-
numValue = numMulti(numValue, 1e6);
|
|
158
|
-
break;
|
|
159
|
-
case "percentage":
|
|
160
|
-
numValue = numDiv(numValue, 100);
|
|
161
|
-
break;
|
|
162
|
-
case "permillage":
|
|
163
|
-
numValue = numDiv(numValue, 1e3);
|
|
164
|
-
break;
|
|
165
|
-
case "permillion":
|
|
166
|
-
numValue = numDiv(numValue, 1e4);
|
|
167
|
-
break;
|
|
168
|
-
}
|
|
169
|
-
if (props.format !== "percentage" && props.format !== "permillage" && props.format !== "permillion") {
|
|
170
|
-
const effectiveMax = props.maxValue != null ? props.maxValue : 999999999999999;
|
|
171
|
-
const effectiveMin = props.minValue != null ? props.minValue : -999999999999999;
|
|
172
|
-
numValue = Math.max(effectiveMin, Math.min(effectiveMax, numValue));
|
|
173
|
-
}
|
|
174
|
-
compValue.value = numValue;
|
|
161
|
+
handlerValue(value);
|
|
175
162
|
switch (props.format) {
|
|
176
163
|
case "wan":
|
|
177
164
|
textValue.value = numDiv(numValue, 1e4);
|
|
@@ -200,11 +187,42 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
200
187
|
textValue.value = delcommafy(textValue.value);
|
|
201
188
|
}
|
|
202
189
|
};
|
|
203
|
-
function
|
|
204
|
-
if (
|
|
205
|
-
|
|
190
|
+
function handlerValue(value) {
|
|
191
|
+
if (!value && value !== 0) {
|
|
192
|
+
compValue.value = value;
|
|
193
|
+
return;
|
|
194
|
+
}
|
|
195
|
+
let cleanValue = delcommafy(value.toString());
|
|
196
|
+
let numValue2 = Number(cleanValue);
|
|
197
|
+
if (isNaN(numValue2)) return;
|
|
198
|
+
numValue2 = Number(numValue2.toFixed(precision.value));
|
|
199
|
+
switch (props.format) {
|
|
200
|
+
case "wan":
|
|
201
|
+
numValue2 = numMulti(numValue2, 1e4);
|
|
202
|
+
break;
|
|
203
|
+
case "million":
|
|
204
|
+
numValue2 = numMulti(numValue2, 1e6);
|
|
205
|
+
break;
|
|
206
|
+
case "percentage":
|
|
207
|
+
numValue2 = numDiv(numValue2, 100);
|
|
208
|
+
break;
|
|
209
|
+
case "permillage":
|
|
210
|
+
numValue2 = numDiv(numValue2, 1e3);
|
|
211
|
+
break;
|
|
212
|
+
case "permillion":
|
|
213
|
+
numValue2 = numDiv(numValue2, 1e4);
|
|
214
|
+
break;
|
|
215
|
+
}
|
|
216
|
+
const effectiveMax = props.maxValue != null ? props.maxValue : 999999999999999;
|
|
217
|
+
const effectiveMin = props.minValue != null ? props.minValue : -999999999999999;
|
|
218
|
+
numValue2 = Math.max(effectiveMin, Math.min(effectiveMax, numValue2));
|
|
219
|
+
compValue.value = numValue2;
|
|
220
|
+
}
|
|
221
|
+
function formatNumberWithComma(numValue2) {
|
|
222
|
+
if (isNaN(numValue2) || numValue2 === null || numValue2 === void 0) {
|
|
223
|
+
return numValue2;
|
|
206
224
|
}
|
|
207
|
-
let numStr =
|
|
225
|
+
let numStr = numValue2.toString();
|
|
208
226
|
const endsWithDot = numStr.endsWith(".");
|
|
209
227
|
const [integerPart, decimalPart] = numStr.split(".");
|
|
210
228
|
const formattedInteger = integerPart.replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
|
@@ -313,7 +331,8 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
313
331
|
readonly: __props.readonly,
|
|
314
332
|
formatter,
|
|
315
333
|
parser,
|
|
316
|
-
onBlur: handleBlur
|
|
334
|
+
onBlur: handleBlur,
|
|
335
|
+
onInput: handleInput
|
|
317
336
|
}, toHandlers(__props.config.eventHandlers), {
|
|
318
337
|
onChange: handleChange,
|
|
319
338
|
style: { "width": "100%" }
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const index = require("./index.
|
|
3
|
+
const index = require("./index.vue2.js");
|
|
4
4
|
const vue = require("vue");
|
|
5
5
|
function useDialogDialog() {
|
|
6
6
|
const dialogDialogVisible = vue.ref(false);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const index = require("./index.
|
|
3
|
+
const index = require("./index.vue2.js");
|
|
4
4
|
const vue = require("vue");
|
|
5
5
|
function useDialogGlobalDialog() {
|
|
6
6
|
const dialogGlobalDialogVisible = vue.ref(false);
|
|
@@ -54,8 +54,8 @@ const _pluginVue_exportHelper = require("../../../../../_virtual/_plugin-vue_exp
|
|
|
54
54
|
require("../../../components/TemplateSelector.vue.js");
|
|
55
55
|
require("../../table/default.js");
|
|
56
56
|
;/* empty css */
|
|
57
|
-
;/* empty css
|
|
58
|
-
;/* empty css
|
|
57
|
+
;/* empty css */
|
|
58
|
+
;/* empty css */
|
|
59
59
|
require("../../../store/index.js");
|
|
60
60
|
;/* empty css */
|
|
61
61
|
const index$2 = require("../../../../../node_modules/element-plus/es/components/collapse/index.js");
|
|
@@ -788,10 +788,7 @@ const _sfc_main = {
|
|
|
788
788
|
]),
|
|
789
789
|
_: 1
|
|
790
790
|
}),
|
|
791
|
-
vue.
|
|
792
|
-
key: 0,
|
|
793
|
-
label: "数值范围"
|
|
794
|
-
}, {
|
|
791
|
+
vue.createVNode(_component_el_form_item, { label: "数值范围" }, {
|
|
795
792
|
default: vue.withCtx(() => [
|
|
796
793
|
vue.createElementVNode("div", _hoisted_12, [
|
|
797
794
|
vue.createVNode(_component_el_input_number, {
|
|
@@ -816,7 +813,7 @@ const _sfc_main = {
|
|
|
816
813
|
])
|
|
817
814
|
]),
|
|
818
815
|
_: 1
|
|
819
|
-
})
|
|
816
|
+
})
|
|
820
817
|
], 64)) : vue.createCommentVNode("", true),
|
|
821
818
|
vue.unref(currentItem).fieldType === "text" || vue.unref(currentItem).fieldType === "number" ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 5 }, [
|
|
822
819
|
vue.createVNode(_component_el_form_item, { label: "前置内容" }, {
|
|
@@ -1184,5 +1181,5 @@ const _sfc_main = {
|
|
|
1184
1181
|
};
|
|
1185
1182
|
}
|
|
1186
1183
|
};
|
|
1187
|
-
const widgets = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-
|
|
1184
|
+
const widgets = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-b6039888"]]);
|
|
1188
1185
|
exports.default = widgets;
|
package/lib/designer.css
CHANGED
|
@@ -3249,17 +3249,17 @@ to {
|
|
|
3249
3249
|
width: 100%;
|
|
3250
3250
|
}
|
|
3251
3251
|
|
|
3252
|
-
.collapse-header[data-v-
|
|
3252
|
+
.collapse-header[data-v-b6039888] {
|
|
3253
3253
|
display: flex;
|
|
3254
3254
|
align-items: center;
|
|
3255
3255
|
justify-content: space-between;
|
|
3256
3256
|
width: 100%;
|
|
3257
3257
|
padding-right: 20px;
|
|
3258
3258
|
}
|
|
3259
|
-
.setting[data-v-
|
|
3259
|
+
.setting[data-v-b6039888] .el-collapse-item__content {
|
|
3260
3260
|
position: relative;
|
|
3261
3261
|
}
|
|
3262
|
-
.field-type-select[data-v-
|
|
3262
|
+
.field-type-select[data-v-b6039888] {
|
|
3263
3263
|
position: absolute;
|
|
3264
3264
|
top: 11px;
|
|
3265
3265
|
right: 16px;
|
|
@@ -3270,41 +3270,41 @@ to {
|
|
|
3270
3270
|
transition: all 0.3s;
|
|
3271
3271
|
border-radius: 4px;
|
|
3272
3272
|
}
|
|
3273
|
-
.field-type-select[data-v-
|
|
3273
|
+
.field-type-select[data-v-b6039888] .el-select__wrapper {
|
|
3274
3274
|
background: transparent;
|
|
3275
3275
|
box-shadow: none;
|
|
3276
3276
|
}
|
|
3277
|
-
.field-type-select[data-v-
|
|
3277
|
+
.field-type-select[data-v-b6039888] .el-select__selected-item {
|
|
3278
3278
|
text-align: center;
|
|
3279
3279
|
}
|
|
3280
|
-
.width-input[data-v-
|
|
3280
|
+
.width-input[data-v-b6039888] {
|
|
3281
3281
|
width: 100%;
|
|
3282
3282
|
}
|
|
3283
|
-
.data-source-fields[data-v-
|
|
3283
|
+
.data-source-fields[data-v-b6039888] {
|
|
3284
3284
|
display: flex;
|
|
3285
3285
|
flex-direction: column;
|
|
3286
3286
|
gap: 8px;
|
|
3287
3287
|
margin-bottom: 18px;
|
|
3288
3288
|
}
|
|
3289
|
-
.data-source-fields .field-item[data-v-
|
|
3289
|
+
.data-source-fields .field-item[data-v-b6039888] {
|
|
3290
3290
|
display: flex;
|
|
3291
3291
|
align-items: center;
|
|
3292
3292
|
gap: 8px;
|
|
3293
3293
|
}
|
|
3294
|
-
.data-source-fields .field-item .field-label[data-v-
|
|
3294
|
+
.data-source-fields .field-item .field-label[data-v-b6039888] {
|
|
3295
3295
|
width: 80px;
|
|
3296
3296
|
font-size: 13px;
|
|
3297
3297
|
color: #606266;
|
|
3298
3298
|
text-align: right;
|
|
3299
3299
|
flex-shrink: 0;
|
|
3300
3300
|
}
|
|
3301
|
-
.data-source-fields .field-item .field-label[data-v-
|
|
3301
|
+
.data-source-fields .field-item .field-label[data-v-b6039888]::after {
|
|
3302
3302
|
content: ":";
|
|
3303
3303
|
}
|
|
3304
|
-
.data-source-fields .field-item .el-input[data-v-
|
|
3304
|
+
.data-source-fields .field-item .el-input[data-v-b6039888] {
|
|
3305
3305
|
flex: 1;
|
|
3306
3306
|
}
|
|
3307
|
-
[data-v-
|
|
3307
|
+
[data-v-b6039888] .el-form-item__content {
|
|
3308
3308
|
flex-wrap: wrap !important;
|
|
3309
3309
|
}
|
|
3310
3310
|
.buttons-table[data-v-b5400259] {
|
|
@@ -5840,21 +5840,22 @@ body,
|
|
|
5840
5840
|
outline: none;
|
|
5841
5841
|
box-shadow: 0 1px 0 0 #c0c4cc inset, 0 -1px 0 0 #c0c4cc inset, -1px 0 0 0 #c0c4cc inset;
|
|
5842
5842
|
}
|
|
5843
|
-
.info-icon[data-v-
|
|
5843
|
+
.info-icon[data-v-2860c795] {
|
|
5844
5844
|
margin-left: 4px;
|
|
5845
5845
|
color: #f5b041;
|
|
5846
5846
|
cursor: help;
|
|
5847
|
-
font-size: 14px;
|
|
5847
|
+
font-size: 14px;
|
|
5848
|
+
pointer-events: all;
|
|
5848
5849
|
}
|
|
5849
|
-
.credit-icon[data-v-
|
|
5850
|
+
.credit-icon[data-v-2860c795] {
|
|
5850
5851
|
color: #2e8bff;
|
|
5851
5852
|
margin-right: 2px;
|
|
5852
5853
|
}
|
|
5853
|
-
.regulation-icon[data-v-
|
|
5854
|
+
.regulation-icon[data-v-2860c795] {
|
|
5854
5855
|
color: #f56c6c;
|
|
5855
5856
|
margin-right: 2px;
|
|
5856
5857
|
}
|
|
5857
|
-
[data-v-
|
|
5858
|
+
[data-v-2860c795] .el-form-item__label {
|
|
5858
5859
|
padding: 0 8px 0 0;
|
|
5859
5860
|
}
|
|
5860
5861
|
.el-page-header.is-contentful .el-page-header__main{border-top:1px solid var(--el-border-color-light);margin-top:16px}.el-page-header__header{justify-content:space-between;align-items:center;line-height:24px;display:flex}.el-page-header__left{align-items:center;margin-right:40px;display:flex;position:relative}.el-page-header__back{cursor:pointer;align-items:center;display:flex}.el-page-header__left .el-divider--vertical{margin:0 16px}.el-page-header__icon{align-items:center;margin-right:10px;font-size:16px;display:flex}.el-page-header__icon .el-icon{font-size:inherit}.el-page-header__title{font-size:14px;font-weight:500}.el-page-header__content{color:var(--el-text-color-primary);font-size:18px}.el-page-header__breadcrumb{margin-bottom:16px}.fec-header[data-v-a55fc4ab] {
|
|
@@ -207,5 +207,5 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
207
207
|
};
|
|
208
208
|
}
|
|
209
209
|
});
|
|
210
|
-
const _FormItem = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-
|
|
210
|
+
const _FormItem = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-2860c795"]]);
|
|
211
211
|
exports.default = _FormItem;
|
|
@@ -83,6 +83,12 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
83
83
|
});
|
|
84
84
|
const parser = (value) => {
|
|
85
85
|
let result = moneyCheck(value);
|
|
86
|
+
if (precision.value > 0 && result.includes(".")) {
|
|
87
|
+
const [intPart, decPart] = result.split(".");
|
|
88
|
+
if (decPart && decPart.length > precision.value) {
|
|
89
|
+
result = intPart + "." + decPart.slice(0, precision.value);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
86
92
|
return result;
|
|
87
93
|
};
|
|
88
94
|
const compValue = vue.computed({
|
|
@@ -128,7 +134,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
128
134
|
true
|
|
129
135
|
);
|
|
130
136
|
} else {
|
|
131
|
-
textValue.value = displayValue;
|
|
137
|
+
textValue.value = Number(displayValue.toFixed(precision.value));
|
|
132
138
|
}
|
|
133
139
|
if (!showThousandsSeparator.value) {
|
|
134
140
|
textValue.value = delcommafy(textValue.value);
|
|
@@ -136,44 +142,25 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
136
142
|
};
|
|
137
143
|
vue.watch(
|
|
138
144
|
() => props.modelValue,
|
|
139
|
-
() => {
|
|
145
|
+
(value) => {
|
|
140
146
|
initTextValue();
|
|
141
147
|
},
|
|
142
148
|
{ immediate: true }
|
|
143
149
|
);
|
|
150
|
+
const handleInput = (value) => {
|
|
151
|
+
if (precision.value > 0) {
|
|
152
|
+
const dotIndex = value.indexOf(".");
|
|
153
|
+
if (dotIndex !== -1) {
|
|
154
|
+
const afterDot = value.slice(dotIndex + 1);
|
|
155
|
+
if (afterDot.length > precision.value) {
|
|
156
|
+
textValue.value = value.slice(0, dotIndex + 1 + precision.value);
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
};
|
|
144
161
|
const handleBlur = (event) => {
|
|
145
162
|
let value = event.target.value;
|
|
146
|
-
|
|
147
|
-
compValue.value = value;
|
|
148
|
-
return;
|
|
149
|
-
}
|
|
150
|
-
let cleanValue = delcommafy(value.toString());
|
|
151
|
-
let numValue = Number(cleanValue);
|
|
152
|
-
if (isNaN(numValue)) return;
|
|
153
|
-
numValue = Number(numValue.toFixed(precision.value));
|
|
154
|
-
switch (props.format) {
|
|
155
|
-
case "wan":
|
|
156
|
-
numValue = numMulti(numValue, 1e4);
|
|
157
|
-
break;
|
|
158
|
-
case "million":
|
|
159
|
-
numValue = numMulti(numValue, 1e6);
|
|
160
|
-
break;
|
|
161
|
-
case "percentage":
|
|
162
|
-
numValue = numDiv(numValue, 100);
|
|
163
|
-
break;
|
|
164
|
-
case "permillage":
|
|
165
|
-
numValue = numDiv(numValue, 1e3);
|
|
166
|
-
break;
|
|
167
|
-
case "permillion":
|
|
168
|
-
numValue = numDiv(numValue, 1e4);
|
|
169
|
-
break;
|
|
170
|
-
}
|
|
171
|
-
if (props.format !== "percentage" && props.format !== "permillage" && props.format !== "permillion") {
|
|
172
|
-
const effectiveMax = props.maxValue != null ? props.maxValue : 999999999999999;
|
|
173
|
-
const effectiveMin = props.minValue != null ? props.minValue : -999999999999999;
|
|
174
|
-
numValue = Math.max(effectiveMin, Math.min(effectiveMax, numValue));
|
|
175
|
-
}
|
|
176
|
-
compValue.value = numValue;
|
|
163
|
+
handlerValue(value);
|
|
177
164
|
switch (props.format) {
|
|
178
165
|
case "wan":
|
|
179
166
|
textValue.value = numDiv(numValue, 1e4);
|
|
@@ -202,11 +189,42 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
202
189
|
textValue.value = delcommafy(textValue.value);
|
|
203
190
|
}
|
|
204
191
|
};
|
|
205
|
-
function
|
|
206
|
-
if (
|
|
207
|
-
|
|
192
|
+
function handlerValue(value) {
|
|
193
|
+
if (!value && value !== 0) {
|
|
194
|
+
compValue.value = value;
|
|
195
|
+
return;
|
|
196
|
+
}
|
|
197
|
+
let cleanValue = delcommafy(value.toString());
|
|
198
|
+
let numValue2 = Number(cleanValue);
|
|
199
|
+
if (isNaN(numValue2)) return;
|
|
200
|
+
numValue2 = Number(numValue2.toFixed(precision.value));
|
|
201
|
+
switch (props.format) {
|
|
202
|
+
case "wan":
|
|
203
|
+
numValue2 = numMulti(numValue2, 1e4);
|
|
204
|
+
break;
|
|
205
|
+
case "million":
|
|
206
|
+
numValue2 = numMulti(numValue2, 1e6);
|
|
207
|
+
break;
|
|
208
|
+
case "percentage":
|
|
209
|
+
numValue2 = numDiv(numValue2, 100);
|
|
210
|
+
break;
|
|
211
|
+
case "permillage":
|
|
212
|
+
numValue2 = numDiv(numValue2, 1e3);
|
|
213
|
+
break;
|
|
214
|
+
case "permillion":
|
|
215
|
+
numValue2 = numDiv(numValue2, 1e4);
|
|
216
|
+
break;
|
|
217
|
+
}
|
|
218
|
+
const effectiveMax = props.maxValue != null ? props.maxValue : 999999999999999;
|
|
219
|
+
const effectiveMin = props.minValue != null ? props.minValue : -999999999999999;
|
|
220
|
+
numValue2 = Math.max(effectiveMin, Math.min(effectiveMax, numValue2));
|
|
221
|
+
compValue.value = numValue2;
|
|
222
|
+
}
|
|
223
|
+
function formatNumberWithComma(numValue2) {
|
|
224
|
+
if (isNaN(numValue2) || numValue2 === null || numValue2 === void 0) {
|
|
225
|
+
return numValue2;
|
|
208
226
|
}
|
|
209
|
-
let numStr =
|
|
227
|
+
let numStr = numValue2.toString();
|
|
210
228
|
const endsWithDot = numStr.endsWith(".");
|
|
211
229
|
const [integerPart, decimalPart] = numStr.split(".");
|
|
212
230
|
const formattedInteger = integerPart.replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
|
@@ -315,7 +333,8 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
315
333
|
readonly: __props.readonly,
|
|
316
334
|
formatter,
|
|
317
335
|
parser,
|
|
318
|
-
onBlur: handleBlur
|
|
336
|
+
onBlur: handleBlur,
|
|
337
|
+
onInput: handleInput
|
|
319
338
|
}, vue.toHandlers(__props.config.eventHandlers), {
|
|
320
339
|
onChange: handleChange,
|
|
321
340
|
style: { "width": "100%" }
|