@tplc/business 0.5.55 → 0.5.56
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,14 @@
|
|
|
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.5.56](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/compare/v0.5.55...v0.5.56) (2025-11-28)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### ✨ Features | 新功能
|
|
9
|
+
|
|
10
|
+
* 新增节流 ([671b7fe](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/671b7fe766d17fe904beb5a457ef263f1006b0ae))
|
|
11
|
+
* 样式调整 ([9db0e26](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/9db0e26b22faaa3678f501d06baa03245e5aa744))
|
|
12
|
+
|
|
5
13
|
### [0.5.55](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/compare/v0.5.52...v0.5.55) (2025-11-24)
|
|
6
14
|
|
|
7
15
|
|
|
@@ -28,6 +28,7 @@
|
|
|
28
28
|
<wd-img
|
|
29
29
|
:height="transformValueUnit(imgHeight)"
|
|
30
30
|
mode="heightFix"
|
|
31
|
+
:key="imgKey"
|
|
31
32
|
:src="current === index ? item.activeUrl : item.inactiveUrl"
|
|
32
33
|
/>
|
|
33
34
|
<view v-if="showTitle" class="truncate px-2">{{ item.title }}</view>
|
|
@@ -37,10 +38,11 @@
|
|
|
37
38
|
</template>
|
|
38
39
|
|
|
39
40
|
<script setup lang="ts">
|
|
40
|
-
import { ref } from 'vue'
|
|
41
|
+
import { ref, watch } from 'vue'
|
|
41
42
|
import useSyncForm from '../../../../hooks/useSyncForm'
|
|
42
43
|
import { transformValueUnit } from '../../../../utils/transform'
|
|
43
44
|
import { LcbTabsProps } from '../../types'
|
|
45
|
+
import { throttle } from '@tplc/wot/components/common/util'
|
|
44
46
|
const props = withDefaults(defineProps<LcbTabsProps>(), {
|
|
45
47
|
imgTitleGap: 24,
|
|
46
48
|
activeColor: 'var(--wot-color-theme)',
|
|
@@ -48,6 +50,10 @@ const props = withDefaults(defineProps<LcbTabsProps>(), {
|
|
|
48
50
|
})
|
|
49
51
|
const { syncForm } = useSyncForm(props.dynamicScope)
|
|
50
52
|
const current = ref(0)
|
|
53
|
+
const imgKey = ref(0)
|
|
54
|
+
const debounceFn = throttle(() => {
|
|
55
|
+
imgKey.value++
|
|
56
|
+
}, 300)
|
|
51
57
|
defineOptions({
|
|
52
58
|
name: 'LcbTagsItem',
|
|
53
59
|
options: {
|
|
@@ -56,6 +62,12 @@ defineOptions({
|
|
|
56
62
|
styleIsolation: 'shared',
|
|
57
63
|
},
|
|
58
64
|
})
|
|
65
|
+
watch(
|
|
66
|
+
() => props.imgHeight,
|
|
67
|
+
() => {
|
|
68
|
+
debounceFn()
|
|
69
|
+
},
|
|
70
|
+
)
|
|
59
71
|
const handleTagClick = (name: string, index: number) => {
|
|
60
72
|
current.value = index
|
|
61
73
|
try {
|
package/package.json
CHANGED
package/types/utils/utils.d.ts
CHANGED
|
@@ -2,19 +2,12 @@ import { UploadMethod } from '@tplc/wot/types/components/wd-upload/types'
|
|
|
2
2
|
export declare function formatJson(str: string | object | undefined, defVal?: {}): {}
|
|
3
3
|
/** 获取上个页面Exposed */
|
|
4
4
|
export declare const getExposed: () => any
|
|
5
|
-
export declare const getCurrentPage: () =>
|
|
6
|
-
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
}
|
|
12
|
-
| {
|
|
13
|
-
pageId: string
|
|
14
|
-
fullPath: string
|
|
15
|
-
options: any
|
|
16
|
-
route: string
|
|
17
|
-
}
|
|
5
|
+
export declare const getCurrentPage: () => {
|
|
6
|
+
pageId: string | number
|
|
7
|
+
fullPath: string
|
|
8
|
+
options: any
|
|
9
|
+
route: string
|
|
10
|
+
}
|
|
18
11
|
export declare const getPreviousPageId: () => string | number
|
|
19
12
|
/** 合并url参数 url = /pages/data/index?id=1&name=2 urlParams = id=1&name=2&type=1 */
|
|
20
13
|
export declare const getFinalUrl: (url: string, urlParams?: string) => string
|
package/utils/utils.ts
CHANGED
|
@@ -43,7 +43,7 @@ export const getCurrentPage = () => {
|
|
|
43
43
|
|
|
44
44
|
const fullPath = decodeURIComponent(page.$page?.fullPath?.split('?')[1] || '')
|
|
45
45
|
return {
|
|
46
|
-
pageId: isH5 ? page.$page.id : page.
|
|
46
|
+
pageId: isH5 ? page.$page.id : page.getPageId?.(),
|
|
47
47
|
fullPath: page.$page?.fullPath,
|
|
48
48
|
options: parse(fullPath) as any,
|
|
49
49
|
route: page.route,
|