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
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "af-mobile-client-vue3",
3
3
  "type": "module",
4
- "version": "1.4.31",
4
+ "version": "1.4.32",
5
5
  "packageManager": "pnpm@10.13.1",
6
6
  "description": "Vue + Vite component lib",
7
7
  "engines": {
@@ -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 attr.labelAlign ? attr.labelAlign : 'left'
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('ceshiForm')
7
- const serviceName = ref('af-system')
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>
@@ -31,7 +31,7 @@ const list = ref([
31
31
  },
32
32
  {
33
33
  name: 'XForm 表单',
34
- to: '/Component/XFormView/1/debug?configName=hiddenTroubleFollowForm&serviceName=af-linepatrol&mode=新增',
34
+ to: '/Component/XFormView',
35
35
  },
36
36
  {
37
37
  name: 'XFormGroup 表单组',