@tplc/business 0.7.56 → 0.7.57

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/CHANGELOG.md CHANGED
@@ -2,6 +2,24 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ### [0.7.57](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/compare/v0.7.55...v0.7.57) (2026-01-09)
6
+
7
+
8
+ ### ✨ Features | 新功能
9
+
10
+ * **lcb-tabs:** add defaultIndex prop to tabs components and update useSyncForm to accept visibleScope ([d46356f](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/d46356f58a2c8b8f035a036d53e39fee0de9e69d))
11
+ * **lcb-wrapper-list:** enhance data handling by adding dynamicScope support and improving form synchronization ([48a562c](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/48a562c69d1037073b1bff62b4491959c0ac5ea0))
12
+
13
+
14
+ ### 🚀 Chore | 构建/工程依赖/工具
15
+
16
+ * **release:** 0.7.56 ([1b2216c](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/1b2216c1e81bdf60b85b9c179f614bb37c0588e5))
17
+
18
+
19
+ ### 🐛 Bug Fixes | Bug 修复
20
+
21
+ * **lcb-tabs:** update currentTab initialization to use item name based on defaultIndex ([aad2d22](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/aad2d22403c8c3ee8987fcdeb153f4637c9594a0))
22
+
5
23
  ### [0.7.56](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/compare/v0.7.54...v0.7.56) (2026-01-08)
6
24
 
7
25
 
package/action.d.ts CHANGED
@@ -23,8 +23,8 @@ export interface DataSource {
23
23
  requestInfo?: {
24
24
  requestUrl: string
25
25
  requestParams: string
26
- dynamicScope?: string
27
26
  }
27
+ dynamicScope?: string
28
28
  /** 动态key */
29
29
  dependKey?: string
30
30
  }
@@ -15,8 +15,9 @@
15
15
  :inactiveColor="tagTitleInactiveColor"
16
16
  :color="tagTitleActiveColor"
17
17
  v-model="currentTab"
18
+ animated
18
19
  >
19
- <wd-tab v-for="tab in items" :key="tab.name" :title="tab.title" :name="tab.name" />
20
+ <wd-tab v-for="tab in items" :key="tab.name" :title="tab.title" :name="tab.name" animated />
20
21
  </wd-tabs>
21
22
  </lcb-block>
22
23
  </template>
@@ -42,7 +43,7 @@ const props = withDefaults(defineProps<LcbTabsProps>(), {
42
43
  slidableNum: 6,
43
44
  defaultIndex: 0,
44
45
  })
45
- const currentTab = ref(props.defaultIndex)
46
+ const currentTab = ref(props.items?.[props.defaultIndex]?.name)
46
47
  const { syncForm } = useSyncForm({
47
48
  dynamicScope: props.dynamicScope,
48
49
  visibleScope: props.visibleScope,
@@ -53,17 +53,16 @@ const props = withDefaults(defineProps<LcbWrapperListProps>(), {
53
53
  display: 'flex',
54
54
  flexDirection: 'column',
55
55
  pagingEnabled: false,
56
- pageLimit: 10,
57
56
  pagingUsePageScroll: true,
58
57
  })
59
58
  const { userStore, innerDynamicData } = useDynamicData()
60
- const { form } = useSyncForm({ dynamicScope: props.dataSource?.requestInfo?.dynamicScope })
59
+ const { form } = useSyncForm({ dynamicScope: props.dataSource?.dynamicScope })
61
60
  // 使用 shallowRef 优化大数组的响应式性能
62
61
  const renderList = shallowRef<unknown[]>([])
63
62
  const paging = ref()
64
63
  useZPaging(paging)
65
64
  const pageSearch = shallowRef<{ limit: number; page: number }>({
66
- limit: props.pageLimit,
65
+ limit: props.pageProps?.pageLimit || 10,
67
66
  page: 1,
68
67
  })
69
68
 
@@ -106,35 +105,24 @@ watch(
106
105
  userStore?.userInfo,
107
106
  props.pageProps?.pagingEnabled,
108
107
  props.pageProps?.pageLimit,
108
+ form.value,
109
109
  ] as const,
110
110
 
111
- async ([dataSource, dynamicData, userInfo, pagingEnabled, pageLimit = 10]) => {
111
+ async ([dataSource, dynamicData, userInfo, pagingEnabled]) => {
112
112
  if (pagingEnabled) {
113
113
  getPageData()
114
114
  return
115
115
  }
116
116
  // 防止重复请求
117
117
  let data: unknown[] = []
118
- const result = await dynamicRequest(dataSource, dynamicData, userInfo)
118
+ const result = await dynamicRequest(dataSource, dynamicData, userInfo, form.value)
119
119
  if (result) {
120
120
  data = result
121
121
  }
122
122
  // 使用 shallowRef 时需要重新赋值整个数组
123
123
  renderList.value = Array.isArray(data) ? transformStringArrayToObjectArray(data) : []
124
124
  },
125
- { immediate: true },
126
- )
127
-
128
- watch(
129
- () => form.value,
130
- () => {
131
- if (props.pageProps?.pagingEnabled) {
132
- getPageData()
133
- }
134
- },
135
- {
136
- deep: true,
137
- },
125
+ { immediate: true, deep: true },
138
126
  )
139
127
 
140
128
  // 优化:缓存 key 获取逻辑,减少属性访问
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tplc/business",
3
- "version": "0.7.56",
3
+ "version": "0.7.57",
4
4
  "keywords": [
5
5
  "业务组件"
6
6
  ],
@@ -10,7 +10,6 @@ declare const __VLS_component: import('vue').DefineComponent<
10
10
  display: string
11
11
  flexDirection: string
12
12
  pagingEnabled: boolean
13
- pageLimit: number
14
13
  pagingUsePageScroll: boolean
15
14
  }
16
15
  >,
@@ -31,7 +30,6 @@ declare const __VLS_component: import('vue').DefineComponent<
31
30
  display: string
32
31
  flexDirection: string
33
32
  pagingEnabled: boolean
34
- pageLimit: number
35
33
  pagingUsePageScroll: boolean
36
34
  }
37
35
  >