@xuekl/cli-components 1.5.5 → 1.5.6

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.
Files changed (2) hide show
  1. package/XklTable.vue +4 -4
  2. package/package.json +1 -1
package/XklTable.vue CHANGED
@@ -58,7 +58,7 @@ import { baseConf, tableConf } from './index'
58
58
  const props = defineProps(['table'])
59
59
  const { table } = props
60
60
  const dictTypes = table.columns.map(res => res.dict).filter(res => !!res)
61
- const dictStore = {}
61
+ const dictStore = ref({})
62
62
  const XklTable = ref(null)
63
63
  table.element = table.element || {}
64
64
 
@@ -73,14 +73,14 @@ dictTypes.forEach((dict: string) => {
73
73
  method: 'get',
74
74
  params: http.adornParams({})
75
75
  }).then(({ data }) => {
76
- dictStore[dict] = data.data
76
+ dictStore.value[dict] = data.data
77
77
  })
78
78
  })
79
79
 
80
80
  const dictLabel = computed(() => {
81
81
  return function (col: any, row: any) {
82
- if (dictStore[col.dict]) {
83
- const item = dictStore[col.dict].find(res => res.dictValue == row[col.prop]) || {}
82
+ if (dictStore.value[col.dict]) {
83
+ const item = dictStore.value[col.dict].find(res => res.dictValue == row[col.prop]) || {}
84
84
  return item.dictLabel
85
85
  }
86
86
  return ''
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuekl/cli-components",
3
- "version": "1.5.5",
3
+ "version": "1.5.6",
4
4
  "description": "",
5
5
  "main": "index.ts",
6
6
  "scripts": {