@tplc/business 0.7.9 → 0.7.11

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,31 @@
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.11](///compare/v0.7.9...v0.7.11) (2025-12-15)
6
+
7
+
8
+ ### 🚀 Chore | 构建/工程依赖/工具
9
+
10
+ * **release:** 0.7.10 163b7bc
11
+
12
+
13
+ ### ✨ Features | 新功能
14
+
15
+ * area 上下文 7f4320d
16
+ * 修改尺寸 391c013
17
+ * 测试更新 546c020
18
+ * 调整数据 d5bc0dd
19
+ * 调整颜色 f9ea6ca
20
+
21
+ ### [0.7.10](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/compare/v0.7.9...v0.7.10) (2025-12-14)
22
+
23
+
24
+ ### ✨ Features | 新功能
25
+
26
+ * 修改尺寸 ([391c013](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/391c01320bdc74cb235a1a0540d8e23d7fbce432))
27
+ * 测试更新 ([546c020](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/546c020e3763fa589a3fb273e699d5eed27b034b))
28
+ * 调整数据 ([d5bc0dd](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/d5bc0dd6d51a87e9d5958dd773454b03c24ab7f3))
29
+
5
30
  ### [0.7.9](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/compare/v0.7.8...v0.7.9) (2025-12-13)
6
31
 
7
32
 
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <lcb-block v-bind="$props" v-if="showArea">
3
- <lcb-action-view v-bind="action">
3
+ <lcb-action-view v-bind="actionProps">
4
4
  <view
5
5
  :style="{
6
6
  display: display,
@@ -33,6 +33,7 @@ import { getFlexStyle, transformValueUnit } from '@tplc/business/utils/transform
33
33
  import { get } from 'lodash-es'
34
34
  import { PAGE_PROVIDE_KEY } from '@tplc/business/constants'
35
35
  import { dynamicRequest } from '../../utils/request'
36
+ import { getDynamicData } from '../../utils/utils'
36
37
  defineOptions({
37
38
  name: 'LcbArea',
38
39
  options: {
@@ -83,6 +84,18 @@ const getData = async () => {
83
84
  }
84
85
  }
85
86
 
87
+ /** 处理跳转链接中的动态参数 */
88
+ const actionProps = computed(() => {
89
+ if (props.dynamicActionKey) {
90
+ return get(pageInfo.value, props.dynamicActionKey)
91
+ }
92
+ return {
93
+ ...props.action,
94
+ jumpUrl: getDynamicData(props.action?.jumpUrl, {
95
+ store: pageInfo.value,
96
+ }),
97
+ }
98
+ })
86
99
  watch(
87
100
  () => props.dataSource,
88
101
  () => {
@@ -27,6 +27,7 @@ export interface LcbAreaProps extends LcbBlockProps {
27
27
  compareType?: '=' | '>=' | '<=' | '>' | '<' | '!=' | 'includes'
28
28
  dataSource?: DataSource
29
29
  action?: LcbActionViewProps
30
+ dynamicActionKey?: string
30
31
  itemAlign?:
31
32
  | 'top-left'
32
33
  | 'top-center'
@@ -46,7 +46,11 @@
46
46
  v-if="innerValue"
47
47
  />
48
48
  </template>
49
- <text v-else style="line-height: 1.54" :class="{ truncate: textTruncate }">
49
+ <text
50
+ v-else
51
+ style="line-height: 1.54"
52
+ :class="lineClamp ? `line-clamp-${lineClamp}` : 'whitespace-pre-wrap'"
53
+ >
50
54
  {{ innerValue }}
51
55
  </text>
52
56
  </view>
@@ -56,13 +60,12 @@
56
60
  </template>
57
61
 
58
62
  <script setup lang="ts">
59
- import { computed, inject, Ref } from 'vue'
60
- import { LcbButtonProps } from './types'
61
- import { PAGE_PROVIDE_KEY, WRAPPER_ITEM_KEY } from '../../constants'
62
- import { getFlexStyle, transformValueUnit } from '../../utils/transform'
63
- import { getDynamicData } from '../../utils/utils'
64
63
  import { get } from 'lodash-es'
64
+ import { computed } from 'vue'
65
65
  import useDynamicData from '../../hooks/useDynamicData'
66
+ import { getFlexStyle, transformValueUnit } from '../../utils/transform'
67
+ import { getDynamicData } from '../../utils/utils'
68
+ import { LcbButtonProps } from './types'
66
69
  defineOptions({
67
70
  name: 'LcbButton',
68
71
  options: {
@@ -155,3 +158,13 @@ const styleOptions = computed<[Record<string, any>, string]>(() => {
155
158
  return [other, actionStyle]
156
159
  })
157
160
  </script>
161
+ <style lang="scss" scoped>
162
+ @for $i from 1 through 3 {
163
+ .line-clamp-#{$i} {
164
+ display: -webkit-box;
165
+ -webkit-line-clamp: $i;
166
+ -webkit-box-orient: vertical;
167
+ overflow: hidden;
168
+ }
169
+ }
170
+ </style>
@@ -35,5 +35,5 @@ export interface LcbButtonProps extends LcbBlockProps {
35
35
  | 'bottom-right'
36
36
  // 动态action key
37
37
  dynamicActionKey?: string
38
- textTruncate?: boolean
38
+ lineClamp?: number
39
39
  }
package/package.json CHANGED
@@ -1,17 +1,26 @@
1
1
  {
2
2
  "name": "@tplc/business",
3
- "version": "0.7.9",
3
+ "version": "0.7.11",
4
4
  "keywords": [
5
5
  "业务组件"
6
6
  ],
7
7
  "type": "module",
8
+ "scripts": {
9
+ "pub": "pnpm dts && pnpm publish --no-git-checks",
10
+ "dts": "rm -rf types && vue-tsc --project ./tsconfig.dts.json && pnpm prettier --write types",
11
+ "release-major": "standard-version --release-as major ",
12
+ "release-minor": "standard-version --release-as minor",
13
+ "release-patch": "standard-version --release-as patch ",
14
+ "generateComponent": "node ./scripts/createComponent.mjs",
15
+ "generateGlobalDts": "node ./scripts/generateGlobalDts.mjs"
16
+ },
8
17
  "publishConfig": {
9
18
  "access": "public",
10
19
  "registry": "https://registry.npmjs.org/"
11
20
  },
12
21
  "peerDependencies": {
13
- "vue": ">=3.2.47",
14
- "@tplc/wot": "1.0.14"
22
+ "@tplc/wot": "workspace:*",
23
+ "vue": ">=3.2.47"
15
24
  },
16
25
  "engines": {
17
26
  "node": ">=18",
@@ -24,14 +33,5 @@
24
33
  },
25
34
  "devDependencies": {
26
35
  "standard-version": "^9.5.0"
27
- },
28
- "scripts": {
29
- "pub": "pnpm dts && pnpm publish --no-git-checks",
30
- "dts": "rm -rf types && vue-tsc --project ./tsconfig.dts.json && pnpm prettier --write types",
31
- "release-major": "standard-version --release-as major ",
32
- "release-minor": "standard-version --release-as minor",
33
- "release-patch": "standard-version --release-as patch ",
34
- "generateComponent": "node ./scripts/createComponent.mjs",
35
- "generateGlobalDts": "node ./scripts/generateGlobalDts.mjs"
36
36
  }
37
- }
37
+ }
@@ -27,6 +27,7 @@ export interface LcbAreaProps extends LcbBlockProps {
27
27
  compareType?: '=' | '>=' | '<=' | '>' | '<' | '!=' | 'includes'
28
28
  dataSource?: DataSource
29
29
  action?: LcbActionViewProps
30
+ dynamicActionKey?: string
30
31
  itemAlign?:
31
32
  | 'top-left'
32
33
  | 'top-center'
@@ -31,5 +31,5 @@ export interface LcbButtonProps extends LcbBlockProps {
31
31
  | 'bottom-center'
32
32
  | 'bottom-right'
33
33
  dynamicActionKey?: string
34
- textTruncate?: boolean
34
+ lineClamp?: number
35
35
  }