@xuekl/cli-components 1.3.0 → 1.3.2

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/XklSelect.vue CHANGED
@@ -13,7 +13,7 @@ import { onBeforeMount, ref, Ref, watch } from 'vue'
13
13
  import { SelectItem } from '@xuekl/cli-base/type.d'
14
14
  import http from "@/utils/httpRequest"
15
15
  const props = defineProps(['config', 'list'])
16
- const emit = defineEmits(['update:label'])
16
+ const emit = defineEmits(['update:label', 'loaded'])
17
17
  const { config, list } = props
18
18
 
19
19
  const dataList: Ref<SelectItem[]> = ref([])
@@ -73,6 +73,7 @@ onBeforeMount(() => {
73
73
  params: http.adornParams(doParams())
74
74
  }).then(({ data }) => {
75
75
  dataList.value = handleData(data.data)
76
+ emit('loaded', dataList.value)
76
77
  })
77
78
  }
78
79
  })
package/XklTable.vue CHANGED
@@ -49,6 +49,7 @@ export default {
49
49
  import http from "@/utils/httpRequest"
50
50
  import { computed, ref } from "vue";
51
51
  import moment from 'dayjs'
52
+ import { baseConfig } from "@xuekl/cli-base/config"
52
53
  const props = defineProps(['table'])
53
54
  const { table } = props
54
55
  const dictTypes = table.columns.map(res => res.dict).filter(res => !!res)
@@ -57,7 +58,7 @@ const XklTable = ref(null)
57
58
 
58
59
  dictTypes.forEach((dict: string) => {
59
60
  http({
60
- url: http.adornUrl(`/system/dict/data/type/${dict}`),
61
+ url: http.adornUrl(`${baseConfig.dict_api_url}/${dict}`),
61
62
  method: 'get',
62
63
  params: http.adornParams({})
63
64
  }).then(({ data }) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuekl/cli-components",
3
- "version": "1.3.0",
3
+ "version": "1.3.2",
4
4
  "description": "",
5
5
  "main": "index.ts",
6
6
  "scripts": {