el-plus-crud 0.1.45 → 0.1.47
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/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
### [0.1.47](https://github.com/KDJack/el-plus-crud/compare/v0.1.46...v0.1.47) (2024-06-21)
|
|
6
|
+
|
|
7
|
+
### [0.1.46](https://github.com/KDJack/el-plus-crud/compare/v0.1.45...v0.1.46) (2024-06-21)
|
|
8
|
+
|
|
5
9
|
### [0.1.45](https://github.com/KDJack/el-plus-crud/compare/v0.1.44...v0.1.45) (2024-06-06)
|
|
6
10
|
|
|
7
11
|
### [0.1.44](https://github.com/KDJack/el-plus-crud/compare/v0.1.43...v0.1.44) (2024-05-24)
|
package/dist/el-plus-crud.mjs
CHANGED
|
@@ -2301,20 +2301,19 @@ const Aa = /* @__PURE__ */ Ie(uu, [["__scopeId", "data-v-78e3c52a"]]), ru = /* @
|
|
|
2301
2301
|
function T(L, Y) {
|
|
2302
2302
|
var N, _;
|
|
2303
2303
|
u.value = !0, L !== Y && (L < d.value.min ? (Ge.warning(`${((N = l.desc) == null ? void 0 : N.label) || ""}最少不能低于${d.value.min}`), we(() => {
|
|
2304
|
-
i.value = d.value.min, o.value = +(i.value / 100).toFixed(
|
|
2304
|
+
i.value = d.value.min, o.value = +(i.value / 100).toFixed(4), D && D();
|
|
2305
2305
|
})) : L > d.value.max ? (Ge.warning(`${((_ = l.desc) == null ? void 0 : _.label) || ""}最多不能大于${d.value.max}`), we(() => {
|
|
2306
|
-
i.value = d.value.max, o.value = +(i.value / 100).toFixed(
|
|
2307
|
-
})) : (o.value = +(L / 100).toFixed(
|
|
2306
|
+
i.value = d.value.max, o.value = +(i.value / 100).toFixed(4), D && D();
|
|
2307
|
+
})) : (o.value = +(L / 100).toFixed(4), D && D()));
|
|
2308
2308
|
}
|
|
2309
2309
|
return (L, Y) => {
|
|
2310
2310
|
const N = C("el-input");
|
|
2311
2311
|
return g(), O(N, R({ style: { display: "flex" } }, c.value, pe(a.value), {
|
|
2312
2312
|
modelValue: i.value,
|
|
2313
2313
|
"onUpdate:modelValue": Y[0] || (Y[0] = (_) => i.value = _),
|
|
2314
|
-
modelModifiers: { number: !0 },
|
|
2315
2314
|
onFocus: s,
|
|
2316
2315
|
onBlur: M,
|
|
2317
|
-
onkeypress: "return( /[
|
|
2316
|
+
onkeypress: "return event.target.value === '' || event.target.value === undefined || event.target.value?.indexOf('.') >= 0 ? /[-\\d]/.test(String.fromCharCode(event.keyCode)): /[-\\d\\.]/.test(String.fromCharCode(event.keyCode))"
|
|
2318
2317
|
}), Je({
|
|
2319
2318
|
append: x(() => [
|
|
2320
2319
|
ye("%")
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<el-input style="display: flex" v-bind="attrs" v-on="onEvents" v-model
|
|
2
|
+
<el-input style="display: flex" v-bind="attrs" v-on="onEvents" v-model="currentText" @focus="handelFocus" @blur="handelBlur" onkeypress="return event.target.value === '' || event.target.value === undefined || event.target.value?.indexOf('.') >= 0 ? /[-\d]/.test(String.fromCharCode(event.keyCode)): /[-\d\.]/.test(String.fromCharCode(event.keyCode))">
|
|
3
3
|
<template v-for="(item, key, index) of slots" #[key] :key="index">
|
|
4
4
|
<slot :name="key" />
|
|
5
5
|
</template>
|
|
@@ -128,18 +128,18 @@ function handelValChange(val: any, oldVal: any) {
|
|
|
128
128
|
ElMessage.warning(`${props.desc?.label || ''}最少不能低于${numBindAttr.value.min}`)
|
|
129
129
|
nextTick(() => {
|
|
130
130
|
currentText.value = numBindAttr.value.min
|
|
131
|
-
currentValue.value = +(currentText.value / 100).toFixed(
|
|
131
|
+
currentValue.value = +(currentText.value / 100).toFixed(4)
|
|
132
132
|
change && change()
|
|
133
133
|
})
|
|
134
134
|
} else if (val > numBindAttr.value.max) {
|
|
135
135
|
ElMessage.warning(`${props.desc?.label || ''}最多不能大于${numBindAttr.value.max}`)
|
|
136
136
|
nextTick(() => {
|
|
137
137
|
currentText.value = numBindAttr.value.max
|
|
138
|
-
currentValue.value = +(currentText.value / 100).toFixed(
|
|
138
|
+
currentValue.value = +(currentText.value / 100).toFixed(4)
|
|
139
139
|
change && change()
|
|
140
140
|
})
|
|
141
141
|
} else {
|
|
142
|
-
currentValue.value = +(val / 100).toFixed(
|
|
142
|
+
currentValue.value = +(val / 100).toFixed(4)
|
|
143
143
|
change && change()
|
|
144
144
|
}
|
|
145
145
|
}
|