@tplc/business 0.7.62 → 0.7.64

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,50 @@
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.64](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/compare/v0.7.58...v0.7.64) (2026-01-12)
6
+
7
+
8
+ ### ✨ Features | 新功能
9
+
10
+ * **lcb-tabs, lcb-title:** replace tag color and radius props with lineWidth, lineHeight, and slidable props; add moreFontWeight prop for title customization ([be1834a](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/be1834a33cc23e862a4574dcabc962b3d93efec3))
11
+
12
+
13
+ ### ♻️ Code Refactoring | 代码重构
14
+
15
+ * **lcb-image, lcb-nav:** remove unused TypeScript declaration files for Image and Title components ([431ddb8](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/431ddb85ab02ad2f23436496a4a59cea9c8dcbcd))
16
+ * **lcb-image:** replace Image component with LcbWrapperImage and remove unused Image file ([d489b3b](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/d489b3b226d158cc17abff03b5152ca9398c97ce))
17
+ * **lcb-nav:** replace Title component with LcbNavTitle and remove unused Title file ([d51695b](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/d51695bfe336809741d4743356e35d12d2707f83))
18
+ * **lcb-video:** update video component styles and extend props for dynamic sizing ([56757fa](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/56757fa5b437bff60015c0f9d7c05d7959d19927))
19
+ * **wd-tabs:** change font size and weight props to accept both numeric and string types ([169a4e5](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/169a4e56bb7d81e675bd9a2cfaded0e2a06272d8))
20
+
21
+
22
+ ### 🚀 Chore | 构建/工程依赖/工具
23
+
24
+ * **release:** 0.7.59 ([a98567a](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/a98567a3d2d84c957dd03c5ea60ba847109ef0c4))
25
+ * **release:** 0.7.60 ([972beec](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/972beec4a80061c59cd784e922de485f218b1174))
26
+ * **release:** 0.7.61 ([7849bf2](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/7849bf25f670ba9afc2c117d1344ce96e6aada29))
27
+ * **release:** 0.7.62 ([fb72585](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/fb725852c762380ed4b90c66d4f9b8d3b6894977))
28
+ * **release:** 0.7.63 ([fe7b4b1](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/fe7b4b15a134e796285effcb77e871063acfa095))
29
+ * **release:** 1.0.26 ([eceba4d](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/eceba4d3fc7b0a375a572ec2274b826e9fef4475))
30
+ * **release:** 1.0.27 ([d26fc49](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/d26fc4968a1daaf9508f534e435dbb12d628548f))
31
+
32
+
33
+ ### 🐛 Bug Fixes | Bug 修复
34
+
35
+ * **iconfonts:** update font URLs to absolute paths for improved accessibility ([4a9ff7c](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/4a9ff7c0128766a6a718d8bc266d2914bbe1b6da))
36
+ * **iconfonts:** update font URLs to relative paths for better asset management ([61e3142](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/61e31429da7faf69f76cb7b7e423c47e8ec1d7eb))
37
+ * **lcb-tabs:** extend timeout duration for currentTab initialization to enhance default tab selection accuracy ([a29ae0c](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/a29ae0cf9c1b0c9ef483c4ca94f094fb7286153c))
38
+ * **lcb-tabs:** increase timeout duration for initializing currentTab to improve default tab selection timing ([01b7415](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/01b74154ea693ab32f1414c2aa3a153bdab169a4))
39
+ * **lcb-tabs:** initialize currentTab on component mount to ensure correct default tab selection ([3bd2024](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/3bd2024c1a654897a621ea8f559ac2c12ffb86b0))
40
+ * **wd-tabs:** implement layout retry logic to ensure accurate tab positioning on initial render ([94ade3b](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/94ade3b0c75122050b6bb871eeceedf8d09e5f42))
41
+
42
+ ### [0.7.63](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/compare/v0.7.62...v0.7.63) (2026-01-10)
43
+
44
+
45
+ ### 🐛 Bug Fixes | Bug 修复
46
+
47
+ * **lcb-tabs:** extend timeout duration for currentTab initialization to enhance default tab selection accuracy ([a29ae0c](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/a29ae0cf9c1b0c9ef483c4ca94f094fb7286153c))
48
+
5
49
  ### [0.7.62](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/compare/v0.7.61...v0.7.62) (2026-01-10)
6
50
 
7
51
 
@@ -23,7 +23,7 @@
23
23
  </view>
24
24
  </scroll-view>
25
25
  <view
26
- class="flex flex-col justify-center items-center px-2 py-1 w-8 text-primary bg-white mt-3"
26
+ class="flex flex-col justify-center items-center px-2 py-1 w-8 text-primary mt-3"
27
27
  @click="onMore"
