@drax/crud-vue 0.15.7 → 0.16.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/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
|
-
"version": "0.
|
|
6
|
+
"version": "0.16.0",
|
|
7
7
|
"type": "module",
|
|
8
8
|
"main": "./src/index.ts",
|
|
9
9
|
"module": "./src/index.ts",
|
|
@@ -24,10 +24,10 @@
|
|
|
24
24
|
"format": "prettier --write src/"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@drax/common-front": "^0.
|
|
28
|
-
"@drax/crud-front": "^0.
|
|
29
|
-
"@drax/crud-share": "^0.
|
|
30
|
-
"@drax/media-vue": "^0.
|
|
27
|
+
"@drax/common-front": "^0.16.0",
|
|
28
|
+
"@drax/crud-front": "^0.16.0",
|
|
29
|
+
"@drax/crud-share": "^0.16.0",
|
|
30
|
+
"@drax/media-vue": "^0.16.0"
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|
|
33
33
|
"pinia": "^2.2.2",
|
|
@@ -64,5 +64,5 @@
|
|
|
64
64
|
"vue-tsc": "^2.1.10",
|
|
65
65
|
"vuetify": "^3.8.2"
|
|
66
66
|
},
|
|
67
|
-
"gitHead": "
|
|
67
|
+
"gitHead": "a20c6fc879e27add2ebcc7ed90a1b487e5fd8b27"
|
|
68
68
|
}
|
package/src/EntityCrud.ts
CHANGED
|
@@ -117,8 +117,8 @@ class EntityCrud implements IEntityCrud {
|
|
|
117
117
|
get formFilters(): IEntityCrudFormFilter[] {
|
|
118
118
|
return this.filters.map(
|
|
119
119
|
(filter: IEntityCrudFilter) =>
|
|
120
|
-
({field: filter.name, value: null, operator: filter.operator})
|
|
121
|
-
)
|
|
120
|
+
({field: filter.name, value: null, operator: (filter.operator ? filter.operator : 'eq' )})
|
|
121
|
+
) as IEntityCrudFormFilter[]
|
|
122
122
|
}
|
|
123
123
|
|
|
124
124
|
get refs(): IEntityCrudRefs {
|
|
@@ -199,6 +199,10 @@ class EntityCrud implements IEntityCrud {
|
|
|
199
199
|
return '300px'
|
|
200
200
|
}
|
|
201
201
|
|
|
202
|
+
get dialogZindex() {
|
|
203
|
+
return 1999
|
|
204
|
+
}
|
|
205
|
+
|
|
202
206
|
}
|
|
203
207
|
|
|
204
208
|
export default EntityCrud;
|
|
@@ -141,9 +141,9 @@ defineEmits(['updateValue'])
|
|
|
141
141
|
@click:append-inner="show = !show"
|
|
142
142
|
/>
|
|
143
143
|
|
|
144
|
+
|
|
144
145
|
<v-combobox
|
|
145
|
-
v-if="field.type === 'enum'"
|
|
146
|
-
type="text"
|
|
146
|
+
v-if="field.type === 'enum' && !field.noFilter"
|
|
147
147
|
:name="name"
|
|
148
148
|
:label="label"
|
|
149
149
|
:hint="field.hint"
|
|
@@ -163,10 +163,36 @@ defineEmits(['updateValue'])
|
|
|
163
163
|
:append-icon="appendIcon"
|
|
164
164
|
:prepend-inner-icon="prependInnerIcon"
|
|
165
165
|
:append-inner-icon="appendInnerIcon"
|
|
166
|
-
|
|
167
166
|
>
|
|
168
167
|
</v-combobox>
|
|
169
168
|
|
|
169
|
+
|
|
170
|
+
<v-select
|
|
171
|
+
v-if="field.type === 'enum' && field.noFilter"
|
|
172
|
+
:name="name"
|
|
173
|
+
:label="label"
|
|
174
|
+
:hint="field.hint"
|
|
175
|
+
:persistent-hint="field.persistentHint"
|
|
176
|
+
v-model="valueModel"
|
|
177
|
+
:items="field.enum"
|
|
178
|
+
:readonly="readonly"
|
|
179
|
+
:error-messages="inputErrors"
|
|
180
|
+
:density="density"
|
|
181
|
+
:variant="variant"
|
|
182
|
+
:clearable="clearable"
|
|
183
|
+
:hide-details="hideDetails"
|
|
184
|
+
:single-line="singleLine"
|
|
185
|
+
:rules="rules"
|
|
186
|
+
@update:modelValue="$emit('updateValue')"
|
|
187
|
+
:prepend-icon="prependIcon"
|
|
188
|
+
:append-icon="appendIcon"
|
|
189
|
+
:prepend-inner-icon="prependInnerIcon"
|
|
190
|
+
:append-inner-icon="appendInnerIcon"
|
|
191
|
+
>
|
|
192
|
+
</v-select>
|
|
193
|
+
|
|
194
|
+
|
|
195
|
+
|
|
170
196
|
<v-text-field
|
|
171
197
|
v-if="field.type === 'number'"
|
|
172
198
|
type="number"
|
|
@@ -40,11 +40,18 @@ function hasField(key: string): boolean {
|
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
function addItem() {
|
|
43
|
-
|
|
43
|
+
const item = newItem()
|
|
44
|
+
valueModel.value.push(item);
|
|
45
|
+
menuSelect(item, valueModel.value.length - 1)
|
|
44
46
|
}
|
|
45
47
|
|
|
46
48
|
function removeItem(index: number) {
|
|
49
|
+
if (indexSelected.value === index) {
|
|
50
|
+
itemSelected.value = undefined
|
|
51
|
+
indexSelected.value = undefined
|
|
52
|
+
}
|
|
47
53
|
valueModel.value.splice(index, 1);
|
|
54
|
+
|
|
48
55
|
}
|
|
49
56
|
|
|
50
57
|
const label = computed(() => {
|