af-mobile-client-vue3 1.1.27 → 1.1.28

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.1.27",
4
+ "version": "1.1.28",
5
5
  "description": "Vue + Vite component lib",
6
6
  "license": "MIT",
7
7
  "engines": {
@@ -147,7 +147,7 @@ function initComponent() {
147
147
  getConfigByName(configName, (result) => {
148
148
  groupFormItems.value = result
149
149
  title.value = result?.title
150
- // isInitQuery.value = result.createdQuery || false
150
+ const isQuery = result.createdQuery
151
151
  for (let i = 0; i < result.columnJson.length; i++) {
152
152
  const item = result.columnJson[i]
153
153
  item.span = item.flexSpan
@@ -202,12 +202,12 @@ function initComponent() {
202
202
  splitArrayAt(allActions.value, 3)
203
203
 
204
204
  // 初始化条件参数(从表单默认值中获取)
205
- initConditionParams(result.formJson)
205
+ initConditionParams(result.formJson, isQuery)
206
206
  }, serviceName)
207
207
  }
208
208
 
209
209
  // 初始化条件参数
210
- function initConditionParams(formItems) {
210
+ function initConditionParams(formItems, isQuery) {
211
211
  if (!formItems || !Array.isArray(formItems) || formItems.length === 0)
212
212
  return
213
213
 
@@ -233,9 +233,9 @@ function initConditionParams(formItems) {
233
233
  })
234
234
 
235
235
  // 如果有默认值,则设置到条件参数中并立即执行查询
236
- if (hasDefaults) {
237
- queryDefaultParams.value = defaultParams
238
-
236
+ queryDefaultParams.value = defaultParams
237
+ isInitQuery.value = isQuery
238
+ if (hasDefaults && isInitQuery.value) {
239
239
  // 延迟执行第一次查询,确保组件完全加载
240
240
  setTimeout(() => {
241
241
  onRefresh()