@houaoran/designer 1.0.3 → 1.0.5
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/dist/components.es.js +24 -15
- package/dist/components.umd.js +4 -4
- package/dist/index.es.js +34 -25
- package/dist/index.umd.js +26 -26
- package/package.json +1 -1
- package/src/components/DictSelect.vue +10 -5
- package/src/config/rule/dictSelect.js +3 -3
- package/src/form/index.js +1 -1
- package/src/locale/zh-cn.js +1 -1
- package/src/utils/dict.js +6 -0
package/package.json
CHANGED
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
</template>
|
|
16
16
|
<script>
|
|
17
17
|
import { defineComponent } from 'vue';
|
|
18
|
+
import { getDictOptions } from '../utils/dict';
|
|
18
19
|
export default defineComponent({
|
|
19
20
|
name: 'DictSelect',
|
|
20
21
|
emits: ['update:modelValue', 'change'],
|
|
@@ -39,12 +40,16 @@ export default defineComponent({
|
|
|
39
40
|
|
|
40
41
|
computed: {
|
|
41
42
|
dictOptions() {
|
|
42
|
-
|
|
43
|
-
console.log(v, 'v');
|
|
44
|
-
const data = JSON.parse(v ?? '{}') ?? {}
|
|
45
|
-
console.log(data, 'data');
|
|
46
|
-
return data[this.dictCode]
|
|
43
|
+
return getDictOptions(this.dictCode)
|
|
47
44
|
},
|
|
45
|
+
value: {
|
|
46
|
+
get() {
|
|
47
|
+
return this.modelValue ?? null
|
|
48
|
+
},
|
|
49
|
+
set(val) {
|
|
50
|
+
this.update(val)
|
|
51
|
+
}
|
|
52
|
+
}
|
|
48
53
|
},
|
|
49
54
|
methods: {
|
|
50
55
|
|
|
@@ -6,7 +6,7 @@ const name = 'dictSelect';
|
|
|
6
6
|
|
|
7
7
|
export default {
|
|
8
8
|
menu: 'main',
|
|
9
|
-
icon: 'icon-
|
|
9
|
+
icon: 'icon-dict',
|
|
10
10
|
label,
|
|
11
11
|
name,
|
|
12
12
|
input: true,
|
|
@@ -32,8 +32,8 @@ export default {
|
|
|
32
32
|
{type: 'input', field: 'dictCode', value: ''},
|
|
33
33
|
{type: 'select', field: 'type', value: 'select', options: [
|
|
34
34
|
{label: '选择器', value: 'select'},
|
|
35
|
-
{label: '
|
|
36
|
-
{label: '
|
|
35
|
+
{label: '多选', value: 'checkbox'},
|
|
36
|
+
{label: '单选', value: 'radio'},
|
|
37
37
|
]},
|
|
38
38
|
]);
|
|
39
39
|
},
|
package/src/form/index.js
CHANGED
|
@@ -5,7 +5,7 @@ import SignaturePad from '../components/SignaturePad.vue';
|
|
|
5
5
|
import TableForm from '../components/tableForm/TableForm.vue';
|
|
6
6
|
import Table from '../components/table/Table.vue';
|
|
7
7
|
import InputRange from '../components/InputRange.vue';
|
|
8
|
-
import DictSelect from '../components/
|
|
8
|
+
import DictSelect from '../components/DictSelect.vue';
|
|
9
9
|
import '../style/icon.css';
|
|
10
10
|
|
|
11
11
|
const install = (formCreate) => {
|
package/src/locale/zh-cn.js
CHANGED