el-plus-crud 0.1.50 → 0.1.51
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,8 @@
|
|
|
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.51](https://github.com/KDJack/el-plus-crud/compare/v0.1.50...v0.1.51) (2024-07-05)
|
|
6
|
+
|
|
5
7
|
### [0.1.50](https://github.com/KDJack/el-plus-crud/compare/v0.1.49...v0.1.50) (2024-07-04)
|
|
6
8
|
|
|
7
9
|
### [0.1.49](https://github.com/KDJack/el-plus-crud/compare/v0.1.48...v0.1.49) (2024-06-27)
|
package/dist/el-plus-crud.mjs
CHANGED
|
@@ -1536,7 +1536,7 @@ const Cs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
1536
1536
|
}), oe(
|
|
1537
1537
|
() => a.modelValue,
|
|
1538
1538
|
(u) => {
|
|
1539
|
-
u && u
|
|
1539
|
+
u && `${u}`.length > n.value.maxlength && (u = `${u}`.substring(0, n.value.maxlength)), o.value = u;
|
|
1540
1540
|
},
|
|
1541
1541
|
{ immediate: !0 }
|
|
1542
1542
|
), oe(
|
|
@@ -21,7 +21,7 @@ import { ICRUDConfig } from '../../../../types'
|
|
|
21
21
|
const defaultConf = inject('defaultConf') as ICRUDConfig
|
|
22
22
|
|
|
23
23
|
const props = defineProps<{
|
|
24
|
-
modelValue?: string | null
|
|
24
|
+
modelValue?: string | number | null
|
|
25
25
|
field?: string
|
|
26
26
|
desc: { [key: string]: any }
|
|
27
27
|
formData?: { [key: string]: any }
|
|
@@ -44,10 +44,10 @@ onBeforeMount(async () => {
|
|
|
44
44
|
|
|
45
45
|
watch(
|
|
46
46
|
() => props.modelValue,
|
|
47
|
-
(data: string | null | undefined) => {
|
|
47
|
+
(data: string | number | null | undefined) => {
|
|
48
48
|
// 这里要截取一下字符串长度
|
|
49
|
-
if (data && data
|
|
50
|
-
data = data
|
|
49
|
+
if (data && `${data}`.length > attrs.value.maxlength) {
|
|
50
|
+
data = `${data}`.substring(0, attrs.value.maxlength)
|
|
51
51
|
}
|
|
52
52
|
currentValue.value = data
|
|
53
53
|
},
|
|
@@ -20,7 +20,7 @@ import { getAttrs, getEvents } from '../mixins'
|
|
|
20
20
|
import { ElMessage } from 'element-plus'
|
|
21
21
|
|
|
22
22
|
const props = defineProps<{
|
|
23
|
-
modelValue?: number | null
|
|
23
|
+
modelValue?: string | number | null
|
|
24
24
|
field: string
|
|
25
25
|
desc: { [key: string]: any }
|
|
26
26
|
disabled?: boolean
|