af-mobile-client-vue3 1.2.23 → 1.2.24

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.23",
4
+ "version": "1.2.24",
5
5
  "packageManager": "pnpm@10.12.3",
6
6
  "description": "Vue + Vite component lib",
7
7
  "engines": {
@@ -171,7 +171,7 @@ async function loadFormConfig(): Promise<void> {
171
171
  getConfigByName(props.configName!, (result) => {
172
172
  if (result) {
173
173
  // 如果有 paramLogicName,自动请求并赋值
174
- if (result.paramLogicName && !props.formData) {
174
+ if (result.paramLogicName && (!props.formData || (props.formData && Object.keys(props.formData).length === 0))) {
175
175
  let logicParam = props.paramLogicNameParam
176
176
  if (typeof logicParam === 'string') {
177
177
  try {
@@ -220,11 +220,9 @@ async function initWithGroupFormItems() {
220
220
 
221
221
  // 设置表单配置
222
222
  function setupFormConfig(config: GroupFormItems) {
223
- console.log('>>>> config: ', JSON.stringify(config))
224
223
  formConfig.value = config
225
224
  myServiceName.value = props.serviceName || ''
226
225
  formGroupName.value = config.groupName || 'default'
227
- console.log('>>>> props.formData: ', props.formData)
228
226
  form.value = props.formData || {}
229
227
 
230
228
  // 清理并重新设置验证规则
@@ -724,7 +724,7 @@ function onTreeSelectFinish(value) {
724
724
  }
725
725
 
726
726
  function emitFunc(func, data) {
727
- emits('xFormItemEmitFunc', func, data, data?.model ? this.form[data.model] : this.form)
727
+ emits('xFormItemEmitFunc', func, data, data?.model ? form[data.model] : form)
728
728
  }
729
729
  </script>
730
730
 
@@ -31,6 +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
35
  @x-form-item-emit-func="emitFunc"
35
36
  @on-submit="submit"
36
37
  />