@tplc/business 0.5.17 → 0.5.18

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,13 @@
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.18](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/compare/v0.5.17...v0.5.18) (2025-10-14)
6
+
7
+
8
+ ### ✨ Features | 新功能
9
+
10
+ * mode normal 改为最大大小 ([5f59b53](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/5f59b532c7dfef47d7a6c64f1e221d6a71e10e75))
11
+
5
12
  ### [0.5.17](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/compare/v0.5.16...v0.5.17) (2025-10-13)
6
13
 
7
14
 
@@ -12,7 +12,7 @@
12
12
  <view
13
13
  v-for="(item, index) in items"
14
14
  :key="index"
15
- class="lcb-tag"
15
+ class="lcb-tag text-center"
16
16
  :class="{
17
17
  'lcb-tag-active': current === index,
18
18
  'inline-block': tagsMode === 'scroll',
@@ -21,6 +21,8 @@
21
21
  fontSize: transformValueUnit(itemFontSize),
22
22
  backgroundColor: current === index ? tagActiveColor : tagInactiveColor,
23
23
  color: current === index ? tagTitleActiveColor : tagTitleInactiveColor,
24
+ borderRadius: transformValueUnit(tagRadius),
25
+ minWidth: transformValueUnit(tagMinWidth),
24
26
  }"
25
27
  @click="handleTagClick(item.name, index)"
26
28
  >
@@ -40,7 +42,9 @@ const props = withDefaults(defineProps<LcbTabsProps>(), {
40
42
  tagInactiveColor: '#eeeeee',
41
43
  tagTitleActiveColor: '#ffffff',
42
44
  tagTitleInactiveColor: '#000000',
45
+ tagRadius: 100,
43
46
  })
47
+ console.log(props, 'props')
44
48
  const { syncForm } = useSyncForm(props.dynamicScope)
45
49
  const current = ref()
46
50
  defineOptions({
@@ -63,9 +67,7 @@ handleTagClick(props.items[0]?.name, 0)
63
67
  </script>
64
68
 
65
69
  <style lang="scss" scoped>
66
- @import '@tplc/wot/components/common/abstracts/variable';
67
70
  .lcb-tag {
68
71
  padding: 8rpx 32rpx;
69
- border-radius: 10000rpx;
70
72
  }
71
73
  </style>
@@ -1,6 +1,10 @@
1
1
  <template>
2
- <wd-sticky v-if="sticky">
3
- <view class="w-100vw">
2
+ <!-- 用来计算内容宽度 -->
3
+ <wd-resize @resize="handleResize" custom-class="!w-full" customContainerClass="!w-full">
4
+ <view class="w-full"></view>
5
+ </wd-resize>
6
+ <wd-sticky v-if="sticky" @sticky="handleSticky">
7
+ <view :style="{ width: !isSticky ? contentWidth + 'px' : '100vw' }">
4
8
  <Tabs v-bind="$props" v-if="mode === 'tabs'" />
5
9
  <Imgs v-bind="$props" v-else-if="mode === 'image'" />
6
10
  <Tags v-bind="$props" v-else />
@@ -13,6 +17,7 @@
13
17
 
14
18
  <script setup lang="ts">
15
19
  import { LcbTabsProps } from './types'
20
+ import { ref } from 'vue'
16
21
  import Imgs from './components/Imgs/index.vue'
17
22
  import Tabs from './components/Tabs/index.vue'
18
23
  import Tags from './components/Tags/index.vue'
@@ -30,6 +35,15 @@ withDefaults(defineProps<LcbTabsProps>(), {
30
35
  gap: 16,
31
36
  imgHeight: 50,
32
37
  })
38
+ const isSticky = ref(false)
39
+ const contentWidth = ref(0)
40
+ const handleSticky = (sticky: boolean) => {
41
+ isSticky.value = sticky
42
+ }
43
+ function handleResize(detail: Record<string, string | number>) {
44
+ const { width } = detail
45
+ contentWidth.value = Number(width)
46
+ }
33
47
  </script>
34
48
 
35
49
  <style lang="scss" scoped></style>
@@ -27,6 +27,8 @@ export interface LcbTabsProps extends LcbBlockProps {
27
27
  tagInactiveColor?: string
28
28
  tagTitleActiveColor?: string
29
29
  tagTitleInactiveColor?: string
30
+ tagRadius?: number
31
+ tagMinWidth?: number
30
32
  tabActiveFontWeight?: string
31
33
  tabInactiveFontWeight?: string
32
34
  tabActiveFontSize?: number
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tplc/business",
3
- "version": "0.5.17",
3
+ "version": "0.5.18",
4
4
  "keywords": [
5
5
  "业务组件"
6
6
  ],
@@ -7,6 +7,7 @@ declare const _default: import('vue').DefineComponent<
7
7
  tagInactiveColor: string
8
8
  tagTitleActiveColor: string
9
9
  tagTitleInactiveColor: string
10
+ tagRadius: number
10
11
  }
11
12
  >,
12
13
  {},
@@ -27,6 +28,7 @@ declare const _default: import('vue').DefineComponent<
27
28
  tagInactiveColor: string
28
29
  tagTitleActiveColor: string
29
30
  tagTitleInactiveColor: string
31
+ tagRadius: number
30
32
  }
31
33
  >
32
34
  >
@@ -36,6 +38,7 @@ declare const _default: import('vue').DefineComponent<
36
38
  tagInactiveColor: string
37
39
  tagTitleActiveColor: string
38
40
  tagTitleInactiveColor: string
41
+ tagRadius: number
39
42
  },
40
43
  {}
41
44
  >
@@ -26,6 +26,8 @@ export interface LcbTabsProps extends LcbBlockProps {
26
26
  tagInactiveColor?: string
27
27
  tagTitleActiveColor?: string
28
28
  tagTitleInactiveColor?: string
29
+ tagRadius?: number
30
+ tagMinWidth?: number
29
31
  tabActiveFontWeight?: string
30
32
  tabInactiveFontWeight?: string
31
33
  tabActiveFontSize?: number