@xuekl/cli-components 1.2.8 → 1.3.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 +3 -1
- package/XklForm.vue +1 -2
- package/package.json +1 -1
package/XklDict.vue
CHANGED
|
@@ -12,13 +12,15 @@ 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 { baseConfig } from "@xuekl/cli-base/config"
|
|
15
16
|
const props = defineProps(['config'])
|
|
16
17
|
const { config } = props
|
|
17
18
|
const dataList: Ref<{ dictCode: string, dictLabel: string, dictValue: string | number }[]> = ref([])
|
|
18
19
|
|
|
20
|
+
|
|
19
21
|
onBeforeMount(() => {
|
|
20
22
|
http({
|
|
21
|
-
url: http.adornUrl(
|
|
23
|
+
url: http.adornUrl(`${baseConfig.dict_api_url}/${config.dict}`),
|
|
22
24
|
method: 'get',
|
|
23
25
|
params: http.adornParams({})
|
|
24
26
|
}).then(({ data }) => {
|
package/XklForm.vue
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
<template v-for="item in formList" :key="item.prop">
|
|
9
9
|
<el-col :span="item.span" v-if="item.show()">
|
|
10
10
|
<el-form-item :label="item.label" :label-width="item.labelWidth" :prop="item.prop"
|
|
11
|
-
:rules="item.refRules
|
|
11
|
+
:rules="item.refRules">
|
|
12
12
|
<el-input v-if="item.type === 'input'" v-model="form[item.prop]" v-bind="item.element"
|
|
13
13
|
v-on="item.events" :disabled="item.disabled()"></el-input>
|
|
14
14
|
<el-input-number v-else-if="item.type === 'input-number'" v-model="form[item.prop]"
|
|
@@ -78,7 +78,6 @@ import XklDict from './XklDict.vue'
|
|
|
78
78
|
import XklDatePicker from './XklDatePicker.vue'
|
|
79
79
|
import { componentGlobal } from '@xuekl/cli-base/global'
|
|
80
80
|
|
|
81
|
-
import { slice } from 'lodash'
|
|
82
81
|
const props = defineProps(['form'])
|
|
83
82
|
const XklFormRef = ref(null)
|
|
84
83
|
const { form } = props
|