@tplc/business 0.3.77 → 0.3.79

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,33 @@
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.3.79](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.1.66...v0.3.79) (2025-03-12)
6
+
7
+
8
+ ### 🚀 Chore | 构建/工程依赖/工具
9
+
10
+ * **release:** 0.3.78 ([2e70c15](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/2e70c15362c3b29f1c9c8a7cb877f8712a05bc4c))
11
+
12
+
13
+ ### ✨ Features | 新功能
14
+
15
+ * 支持沉浸式文字 ([6f138c0](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/6f138c048cf28f6827307b95bf98175c2bc497ad))
16
+ * 调整icon ([ded88ce](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/ded88ce1bfe0cfd08dbc4cc2843d60ca3f1c2a1b))
17
+
18
+ ### [0.3.78](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.1.65...v0.3.78) (2025-03-11)
19
+
20
+
21
+ ### 🚀 Chore | 构建/工程依赖/工具
22
+
23
+ * **release:** 0.1.66 ([f23f243](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/f23f2437450743054ccbfd05dcdd8a24e74a355b))
24
+ * **release:** 0.3.77 ([0e84283](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/0e8428369c5fbcaa5e3f77f50cee3391856c33c1))
25
+
26
+
27
+ ### ✨ Features | 新功能
28
+
29
+ * 支持search ([b40bddd](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/b40bddd4bb1441a389475df4dae0ce98dc0176b8))
30
+ * 调整icon ([ded88ce](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/ded88ce1bfe0cfd08dbc4cc2843d60ca3f1c2a1b))
31
+
5
32
  ### [0.3.77](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.1.63...v0.3.77) (2025-03-11)
6
33
 
7
34
 
@@ -67,7 +67,7 @@
67
67
  left
68
68
  v-if="styleGroup === 2 && titleLocation === 'left'"
69
69
  />
70
- <Title v-bind="titleProps" v-else-if="topStyle !== 2" :opacity="navbarBgOpacity" />
70
+ <Title v-bind="titleProps" v-else-if="topStyle !== 2" :opacity="titleOpacity" />
71
71
  </view>
72
72
  </view>
73
73
  <!-- 中间布局 -->
@@ -80,7 +80,7 @@
80
80
  <Title
81
81
  v-bind="titleProps"
82
82
  v-else-if="styleGroup === 2 || titleLocation === 'center'"
83
- :opacity="navbarBgOpacity"
83
+ :opacity="titleOpacity"
84
84
  />
85
85
  </view>
86
86
  <view
@@ -192,6 +192,13 @@ const navbarBgOpacity = computed(() => {
192
192
  }
193
193
  return 1
194
194
  })
195
+ const titleOpacity = computed(() => {
196
+ const { topStyle, immersionMode } = props
197
+ if (topStyle === 2 && immersionMode === 3) {
198
+ return 1
199
+ }
200
+ return navbarBgOpacity.value
201
+ })
195
202
  /** 标题样式 */
