@tplc/business 0.4.178 → 0.4.179

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,13 @@
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.4.179](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.4.178...v0.4.179) (2025-07-31)
6
+
7
+
8
+ ### ✨ Features | 新功能
9
+
10
+ * 完成地图配置 ([17ffbc4](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/17ffbc423780ed30c097f695da8ddcb01e3fb828))
11
+
5
12
  ### [0.4.178](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.4.177...v0.4.178) (2025-07-31)
6
13
 
7
14
 
@@ -43,7 +43,7 @@ export interface LcbListProps extends LcbBlockProps {
43
43
  value: string
44
44
  }[]
45
45
  mapTagMode?: 'single' | 'multiple'
46
- mapConfigParams?: Record<string, any>
46
+ mapConfigParams?: string
47
47
  }
48
48
  export interface Option {
49
49
  label: string
@@ -80,7 +80,7 @@
80
80
  <script lang="ts" setup>
81
81
  import { FORM_KEY } from '@tplc/business/constants'
82
82
  import { reactive, inject, ref, useAttrs, watch, onMounted, getCurrentInstance } from 'vue'
83
- import { transformValueUnit } from '../../utils/transform'
83
+ import { getJsonFromStr, transformValueUnit } from '../../utils/transform'
84
84
  import { MapItem, MapMarker } from './types'
85
85
  import useAutoHeight from '../../hooks/useAutoHeight'
86
86
  import { LcbListProps } from '@tplc/business/components/lcb-list/types'
@@ -181,7 +181,7 @@ const getConfig = async () => {
181
181
  }>('/productInfoMap/config', {
182
182
  ...props.baseParam,
183
183
  ...form?.value,
184
- ...props.mapConfigParams,
184
+ ...getJsonFromStr(props.mapConfigParams),
185
185
  })
186
186
  form.value.userLatitude = mapLatitude
187
187
  form.value.userLongitude = mapLongitude
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tplc/business",
3
- "version": "0.4.178",
3
+ "version": "0.4.179",
4
4
  "keywords": [
5
5
  "业务组件"
6
6
  ],
@@ -94,7 +94,7 @@ declare const __VLS_component: import('vue').DefineComponent<
94
94
  value: string
95
95
  }[]
96
96
  mapTagMode: 'single' | 'multiple'
97
- mapConfigParams: Record<string, any>
97
+ mapConfigParams: string
98
98
  },
99
99
  {}
100
100
  >
@@ -40,7 +40,7 @@ export interface LcbListProps extends LcbBlockProps {
40
40
  value: string
41
41
  }[]
42
42
  mapTagMode?: 'single' | 'multiple'
43
- mapConfigParams?: Record<string, any>
43
+ mapConfigParams?: string
44
44
  }
45
45
  export interface Option {
46
46
  label: string
@@ -1,6 +1,7 @@
1
1
  export declare const transformValueUnit: (value?: number | string, uni?: string) => string
2
2
  /** 获取json字符串第一个url */
3
3
  export declare const getJsonStrFirstUrl: (jsonStr?: string) => any
4
+ export declare const getJsonFromStr: (jsonStr?: string) => any
4
5
  /** 获取json字符串列表 */
5
6
  export declare const getJsonStrList: (jsonStr?: string) => any
6
7
  /** 删除其他外部字段 */
@@ -8,6 +8,14 @@ export const getJsonStrFirstUrl = (jsonStr = '[]') => {
8
8
  return json[0]
9
9
  }
10
10
 
11
+ export const getJsonFromStr = (jsonStr = '{}') => {
12
+ try {
13
+ return JSON.parse(jsonStr)
14
+ } catch (error) {
15
+ return {}
16
+ }
17
+ }
18
+
11
19
  /** 获取json字符串列表 */
12
20
  export const getJsonStrList = (jsonStr = '[]') => {
13
21
  return JSON.parse(jsonStr)