@tplc/business 0.7.9 → 0.7.12

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,38 @@
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.12](///compare/v0.7.11...v0.7.12) (2025-12-15)
6
+
7
+
8
+ ### ✨ Features | 新功能
9
+
10
+ * 1 580dde4
11
+
12
+ ### [0.7.11](///compare/v0.7.9...v0.7.11) (2025-12-15)
13
+
14
+
15
+ ### 🚀 Chore | 构建/工程依赖/工具
16
+
17
+ * **release:** 0.7.10 163b7bc
18
+
19
+
20
+ ### ✨ Features | 新功能
21
+
22
+ * area 上下文 7f4320d
23
+ * 修改尺寸 391c013
24
+ * 测试更新 546c020
25
+ * 调整数据 d5bc0dd
26
+ * 调整颜色 f9ea6ca
27
+
28
+ ### [0.7.10](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/compare/v0.7.9...v0.7.10) (2025-12-14)
29
+
30
+
31
+ ### ✨ Features | 新功能
32
+
33
+ * 修改尺寸 ([391c013](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/391c01320bdc74cb235a1a0540d8e23d7fbce432))
34
+ * 测试更新 ([546c020](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/546c020e3763fa589a3fb273e699d5eed27b034b))
35
+ * 调整数据 ([d5bc0dd](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/d5bc0dd6d51a87e9d5958dd773454b03c24ab7f3))
36
+
5
37
  ### [0.7.9](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/compare/v0.7.8...v0.7.9) (2025-12-13)
6
38
 
7
39
 
@@ -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
  }
@@ -44,9 +44,9 @@ const props = withDefaults(defineProps<AddressCommunityProps>(), {
44
44
  switchType: 'address',
45
45
  })
46
46
  type Merchant = { merchantName: string; pageDecorationId: string; merchantId: string }
47
- const value = defineModel<string>('')
47
+ const value = defineModel<string>(props.id || '')
48
48
  const constantsStore = uni.$lcb.constantsStore?.()
49
- const title = ref<string>('')
49
+ const title = ref<string>(props.title || '')
50
50
  const merchantList = ref<Merchant[]>([])
51
51
  const options = computed(() => {
52
52
  return props.switchType === 'merchant'
@@ -104,7 +104,11 @@ const handleChange = (e: any) => {
104
104
  uni.$emit('refreshSchemaPage', {
105
105
  pageDecorationId: e.selectedItem.pageDecorationId,
106
106
  pageId: getCurrentPage().pageId,
107
- mode: props.mode,
107
+ merchant: {
108
+ title: e.selectedItem.merchantName,
109
+ id: e.selectedItem.merchantId,
110
+ mode: props.mode,
111
+ },
108
112
  })
109
113
  } else {
110
114
  uni.$lcb.constantsStore?.()?.setAddressId(e.selectedItem.addressId, props.switchType)
@@ -32,7 +32,7 @@
32
32
  switchType: pageInfo.frontConfig?.chooseFlag
33
33
  ? 'merchant'
34
34
  : addressCommunityProps?.switchType,
35
- mode: pageInfo.frontConfig?.mode || addressCommunityProps?.mode,
35
+ ...pageInfo.frontConfig?.merchant,
36
36
  }"
37
37
  />
38
38
  <view
@@ -25,6 +25,8 @@ export interface AddressCommunityProps {
25
25
  mode: 'normal' | 'menu'
26
26
  popupWidth?: number
27
27
  switchType?: 'merchant' | 'address'
28
+ title?: string
29
+ id?: string
28
30
  }
29
31
 
30
32
  export interface NavTitleProps {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tplc/business",
3
- "version": "0.7.9",
3
+ "version": "0.7.12",
4
4
  "keywords": [
5
5
  "业务组件"
6
6
  ],
@@ -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
  }
@@ -1,7 +1,7 @@
1
1
  import { AddressCommunityProps } from '../types'
2
2
  declare let __VLS_typeProps: AddressCommunityProps
3
3
  type __VLS_PublicProps = {
4
- ''?: string
4
+ modelValue?: string
5
5
  } & typeof __VLS_typeProps
6
6
  declare const _default: import('vue').DefineComponent<
7
7
  __VLS_WithDefaults<
@@ -22,10 +22,29 @@ declare const _default: import('vue').DefineComponent<
22
22
  {},
23
23
  import('vue').ComponentOptionsMixin,
24
24
  import('vue').ComponentOptionsMixin,
25
- any,
25
+ {
26
+ 'update:modelValue': (modelValue: string) => void
27
+ },
26
28
  string,
27
29
  import('vue').PublicProps,
28
- any,
30
+ Readonly<
31
+ import('vue').ExtractPropTypes<
32
+ __VLS_WithDefaults<
33
+ __VLS_TypePropsToOption<__VLS_PublicProps>,
34
+ {
35
+ backgroundColor: string
36
+ color: string
37
+ fontSize: number
38
+ width: number
39
+ mode: string
40
+ popupWidth: number
41
+ switchType: string
42
+ }
43
+ >
44
+ >
45
+ > & {
46
+ 'onUpdate:modelValue'?: ((modelValue: string) => any) | undefined
47
+ },
29
48
  {
30
49
  mode: 'normal' | 'menu'
31
50
  width: number
@@ -23,6 +23,8 @@ export interface AddressCommunityProps {
23
23
  mode: 'normal' | 'menu'
24
24
  popupWidth?: number
25
25
  switchType?: 'merchant' | 'address'
26
+ title?: string
27
+ id?: string
26
28
  }
27
29
  export interface NavTitleProps {
28
30
  /** 模式 */