196
203
  const titleProps = computed(() => {
197
204
  return {
@@ -26,8 +26,8 @@ export interface NavProps extends NavTitleProps {
26
26
  /** 是否沉浸式状态栏 */
27
27
  // 1 标准 2沉浸式
28
28
  topStyle?: 1 | 2
29
- // 沉浸规则 1滑动后恢复 2永久沉浸式
30
- immersionMode?: 1 | 2
29
+ // 沉浸规则 1滑动后恢复 2永久沉浸式 3 永久沉浸式且显示标题
30
+ immersionMode?: 1 | 2 | 3
31
31
  /** 模式 1.标题 2.搜索 3.导航 4.沉浸式 */
32
32
  styleGroup?: 1 | 2 | 3 | 4
33
33
  /** 背景图片 */
@@ -1,7 +1,15 @@
1
1
  <template>
2
2
  <view class="w-100vw">
3
3
  <lcb-block v-bind="$props">
4
- <wd-tabs custom-class="!bg-transparent" @change="handleChange">
4
+ <wd-tabs
5
+ custom-class="!bg-transparent"
6
+ @change="handleChange"
7
+ :lineWidth="lineWidth"
8
+ :lineHeight="lineHeight"
9
+ :slidable="slidable"
10
+ :slidableNum="slidableNum"
11
+ ref="tabs"
12
+ >
5
13
  <wd-tab v-for="tab in items" :key="tab.name" :title="tab.title" :name="tab.name" />
6
14
  </wd-tabs>
7
15
  </lcb-block>
@@ -10,7 +18,7 @@
10
18
 
11
19
  <script setup lang="ts">
12
20
  import { FORM_KEY } from '../../../../constants'
13
- import { inject, Ref, watch } from 'vue'
21
+ import { inject, ref, Ref, watch } from 'vue'
14
22
  import { LcbTabsProps } from '../../types'
15
23
  defineOptions({
16
24
  name: 'LcbTabsItem',
@@ -21,7 +29,13 @@ defineOptions({
21
29
  },
22
30
  })
23
31
  const form = inject<Ref<Record<string, any>>>(FORM_KEY)
24
- withDefaults(defineProps<LcbTabsProps>(), {})
32
+ const tabs = ref()
33
+ const props = withDefaults(defineProps<LcbTabsProps>(), {
34
+ lineWidth: 19,
35
+ lineHeight: 3,
36
+ slidable: 'auto',
37
+ slidableNum: 6,
38
+ })
25
39
  const handleChange = (e: { name: string }) => {
26
40
  try {
27
41
  const params = JSON.parse(e.name)
@@ -33,6 +47,12 @@ const handleChange = (e: { name: string }) => {
33
47
  console.error(error)
34
48
  }
35
49
  }
50
+ watch(
51
+ () => [props.lineWidth, props.lineHeight, props.slidable, props.slidableNum],
52
+ () => {
53
+ tabs.value.updateLineStyle(true)
54
+ },
55
+ )
36
56
  </script>
37
57
 
38
58
  <style lang="scss" scoped></style>
@@ -7,4 +7,8 @@ export interface LcbTabsProps extends LcbBlockProps {
7
7
  title: string
8
8
  name: string
9
9
  }[]
10
+ lineWidth?: number
11
+ lineHeight?: number
12
+ slidable?: 'always' | 'auto'
13
+ slidableNum?: number
10
14
  }
@@ -11,6 +11,16 @@
11
11
  }"
12
12
  class="flex items-center"
13
13
  >
14
+ <lcb-icon
15
+ v-if="showIcon"
16
+ :url="url"
17
+ :icon="icon"
18
+ :iconType="iconType"
19
+ classPrefix="lcb"
20
+ :size="transformValueUnit(iconSize)"
21
+ :color="iconColor"
22
+ :customStyle="customStyle"
23
+ />
14
24
  <view
15
25
  v-if="showTitleLine"
16
26
  class="h-90%"
@@ -53,7 +63,7 @@
53
63
  <script setup lang="ts">
54
64
  import { LcbTitleProps } from './types'
55
65
  import { transformValueUnit } from '../../utils/transform'
56
- import { inject } from 'vue'
66
+ import { computed, inject } from 'vue'
57
67
  const themeColor = inject('theme-color', '#3875FF')
58
68
  defineOptions({
59
69
  name: 'LcbTitle',
@@ -63,7 +73,7 @@ defineOptions({
63
73
  styleIsolation: 'shared',
64
74
  },
65
75
  })
66
- withDefaults(defineProps<LcbTitleProps>(), {
76
+ const props = withDefaults(defineProps<LcbTitleProps>(), {
67
77
  marginHorizontal: 24,
68
78
  fontWeight: 600,
69
79
  fontSize: 28,
@@ -79,5 +89,12 @@ withDefaults(defineProps<LcbTitleProps>(), {
79
89
  showTitleLine: false,
80
90
  lineRight: 12,
81
91
  lineWidth: 6,
92
+ iconRight: 24,
93
+ size: '28',
94
+ iconType: 'icon',
95
+ iconColor: '#000',
96
+ })
97
+ const customStyle = computed(() => {
98
+ return props.iconRight ? `margin-right:${transformValueUnit(props.iconRight)}` : ''
82
99
  })
83
100
  </script>
@@ -1,6 +1,9 @@
1
+ import { LcbIconProps } from '../lcb-icon/types'
1
2
  import { LcbActionViewProps } from '../lcb-action-view/types'
2
3
  import { LcbBlockProps } from '../lcb-block/types'
3
- export interface LcbTitleProps extends LcbBlockProps {
4
+ export interface LcbTitleProps
5
+ extends LcbBlockProps,
6
+ Omit<LcbIconProps, 'color' | 'customStyle' | 'size'> {
4
7
  /** 副标题 */
5
8
  title: string
6
9
  fontWeight?: number
@@ -25,4 +28,8 @@ export interface LcbTitleProps extends LcbBlockProps {
25
28
  moreFontSize?: number
26
29
  moreText?: string
27
30
  moreVerticalAlign?: 'end' | 'center'
31
+ iconColor?: string
32
+ iconRight?: number
33
+ iconSize?: number
34
+ showIcon?: boolean
28
35
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tplc/business",
3
- "version": "0.3.77",
3
+ "version": "0.3.79",
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": "0.1.65"
14
+ "@tplc/wot": "0.1.66"
15
15
  },
16
16
  "engines": {
17
17
  "node": ">=18",
@@ -62,7 +62,7 @@ declare const _default: import('vue').DefineComponent<
62
62
  textSize: number
63
63
  back: boolean
64
64
  topStyle: 1 | 2
65
- immersionMode: 1 | 2
65
+ immersionMode: 1 | 2 | 3
66
66
  colorMode: 'custom' | 'default'
67
67
  backColor: string
68
68
  backgroundType: 'img' | 'color'
@@ -23,7 +23,7 @@ export interface NavProps extends NavTitleProps {
23
23
  fixed?: boolean
24
24
  /** 是否沉浸式状态栏 */
25
25
  topStyle?: 1 | 2
26
- immersionMode?: 1 | 2
26
+ immersionMode?: 1 | 2 | 3
27
27
  /** 模式 1.标题 2.搜索 3.导航 4.沉浸式 */
28
28
  styleGroup?: 1 | 2 | 3 | 4
29
29
  /** 背景图片 */
@@ -1,6 +1,14 @@
1
1
  import { LcbTabsProps } from '../../types'
2
2
  declare const _default: import('vue').DefineComponent<
3
- __VLS_WithDefaults<__VLS_TypePropsToOption<LcbTabsProps>, {}>,
3
+ __VLS_WithDefaults<
4
+ __VLS_TypePropsToOption<LcbTabsProps>,
5
+ {
6
+ lineWidth: number
7
+ lineHeight: number
8
+ slidable: string
9
+ slidableNum: number
10
+ }
11
+ >,
4
12
  {},
5
13
  unknown,
6
14
  {},
@@ -11,9 +19,24 @@ declare const _default: import('vue').DefineComponent<
11
19
  string,
12
20
  import('vue').PublicProps,
13
21
  Readonly<
14
- import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<LcbTabsProps>, {}>>
22
+ import('vue').ExtractPropTypes<
23
+ __VLS_WithDefaults<
24
+ __VLS_TypePropsToOption<LcbTabsProps>,
25
+ {
26
+ lineWidth: number
27
+ lineHeight: number
28
+ slidable: string
29
+ slidableNum: number
30
+ }
31
+ >
32
+ >
15
33
  >,
16
- {},
34
+ {
35
+ lineHeight: number
36
+ lineWidth: number
37
+ slidableNum: number
38
+ slidable: 'always' | 'auto'
39
+ },
17
40
  {}
18
41
  >
19
42
  export default _default
@@ -6,4 +6,8 @@ export interface LcbTabsProps extends LcbBlockProps {
6
6
  title: string
7
7
  name: string
8
8
  }[]
9
+ lineWidth?: number
10
+ lineHeight?: number
11
+ slidable?: 'always' | 'auto'
12
+ slidableNum?: number
9
13
  }
@@ -18,6 +18,10 @@ declare const _default: import('vue').DefineComponent<
18
18
  showTitleLine: boolean
19
19
  lineRight: number
20
20
  lineWidth: number
21
+ iconRight: number
22
+ size: string
23
+ iconType: string
24
+ iconColor: string
21
25
  }
22
26
  >,
23
27
  {},
@@ -49,6 +53,10 @@ declare const _default: import('vue').DefineComponent<
49
53
  showTitleLine: boolean
50
54
  lineRight: number
51
55
  lineWidth: number
56
+ iconRight: number
57
+ size: string
58
+ iconType: string
59
+ iconColor: string
52
60
  }
53
61
  >
54
62
  >
@@ -56,6 +64,7 @@ declare const _default: import('vue').DefineComponent<
56
64
  {
57
65
  title: string
58
66
  color: string
67
+ iconColor: string
59
68
  lineWidth: number
60
69
  marginHorizontal: number
61
70
  fontSize: number
@@ -66,6 +75,7 @@ declare const _default: import('vue').DefineComponent<
66
75
  | 'justify-center'
67
76
  | 'justify-between'
68
77
  | 'justify-around'
78
+ iconType: 'icon' | 'img'
69
79
  hintColor: string
70
80
  hintFontSize: number
71
81
  hintVerticalAlign: 'end' | 'center'
@@ -74,6 +84,7 @@ declare const _default: import('vue').DefineComponent<
74
84
  moreColor: string
75
85
  moreFontSize: number
76
86
  moreVerticalAlign: 'end' | 'center'
87
+ iconRight: number
77
88
  },
78
89
  {}
79
90
  >
@@ -1,6 +1,9 @@
1
+ import { LcbIconProps } from '../lcb-icon/types'
1
2
  import { LcbActionViewProps } from '../lcb-action-view/types'
2
3
  import { LcbBlockProps } from '../lcb-block/types'
3
- export interface LcbTitleProps extends LcbBlockProps {
4
+ export interface LcbTitleProps
5
+ extends LcbBlockProps,
6
+ Omit<LcbIconProps, 'color' | 'customStyle' | 'size'> {
4
7
  /** 副标题 */
5
8
  title: string
6
9
  fontWeight?: number
@@ -23,4 +26,8 @@ export interface LcbTitleProps extends LcbBlockProps {
23
26
  moreFontSize?: number
24
27
  moreText?: string
25
28
  moreVerticalAlign?: 'end' | 'center'
29
+ iconColor?: string
30
+ iconRight?: number
31
+ iconSize?: number
32
+ showIcon?: boolean
26
33
  }