lambo-design-bi 0.0.177 → 0.0.178

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.
@@ -25,14 +25,20 @@ export default {
25
25
  },
26
26
  methods: {
27
27
  initConfig() {
28
- this.textList = this.widget.options.textList || []
28
+ let oldTextList = this.widget.options.textList || []
29
+ let newTextList = oldTextList.map(item => ({
30
+ ...item,
31
+ titleStyle: parseStyleString(item.titleStyle),
32
+ valStyle: parseStyleString(item.valStyle)
33
+ }))
34
+ this.textList = newTextList
29
35
  },
30
36
  async doSearch() {
31
37
  if (!this.textList || this.textList.length < 1) {
32
38
  this.$Message.warning("组件[" + this.widget.name + "]未配置全")
33
39
  return false
34
40
  }
35
-
41
+
36
42
  let apiIdArr = this.textList.map(item => item.apiId) || []
37
43
  const promiseArray = apiIdArr.map((apiId, index) => {
38
44
  return getListMapData(apiId, this.params)
@@ -66,6 +72,17 @@ export default {
66
72
  } catch (error) {
67
73
  console.error("文字卡片批量请求异常:", error)
68
74
  }
75
+ },
76
+ parseStyleString(styleStr) {
77
+ if (typeof styleStr === 'string') {
78
+ try {
79
+ return JSON.parse(styleStr)
80
+ } catch (e) {
81
+ console.warn('样式字符串解析失败:', styleStr)
82
+ return {}
83
+ }
84
+ }
85
+ return styleStr || {}
69
86
  }
70
87
  },
71
88
  created() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lambo-design-bi",
3
- "version": "0.0.177",
3
+ "version": "0.0.178",
4
4
  "description": "Vue2 BI 数据可视化组件库",
5
5
  "main": "index.js",
6
6
  "author": "finch",