@longhongguo/form-create-ant-design-vue 3.2.91 → 3.2.92

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,6 +1,6 @@
1
1
  {
2
2
  "name": "@longhongguo/form-create-ant-design-vue",
3
- "version": "3.2.91",
3
+ "version": "3.2.92",
4
4
  "description": "AntDesignVue版本低代码表单|FormCreate 是一个可以通过 JSON 生成具有动态渲染、数据收集、验证和提交功能的低代码表单生成组件。支持6个UI框架,适配移动端,并且支持生成任何 Vue 组件。内置20种常用表单组件和自定义组件,再复杂的表单都可以轻松搞定。",
5
5
  "main": "./dist/form-create.min.js",
6
6
  "module": "./dist/form-create.esm.js",
@@ -133,22 +133,32 @@ export default {
133
133
  }
134
134
 
135
135
  // 无论 props.pagination 是否已存在,只要满足条件就添加/检查 beforeFetch 钩子
136
+ // 使用标记防止重复初始化,避免重复请求
137
+ const paginationInitialized = rule._accTablePaginationInitialized === true
138
+
136
139
  console.log('[accTable] 检查分页钩子添加条件:', {
137
140
  hasFetch: !!rule.effect?.fetch,
138
141
  hasPaginationConfig: !!paginationConfig,
139
142
  paginationConfigType: typeof paginationConfig,
140
143
  paginationConfigValue: paginationConfig,
141
144
  paginationCurrent: paginationConfig?.current,
142
- paginationCurrentDefined: paginationConfig?.current !== undefined
145
+ paginationCurrentDefined: paginationConfig?.current !== undefined,
146
+ paginationInitialized
143
147
  })
144
148
 
145
149
  if (
150
+ !paginationInitialized && // 只初始化一次
146
151
  rule.effect?.fetch &&
147
152
  paginationConfig &&
148
153
  typeof paginationConfig === 'object' &&
149
154
  paginationConfig.current !== undefined
150
155
  ) {
151
- console.log('[accTable] ✅ 满足条件,进入分页请求参数处理逻辑')
156
+ console.log(
157
+ '[accTable] ✅ 满足条件,进入分页请求参数处理逻辑(首次初始化)'
158
+ )
159
+
160
+ // 标记已初始化,防止重复执行
161
+ rule._accTablePaginationInitialized = true
152
162
 
153
163
  console.log('[accTable] 进入分页请求参数处理逻辑')
154
164
  // 获取分页参数配置