@tplc/business 0.3.96 → 0.3.98
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 +14 -0
- package/components/lcb-form/lcb-form.vue +28 -27
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,20 @@
|
|
|
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.3.98](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.3.97...v0.3.98) (2025-03-21)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### ✨ Features | 新功能
|
|
9
|
+
|
|
10
|
+
* form 校验 ([51cce50](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/51cce50ece8f98479fecf9e30c26d755e6188c82))
|
|
11
|
+
|
|
12
|
+
### [0.3.97](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.3.96...v0.3.97) (2025-03-21)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### ✨ Features | 新功能
|
|
16
|
+
|
|
17
|
+
* 新增tag ([74b9c29](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/74b9c2971b69986c6c0428406eeca0a57d66eef4))
|
|
18
|
+
|
|
5
19
|
### [0.3.96](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.3.95...v0.3.96) (2025-03-21)
|
|
6
20
|
|
|
7
21
|
|
|
@@ -10,11 +10,7 @@
|
|
|
10
10
|
:label="field.fieldCustomName"
|
|
11
11
|
:required="field.requiredFlag"
|
|
12
12
|
:prop="field.field"
|
|
13
|
-
:rules="
|
|
14
|
-
field.requiredFlag
|
|
15
|
-
? [{ required: true, message: t('请输入') + field.fieldCustomName }]
|
|
16
|
-
: []
|
|
17
|
-
"
|
|
13
|
+
:rules="field.requiredFlag ? [{ required: true, message: t('内容不能为空') }] : []"
|
|
18
14
|
v-bind="field.props"
|
|
19
15
|
/>
|
|
20
16
|
<wd-textarea
|
|
@@ -24,11 +20,7 @@
|
|
|
24
20
|
:label="field.fieldCustomName"
|
|
25
21
|
:required="field.requiredFlag"
|
|
26
22
|
:prop="field.field"
|
|
27
|
-
:rules="
|
|
28
|
-
field.requiredFlag
|
|
29
|
-
? [{ required: true, message: t('请输入') + field.fieldCustomName }]
|
|
30
|
-
: []
|
|
31
|
-
"
|
|
23
|
+
:rules="field.requiredFlag ? [{ required: true, message: t('内容不能为空') }] : []"
|
|
32
24
|
v-bind="field.props"
|
|
33
25
|
/>
|
|
34
26
|
<wd-picker
|
|
@@ -38,11 +30,7 @@
|
|
|
38
30
|
v-model="form[field.field]"
|
|
39
31
|
:required="field.requiredFlag"
|
|
40
32
|
:prop="field.field"
|
|
41
|
-
:rules="
|
|
42
|
-
field.requiredFlag
|
|
43
|
-
? [{ required: true, message: t('请选择') + field.fieldCustomName }]
|
|
44
|
-
: []
|
|
45
|
-
"
|
|
33
|
+
:rules="field.requiredFlag ? [{ required: true, message: t('内容不能为空') }] : []"
|
|
46
34
|
v-bind="field.props"
|
|
47
35
|
/>
|
|
48
36
|
<wd-datetime-picker
|
|
@@ -52,11 +40,7 @@
|
|
|
52
40
|
:required="field.requiredFlag"
|
|
53
41
|
:prop="field.field"
|
|
54
42
|
:type="getDateType(field.frontInputTypeValue)"
|
|
55
|
-
:rules="
|
|
56
|
-
field.requiredFlag
|
|
57
|
-
? [{ required: true, message: t('请选择') + field.fieldCustomName }]
|
|
58
|
-
: []
|
|
59
|
-
"
|
|
43
|
+
:rules="field.requiredFlag ? [{ required: true, message: t('内容不能为空') }] : []"
|
|
60
44
|
v-bind="{
|
|
61
45
|
...field.props,
|
|
62
46
|
...getDateOptions(field.frontInputContent),
|
|
@@ -69,7 +53,16 @@
|
|
|
69
53
|
:required="field.requiredFlag"
|
|
70
54
|
:prop="field.field"
|
|
71
55
|
title-width="230rpx"
|
|
72
|
-
:rules="
|
|
56
|
+
:rules="
|
|
57
|
+
field.requiredFlag
|
|
58
|
+
? [
|
|
59
|
+
{
|
|
60
|
+
required: true,
|
|
61
|
+
message: t('内容不能为空'),
|
|
62
|
+
},
|
|
63
|
+
]
|
|
64
|
+
: []
|
|
65
|
+
"
|
|
73
66
|
>
|
|
74
67
|
<wd-radio-group
|
|
75
68
|
v-if="field.frontInputType === 'radio'"
|
|
@@ -236,12 +229,7 @@ const submit = () => {
|
|
|
236
229
|
if (!valid) return
|
|
237
230
|
if (props.submitUrl) {
|
|
238
231
|
const values = fields.value?.reduce((acc, cur) => {
|
|
239
|
-
|
|
240
|
-
const imgInfo = imgList.value[cur.field]?.[0]
|
|
241
|
-
acc[cur.field] = imgInfo?.response || imgInfo?.url
|
|
242
|
-
} else {
|
|
243
|
-
acc[cur.field] = form.value[cur.field]
|
|
244
|
-
}
|
|
232
|
+
acc[cur.field] = form.value[cur.field]
|
|
245
233
|
return acc
|
|
246
234
|
}, {})
|
|
247
235
|
await uni.$lcb.http.post(props.submitUrl, {
|
|
@@ -266,12 +254,23 @@ const getDateOptions = (frontInputContent: string) => {
|
|
|
266
254
|
defaultValue: data.defaultDate,
|
|
267
255
|
}
|
|
268
256
|
}
|
|
257
|
+
watch(
|
|
258
|
+
imgList,
|
|
259
|
+
(newVal) => {
|
|
260
|
+
Object.keys(newVal).forEach((key) => {
|
|
261
|
+
form.value[key] = newVal[key][0]?.url || newVal[key][0]?.response
|
|
262
|
+
})
|
|
263
|
+
},
|
|
264
|
+
{ deep: true },
|
|
265
|
+
)
|
|
269
266
|
</script>
|
|
270
267
|
|
|
271
268
|
<style lang="scss">
|
|
272
269
|
.lcb-form {
|
|
273
270
|
:deep(.wd-radio) {
|
|
274
271
|
line-height: inherit !important;
|
|
272
|
+
padding: 0px;
|
|
273
|
+
margin: 0px;
|
|
275
274
|
}
|
|
276
275
|
:deep(.wd-radio-group) {
|
|
277
276
|
text-align: left !important;
|
|
@@ -281,6 +280,8 @@ const getDateOptions = (frontInputContent: string) => {
|
|
|
281
280
|
}
|
|
282
281
|
:deep(.wd-checkbox) {
|
|
283
282
|
line-height: inherit !important;
|
|
283
|
+
padding: 0px;
|
|
284
|
+
margin: 0px;
|
|
284
285
|
}
|
|
285
286
|
:deep(.wd-checkbox-group) {
|
|
286
287
|
text-align: left !important;
|