@xuekl/cli-components 1.3.9 → 1.4.0
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/XklDict.vue +2 -2
- package/XklTable.vue +5 -5
- package/index.ts +15 -0
- package/package.json +1 -1
package/XklDict.vue
CHANGED
|
@@ -12,7 +12,7 @@ export default {
|
|
|
12
12
|
<script setup lang="ts">
|
|
13
13
|
import { ref, onBeforeMount, Ref } from 'vue'
|
|
14
14
|
import http from "@/utils/httpRequest"
|
|
15
|
-
import {
|
|
15
|
+
import { baseConf } from './index'
|
|
16
16
|
const props = defineProps(['config'])
|
|
17
17
|
const emit = defineEmits(['update:label', 'loaded'])
|
|
18
18
|
|
|
@@ -28,7 +28,7 @@ const changeHandle = (val: string) => {
|
|
|
28
28
|
|
|
29
29
|
onBeforeMount(() => {
|
|
30
30
|
http({
|
|
31
|
-
url: http.adornUrl(`${
|
|
31
|
+
url: http.adornUrl(`${baseConf.dict_api_url}${config.dict}`),
|
|
32
32
|
method: 'get',
|
|
33
33
|
params: http.adornParams({})
|
|
34
34
|
}).then(({ data }) => {
|
package/XklTable.vue
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<el-table ref="XklTable" :data="table.list" style="width: 100%"
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
<el-table ref="XklTable" :data="table.list" style="width: 100%"
|
|
3
|
+
:header-cell-style="table.headerCellStyle || tableConf.headerCellStyle"
|
|
4
|
+
:header-cell-class-name="table.headerCellClassName" :cell-class-name="table.cellClassName">
|
|
5
5
|
<el-table-column v-if="table.selection" v-bind="table.selectionConfig" type="selection"
|
|
6
6
|
align="center"></el-table-column>
|
|
7
7
|
<el-table-column v-if="table.index" type="index" align="center" v-bind="table.indexConfig"></el-table-column>
|
|
@@ -49,7 +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 {
|
|
52
|
+
import { baseConf, tableConf } from './index'
|
|
53
53
|
const props = defineProps(['table'])
|
|
54
54
|
const { table } = props
|
|
55
55
|
const dictTypes = table.columns.map(res => res.dict).filter(res => !!res)
|
|
@@ -58,7 +58,7 @@ const XklTable = ref(null)
|
|
|
58
58
|
|
|
59
59
|
dictTypes.forEach((dict: string) => {
|
|
60
60
|
http({
|
|
61
|
-
url: http.adornUrl(`${
|
|
61
|
+
url: http.adornUrl(`${baseConf.dict_api_url}${dict}`),
|
|
62
62
|
method: 'get',
|
|
63
63
|
params: http.adornParams({})
|
|
64
64
|
}).then(({ data }) => {
|
package/index.ts
CHANGED
|
@@ -11,6 +11,11 @@ import XklTable from './XklTable.vue'
|
|
|
11
11
|
import XklTree from './XklTree.vue'
|
|
12
12
|
import XklTreeSelect from './XklTreeSelect.vue'
|
|
13
13
|
import XklUpload from './XklUpload.vue'
|
|
14
|
+
import allConfig from '@xuekl/cli-base/config'
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
const baseConf = allConfig.base
|
|
18
|
+
const { button, form, formInfo, dict, select, treeSelect, table, datePicker, upload } = allConfig.components
|
|
14
19
|
|
|
15
20
|
export {
|
|
16
21
|
ContextMenu,
|
|
@@ -26,4 +31,14 @@ export {
|
|
|
26
31
|
XklTree,
|
|
27
32
|
XklTreeSelect,
|
|
28
33
|
XklUpload,
|
|
34
|
+
baseConf,
|
|
35
|
+
button as buttonConf,
|
|
36
|
+
form as formConf,
|
|
37
|
+
formInfo as formInfoConf,
|
|
38
|
+
dict as dictConf,
|
|
39
|
+
select as selectConf,
|
|
40
|
+
treeSelect as treeSelectConf,
|
|
41
|
+
table as tableConf,
|
|
42
|
+
datePicker as datePickerConf,
|
|
43
|
+
upload as uploadConf
|
|
29
44
|
}
|