28
28
  v-if="showMore"
29
29
  >
@@ -1,63 +1,72 @@
1
1
  <template>
2
2
  <lcb-block v-bind="$props">
3
- <wd-tabs
4
- custom-class="!bg-transparent"
5
- @change="handleChange"
6
- :lineWidth="lineWidth"
7
- :lineHeight="lineHeight"
8
- :slidable="slidable"
9
- :slidableNum="slidableNum"
10
- :itemFontSize="itemFontSize"
11
- :activeFontSize="tabActiveFontSize"
12
- :activeFontWeight="tabActiveFontWeight"
13
- :itemFontWeight="tabInactiveFontWeight"
14
- ref="tabs"
15
- :inactiveColor="tagTitleInactiveColor"
16
- :color="tagTitleActiveColor"
17
- v-model="currentTab"
18
- animated
3
+ <view
4
+ :class="{
5
+ 'flex flex-wrap': tagsMode === 'tiled',
6
+ 'flex whitespace-nowrap overflow-x-auto': tagsMode === 'scroll',
7
+ }"
8
+ :style="{
9
+ gap: transformValueUnit(gap),
10
+ }"
19
11
  >
20
- <wd-tab v-for="tab in items" :key="tab.name" :title="tab.title" :name="tab.name" animated />
21
- </wd-tabs>
12
+ <view
13
+ v-for="(item, index) in items"
14
+ :key="index"
15
+ class="lcb-tag text-center"
16
+ :class="{
17
+ 'lcb-tag-active': current === index,
18
+ 'inline-block': tagsMode === 'scroll',
19
+ }"
20
+ :style="{
21
+ fontSize: transformValueUnit(itemFontSize),
22
+ backgroundColor: current === index ? tagActiveColor : tagInactiveColor,
23
+ color: current === index ? tagTitleActiveColor : tagTitleInactiveColor,
24
+ borderRadius: transformValueUnit(tagRadius),
25
+ minWidth: transformValueUnit(tagMinWidth),
26
+ }"
27
+ @click="handleTagClick(item.name, index)"
28
+ >
29
+ {{ item.title }}
30
+ </view>
31
+ </view>
22
32
  </lcb-block>
23
33
  </template>
24
34
 
25
35
  <script setup lang="ts">
26
- import { ref, watch } from 'vue'
36
+ import { ref } from 'vue'
27
37
  import useSyncForm from '../../../../hooks/useSyncForm'
38
+ import { transformValueUnit } from '../../../../utils/transform'
28
39
  import { LcbTabsProps } from '../../types'
29
- defineOptions({
30
- name: 'LcbTabsItem',
31
- options: {
32
- addGlobalClass: true,
33
- virtualHost: true,
34
- styleIsolation: 'shared',
35
- },
36
- })
37
-
38
- const tabs = ref()
39
40
  const props = withDefaults(defineProps<LcbTabsProps>(), {
40
- lineWidth: 19,
41
- lineHeight: 3,
42
- slidable: 'auto',
43
- slidableNum: 6,
41
+ tagActiveColor: 'var(--wot-color-theme)',
42
+ tagInactiveColor: '#eeeeee',
43
+ tagTitleActiveColor: '#ffffff',
44
+ tagTitleInactiveColor: '#000000',
45
+ tagRadius: 100,
44
46
  defaultIndex: 0,
45
47
  })
46
- const currentTab = ref(props.items?.[props.defaultIndex]?.name)
47
48
  const { syncForm } = useSyncForm({
48
49
  dynamicScope: props.dynamicScope,
49
50
  visibleScope: props.visibleScope,
50
51
  })
