@tplc/business 0.7.49 → 0.7.51

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,20 @@
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.51](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/compare/v0.7.50...v0.7.51) (2026-01-06)
6
+
7
+
8
+ ### ✨ Features | 新功能
9
+
10
+ * **lcb-block:** add styleKey to dynamic options and update style handling for improved flexibility ([014469d](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/014469da25766f682cff0d63a932b82504f41d7d))
11
+
12
+ ### [0.7.50](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/compare/v0.7.49...v0.7.50) (2026-01-06)
13
+
14
+
15
+ ### ♻️ Code Refactoring | 代码重构
16
+
17
+ * **lcb-area:** update comparison logic to use compareType prop for improved clarity ([525e606](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/525e606ba08288fc1f048a68208575214cf8f274))
18
+
5
19
  ### [0.7.49](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/compare/v0.7.45...v0.7.49) (2026-01-06)
6
20
 
7
21
 
package/action.d.ts CHANGED
@@ -115,4 +115,5 @@ export interface TextRenderViewItem {
115
115
  export interface DynamicOptions {
116
116
  keyFrom?: 'user' | 'context'
117
117
  dynamicKey?: string
118
+ styleKey?: string
118
119
  }
@@ -153,7 +153,7 @@ watch(
153
153
  )
154
154
 
155
155
  // 优化: 提取比较逻辑,减少重复代码
156
- const compareValues = (value: any, compareValue: string, compareType: string) => {
156
+ const compareValues = (value = '', compareValue: string, compareType: string) => {
157
157
  switch (compareType) {
158
158
  case '=':
159
159
  return `${value}` === compareValue
@@ -48,16 +48,16 @@ const innerBackgroundColor = computed(() => {
48
48
  })
49
49
 
50
50
  const getInnerStyle = computed(() => {
51
- const innerStyle = Object.keys(props.dynamicStyleOptions || {}).reduce(
52
- (acc, key) => {
53
- const currentOptions = props.dynamicStyleOptions?.[key]
54
- if (key) {
51
+ const innerStyle = props.dynamicStyleOptions?.reduce(
52
+ (acc, { styleKey }) => {
53
+ if (styleKey) {
54
+ const currentOptions = props.dynamicStyleOptions?.[styleKey]
55
55
  const data = get(
56
56
  currentOptions?.keyFrom === 'user' ? userStore?.userInfo : innerDynamicData.value,
57
57
  currentOptions?.dynamicKey || '',
58
58
  )
59
59
  if (data) {
60
- acc[key] = data
60
+ acc[styleKey] = data
61
61
  }
62
62
  }
63
63
 
@@ -1,5 +1,4 @@
1
1
  import { DynamicOptions } from 'action'
2
- import { StyleValue } from 'vue'
3
2
 
4
3
  export interface LcbBlockProps {
5
4
  /** 左右外距 */
@@ -58,7 +57,7 @@ export interface LcbBlockProps {
58
57
  | 'bottom-right'
59
58
 
60
59
  // 动态样式集合
61
- dynamicStyleOptions?: Record<string, DynamicOptions>
60
+ dynamicStyleOptions?: DynamicOptions[]
62
61
  dynamicBgImage?: string
63
62
  }
64
63
  export interface LcbBlockInnerProps extends LcbBlockProps {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tplc/business",
3
- "version": "0.7.49",
3
+ "version": "0.7.51",
4
4
  "keywords": [
5
5
  "业务组件"
6
6
  ],
@@ -54,7 +54,7 @@ export interface LcbBlockProps {
54
54
  | 'bottom-left'
55
55
  | 'bottom-center'
56
56
  | 'bottom-right'
57
- dynamicStyleOptions?: Record<string, DynamicOptions>
57
+ dynamicStyleOptions?: DynamicOptions[]
58
58
  dynamicBgImage?: string
59
59
  }
60
60
  export interface LcbBlockInnerProps extends LcbBlockProps {
@@ -66,7 +66,7 @@ declare const __VLS_component: import('vue').DefineComponent<
66
66
  | 'bottom-left'
67
67
  | 'bottom-center'
68
68
  | 'bottom-right'
69
- dynamicStyleOptions: Record<string, import('../../action').DynamicOptions>
69
+ dynamicStyleOptions: import('../../action').DynamicOptions[]
70
70
  dynamicBgImage: string
71
71
  gap: number
72
72
  imageWidth: number