af-mobile-client-vue3 1.2.26 → 1.2.27

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.2.26",
4
+ "version": "1.2.27",
5
5
  "packageManager": "pnpm@10.12.3",
6
6
  "description": "Vue + Vite component lib",
7
7
  "engines": {
@@ -38,6 +38,7 @@ interface GroupFormItems {
38
38
  groupName?: string
39
39
  tableName?: string
40
40
  paramLogicName?: string
41
+ isGroupForm?: boolean
41
42
  }
42
43
 
43
44
  interface InitParams {
@@ -56,6 +57,7 @@ const props = withDefaults(defineProps<{
56
57
  submitButton?: boolean
57
58
  isHandleFormKey?: boolean
58
59
  paramLogicNameParam?: any
60
+ isGroupForm?: boolean
59
61
  }>(), {
60
62
  configName: undefined,
61
63
  groupFormItems: null,
@@ -66,6 +68,7 @@ const props = withDefaults(defineProps<{
66
68
  submitButton: true,
67
69
  isHandleFormKey: true,
68
70
  paramLogicNameParam: {},
71
+ isGroupForm: false,
69
72
  })
70
73
 
71
74
  const emits = defineEmits(['onSubmit', 'xFormItemEmitFunc'])
@@ -569,7 +572,7 @@ defineExpose({ init, form, formGroupName, validate, asyncSubmit, setForm, getFor
569
572
  </script>
570
573
 
571
574
  <template>
572
- <VanForm v-if="loaded" ref="xFormRef" class="x-form-container" @submit="onSubmit">
575
+ <VanForm v-if="loaded" ref="xFormRef" class="x-form-container" :class="{ 'use-full-height': !props.isGroupForm }" @submit="onSubmit">
573
576
  <div class="form-fields-scrollable">
574
577
  <VanCellGroup inset>
575
578
  <XFormItem
@@ -608,8 +611,11 @@ defineExpose({ init, form, formGroupName, validate, asyncSubmit, setForm, getFor
608
611
  </template>
609
612
 
610
613
  <style scoped>
611
- .x-form-container {
614
+ .use-full-height {
612
615
  height: calc(100vh - var(--van-nav-bar-height) - 20px);
616
+ }
617
+
618
+ .x-form-container {
613
619
  display: flex;
614
620
  flex-direction: column;
615
621
  max-height: 100vh;
@@ -105,6 +105,7 @@ defineExpose({ init })
105
105
  <!-- :ref="`xFormListRef-${index}`" -->
106
106
  <XForm
107
107
  ref="xFormListRef"
108
+ :is-group-form="true"
108
109
  :mode="props.mode"
109
110
  :group-form-items="item"
110
111
  :form-data="item.groupName ? formData[item.groupName] : formData"
@@ -6,8 +6,8 @@ import { ref } from 'vue'
6
6
  import { useRoute } from 'vue-router'
7
7
 
8
8
  // 纯表单
9
- const configName = ref('AddConstructionForm')
10
- const serviceName = ref('af-linepatrol')
9
+ const configName = ref('ApplyAddContractFormGroup')
10
+ const serviceName = ref('af-apply')
11
11
 
12
12
  const formData = ref({})
13
13
  const formGroup = ref(null)
@@ -31,7 +31,7 @@ function submit(data) {
31
31
  :config-name="configName"
32
32
  :service-name="serviceName"
33
33
  :param-logic-name-param="{ aa: 123 }"
34
- :form-data="{f_project_name: 333}"
34
+ :form-data="{ f_project_name: 333 }"
35
35
  @x-form-item-emit-func="emitFunc"
36
36
  @on-submit="submit"
37
37
  />