@afeefa/vue-app 0.0.56 → 0.0.57
Sign up to get free protection for your applications and to get access to all the features.
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.57
|
package/package.json
CHANGED
@@ -17,7 +17,9 @@ import { Component, Mixins } from '@a-vue'
|
|
17
17
|
import { ListFilterMixin } from '../ListFilterMixin'
|
18
18
|
import { ListAction } from '@a-vue/api-resources/ApiActions'
|
19
19
|
|
20
|
-
@Component
|
20
|
+
@Component({
|
21
|
+
props: ['itemTitle']
|
22
|
+
})
|
21
23
|
export default class ListFilterSelect extends Mixins(ListFilterMixin) {
|
22
24
|
items = null
|
23
25
|
|
@@ -61,7 +63,7 @@ export default class ListFilterSelect extends Mixins(ListFilterMixin) {
|
|
61
63
|
return [
|
62
64
|
...this.createOptions(),
|
63
65
|
...models.map(model => ({
|
64
|
-
itemTitle: model.name,
|
66
|
+
itemTitle: (this.itemTitle && this.itemTitle(model)) || model.name || model.title,
|
65
67
|
itemValue: model.id
|
66
68
|
}))
|
67
69
|
]
|
@@ -28,6 +28,7 @@
|
|
28
28
|
<a-table-row
|
29
29
|
v-for="model in models_"
|
30
30
|
:key="model.id"
|
31
|
+
:class="getModelClass(model)"
|
31
32
|
>
|
32
33
|
<v-icon
|
33
34
|
v-if="$has.icon"
|
@@ -49,6 +50,7 @@
|
|
49
50
|
<div
|
50
51
|
v-for="model in models_"
|
51
52
|
:key="model.id"
|
53
|
+
:class="getModelClass(model)"
|
52
54
|
>
|
53
55
|
<slot
|
54
56
|
name="model"
|
@@ -73,7 +75,9 @@ import { Component, Watch, Mixins } from '@a-vue'
|
|
73
75
|
import { ListViewMixin } from '@a-vue/components/list/ListViewMixin'
|
74
76
|
import { LoadingEvent } from '@a-vue/events'
|
75
77
|
|
76
|
-
@Component
|
78
|
+
@Component({
|
79
|
+
props: ['modelClass']
|
80
|
+
})
|
77
81
|
export default class ListView extends Mixins(ListViewMixin) {
|
78
82
|
$hasOptions = ['icon']
|
79
83
|
|
@@ -89,6 +93,10 @@ export default class ListView extends Mixins(ListViewMixin) {
|
|
89
93
|
this.$emit('update:isLoading', this.isLoading)
|
90
94
|
}
|
91
95
|
|
96
|
+
getModelClass (model) {
|
97
|
+
return this.modelClass && this.modelClass(model)
|
98
|
+
}
|
99
|
+
|
92
100
|
setFilter (name, value) {
|
93
101
|
this.filters[name].value = value
|
94
102
|
}
|