@drax/crud-vue 0.8.9 → 0.8.11
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/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
|
-
"version": "0.8.
|
|
6
|
+
"version": "0.8.11",
|
|
7
7
|
"type": "module",
|
|
8
8
|
"main": "./src/index.ts",
|
|
9
9
|
"module": "./src/index.ts",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"@drax/common-front": "^0.8.3",
|
|
28
|
-
"@drax/crud-front": "^0.8.
|
|
28
|
+
"@drax/crud-front": "^0.8.11",
|
|
29
29
|
"@drax/crud-share": "^0.8.5",
|
|
30
30
|
"@drax/media-vue": "^0.8.3"
|
|
31
31
|
},
|
|
@@ -64,5 +64,5 @@
|
|
|
64
64
|
"vue-tsc": "^2.0.11",
|
|
65
65
|
"vuetify": "^3.7.1"
|
|
66
66
|
},
|
|
67
|
-
"gitHead": "
|
|
67
|
+
"gitHead": "4ba79d10dcadfa6756f4412fff37cec1fe9a0caf"
|
|
68
68
|
}
|
|
@@ -25,6 +25,7 @@ const {index, entity, field, disableRules, parentField} = defineProps({
|
|
|
25
25
|
readonly: {type: Boolean, default: false},
|
|
26
26
|
hideDetails: {type: Boolean, default: false},
|
|
27
27
|
singleLine: {type: Boolean, default: false},
|
|
28
|
+
multiple: {type: Boolean, default: false},
|
|
28
29
|
clearable: {type: Boolean, default: false},
|
|
29
30
|
disableRules: {type: Boolean, default: false},
|
|
30
31
|
parentField: {type: String, default: null, required: false},
|
|
@@ -154,6 +155,7 @@ defineEmits(['updateValue'])
|
|
|
154
155
|
:append-icon="appendIcon"
|
|
155
156
|
:prepend-inner-icon="prependInnerIcon"
|
|
156
157
|
:append-inner-icon="appendInnerIcon"
|
|
158
|
+
|
|
157
159
|
>
|
|
158
160
|
</v-combobox>
|
|
159
161
|
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import type
|
|
2
|
+
import {computed, type PropType} from "vue";
|
|
3
3
|
import CrudFormField from "./CrudFormField.vue";
|
|
4
4
|
import type {IEntityCrud, IEntityCrudField} from "@drax/crud-share";
|
|
5
|
+
import {useI18n} from "vue-i18n";
|
|
5
6
|
|
|
7
|
+
const {t, te} = useI18n()
|
|
6
8
|
const valueModel = defineModel({type: Array, default: () => []});
|
|
7
9
|
|
|
8
|
-
const {field} = defineProps({
|
|
10
|
+
const {field, entity} = defineProps({
|
|
9
11
|
entity: {type: Object as PropType<IEntityCrud>, required: true},
|
|
10
12
|
field: {type: Object as PropType<IEntityCrudField>, required: true},
|
|
11
13
|
readonly: {type: Boolean, default: false},
|
|
@@ -42,6 +44,11 @@ function removeItem(index: number) {
|
|
|
42
44
|
valueModel.value.splice(index, 1);
|
|
43
45
|
}
|
|
44
46
|
|
|
47
|
+
const label = computed(() => {
|
|
48
|
+
const i18n = `${entity.name.toLowerCase()}.field.${field.label ? field.label : field.name}`
|
|
49
|
+
return te(i18n) ? t(i18n) : field.label
|
|
50
|
+
})
|
|
51
|
+
|
|
45
52
|
defineEmits(['updateValue'])
|
|
46
53
|
|
|
47
54
|
</script>
|
|
@@ -49,7 +56,7 @@ defineEmits(['updateValue'])
|
|
|
49
56
|
<template>
|
|
50
57
|
<v-card class="mt-3" variant="flat" border>
|
|
51
58
|
|
|
52
|
-
<v-card-title class="text-h5">{{
|
|
59
|
+
<v-card-title class="text-h5">{{ label }}</v-card-title>
|
|
53
60
|
<v-card-text>
|
|
54
61
|
<v-expansion-panels>
|
|
55
62
|
<v-expansion-panel v-for="(item,index) in valueModel" :key="index">
|