af-mobile-client-vue3 1.4.31 → 1.4.32
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/package.json
CHANGED
|
@@ -66,6 +66,8 @@ const props = withDefaults(defineProps<{
|
|
|
66
66
|
isAsyncUpload?: boolean
|
|
67
67
|
// 可选:自定义水印内容数组(将拼接在组件默认行之后)
|
|
68
68
|
watermarkCustomLines?: string[]
|
|
69
|
+
// 表单文本位置 center、left、right、top
|
|
70
|
+
labelAlign?: string
|
|
69
71
|
}>(), {
|
|
70
72
|
configName: undefined,
|
|
71
73
|
groupTitle: undefined,
|
|
@@ -81,6 +83,7 @@ const props = withDefaults(defineProps<{
|
|
|
81
83
|
formReadonly: false,
|
|
82
84
|
isAsyncUpload: false,
|
|
83
85
|
watermarkCustomLines: () => [],
|
|
86
|
+
labelAlign: undefined,
|
|
84
87
|
})
|
|
85
88
|
|
|
86
89
|
const emits = defineEmits(['onSubmit', 'xFormItemEmitFunc'])
|
|
@@ -659,6 +662,7 @@ defineExpose({ init, form, formGroupName, validate, asyncSubmit, setForm, getFor
|
|
|
659
662
|
:is-async-upload="props.isAsyncUpload"
|
|
660
663
|
@set-form="setForm"
|
|
661
664
|
@x-form-item-emit-func="emitFunc"
|
|
665
|
+
:labelAlign="labelAlign"
|
|
662
666
|
/>
|
|
663
667
|
<slot name="extraFormItem" />
|
|
664
668
|
</VanCellGroup>
|
|
@@ -100,7 +100,10 @@ const props = defineProps({
|
|
|
100
100
|
type: Boolean,
|
|
101
101
|
default: false,
|
|
102
102
|
},
|
|
103
|
-
|
|
103
|
+
labelAlign: {
|
|
104
|
+
type: String,
|
|
105
|
+
default: undefined,
|
|
106
|
+
},
|
|
104
107
|
})
|
|
105
108
|
|
|
106
109
|
const emits = defineEmits(['setForm', 'xFormItemEmitFunc', 'scanCodeOrNfc'])
|
|
@@ -575,8 +578,9 @@ const labelData = computed(() => {
|
|
|
575
578
|
})
|
|
576
579
|
// 是否展示表单左侧label文字
|
|
577
580
|
const labelAlign = computed(() => {
|
|
578
|
-
return
|
|
581
|
+
return props.labelAlign || attr.labelAlign || 'left'
|
|
579
582
|
})
|
|
583
|
+
|
|
580
584
|
// 是否只读
|
|
581
585
|
const readonly = computed(() => {
|
|
582
586
|
return props.formReadonly || attr.addOrEdit === 'readonly' || mode === '预览' || customizeReadOnly.value
|
|
@@ -3,8 +3,8 @@ import XForm from '@af-mobile-client-vue3/components/data/XForm/index.vue'
|
|
|
3
3
|
import NormalDataLayout from '@af-mobile-client-vue3/components/layout/NormalDataLayout/index.vue'
|
|
4
4
|
import { ref } from 'vue'
|
|
5
5
|
|
|
6
|
-
const configName = ref('
|
|
7
|
-
const serviceName = ref('af-
|
|
6
|
+
const configName = ref('HiddenDangersPhotoForm')
|
|
7
|
+
const serviceName = ref('af-wechat')
|
|
8
8
|
|
|
9
9
|
const formGroupAddConstruction = ref(null)
|
|
10
10
|
const formData = ref({
|
|
@@ -28,8 +28,10 @@ function onSubmit(data: any) {
|
|
|
28
28
|
ref="formGroupAddConstruction"
|
|
29
29
|
mode="修改"
|
|
30
30
|
:config-name="configName"
|
|
31
|
+
:service-name="serviceName"
|
|
31
32
|
:form-data="formData"
|
|
32
33
|
@on-submit="onSubmit"
|
|
34
|
+
labelAlign="top"
|
|
33
35
|
/>
|
|
34
36
|
</template>
|
|
35
37
|
</NormalDataLayout>
|