51
- const handleChange = (e: { name: string }) => {
52
- syncForm(JSON.parse(e.name))
53
- }
54
- watch(
55
- () => [props.lineWidth, props.lineHeight, props.slidable, props.slidableNum],
56
- () => {
57
- tabs.value.updateLineStyle(true)
52
+ const current = ref(props.defaultIndex)
53
+ defineOptions({
54
+ name: 'LcbTagsItem',
55
+ options: {
56
+ addGlobalClass: true,
57
+ virtualHost: true,
58
+ styleIsolation: 'shared',
58
59
  },
59
- )
60
- syncForm(JSON.parse(currentTab.value || '{}'))
60
+ })
61
+ const handleTagClick = (name: string, index: number) => {
62
+ current.value = index
63
+ syncForm(JSON.parse(name))
64
+ }
65
+ handleTagClick(props.items[current.value]?.name, current.value)
61
66
  </script>
62
67
 
63
- <style lang="scss" scoped></style>
68
+ <style lang="scss" scoped>
69
+ .lcb-tag {
70
+ padding: 8rpx 32rpx;
71
+ }
72
+ </style>
@@ -5,6 +5,7 @@ export interface LcbTabsProps extends LcbBlockProps {
5
5
  sticky?: boolean
6
6
  items: {
7
7
  title: string
8
+ /** 字符串json格式数据,用于表单数据联动 */
8
9
  name: string
9
10
  activeUrl?: string
10
11
  inactiveUrl?: string
@@ -6,12 +6,16 @@
6
6
  :autoplay="autoplay"
7
7
  :muted="muted"
8
8
  :showProgress="showProgress"
9
- class="w-full"
9
+ :style="{
10
+ height: videoHeight ? transformValueUnit(videoHeight) : '',
11
+ width: videoWidth ? transformValueUnit(videoWidth) : '100%',
12
+ }"
10
13
  />
11
14
  </lcb-block>
12
15
  </template>
13
16
 
14
17
  <script setup lang="ts">
18
+ import { transformValueUnit } from '../../utils/transform'
15
19
  import { LcbVideoProps } from './types'
16
20
  defineOptions({
17
21
  name: 'LcbVideo',
@@ -1,4 +1,6 @@
1
- export interface LcbVideoProps {
1
+ import { LcbBlockProps } from '../../components/lcb-block/types'
2
+
3
+ export interface LcbVideoProps extends LcbBlockProps {
2
4
  // Define the component's prop types here
3
5
  src?: string
4
6
  loop?: boolean
@@ -8,4 +10,6 @@ export interface LcbVideoProps {
8
10
  marginTop?: number
9
11
  marginBottom?: number
10
12
  marginHorizontal?: number
13
+ videoHeight?: number
14
+ videoWidth?: number
11
15
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tplc/business",
3
- "version": "0.7.62",
3
+ "version": "0.7.64",
4
4
  "keywords": [
5
5
  "业务组件"
6
6
  ],
@@ -11,7 +11,7 @@
11
11
  },
12
12
  "peerDependencies": {
13
13
  "vue": ">=3.2.47",
14
- "@tplc/wot": "1.0.25"
14
+ "@tplc/wot": "1.0.27"
15
15
  },
16
16
  "engines": {
17
17
  "node": ">=18",
@@ -3,10 +3,11 @@ declare const _default: import('vue').DefineComponent<
3
3
  __VLS_WithDefaults<
4
4
  __VLS_TypePropsToOption<LcbTabsProps>,
5
5
  {
6
- lineWidth: number
7
- lineHeight: number
8
- slidable: string
9
- slidableNum: number
6
+ tagActiveColor: string
7
+ tagInactiveColor: string
8
+ tagTitleActiveColor: string
9
+ tagTitleInactiveColor: string
10
+ tagRadius: number
10
11
  defaultIndex: number
11
12
  }
12
13
  >,
@@ -24,21 +25,23 @@ declare const _default: import('vue').DefineComponent<
24
25
  __VLS_WithDefaults<
25
26
  __VLS_TypePropsToOption<LcbTabsProps>,
26
27
  {
27
- lineWidth: number
28
- lineHeight: number
29
- slidable: string
30
- slidableNum: number
28
+ tagActiveColor: string
29
+ tagInactiveColor: string
30
+ tagTitleActiveColor: string
31
+ tagTitleInactiveColor: string
32
+ tagRadius: number
31
33
  defaultIndex: number
32
34
  }
33
35
  >
34
36
  >
35
37
  >,
36
38
  {
37
- lineHeight: number
38
- lineWidth: number
39
- slidableNum: number
40
- slidable: 'always' | 'auto'
41
39
  defaultIndex: number
40
+ tagActiveColor: string
41
+ tagInactiveColor: string
42
+ tagTitleActiveColor: string
43
+ tagTitleInactiveColor: string
44
+ tagRadius: number
42
45
  },
43
46
  {}
44
47
  >
@@ -4,6 +4,7 @@ export interface LcbTabsProps extends LcbBlockProps {
4
4
  sticky?: boolean
5
5
  items: {
6
6
  title: string
7
+ /** 字符串json格式数据,用于表单数据联动 */
7
8
  name: string
8
9
  activeUrl?: string
9
10
  inactiveUrl?: string
@@ -1,4 +1,5 @@
1
- export interface LcbVideoProps {
1
+ import { LcbBlockProps } from '../../components/lcb-block/types'
2
+ export interface LcbVideoProps extends LcbBlockProps {
2
3
  src?: string
3
4
  loop?: boolean
4
5
  muted?: boolean
@@ -7,4 +8,6 @@ export interface LcbVideoProps {
7
8
  marginTop?: number
8
9
  marginBottom?: number
9
10
  marginHorizontal?: number
11
+ videoHeight?: number
12
+ videoWidth?: number
10
13
  }