@afeefa/vue-app 0.0.53 → 0.0.56
Sign up to get free protection for your applications and to get access to all the features.
- package/.afeefa/package/release/version.txt +1 -1
- package/package.json +3 -10
- package/src/api-resources/ApiActions.js +31 -0
- package/src/components/AAlert.vue +1 -1
- package/src/components/AAutocomplete.vue +1 -1
- package/src/components/ABadge.vue +1 -1
- package/src/components/ABreadcrumbs.vue +1 -1
- package/src/components/ACheckbox.vue +35 -0
- package/src/components/AContextMenu.vue +2 -2
- package/src/components/AContextMenuItem.vue +2 -2
- package/src/components/ADatePicker.vue +1 -1
- package/src/components/ADialog.vue +3 -1
- package/src/components/AGrid.vue +2 -1
- package/src/components/AIcon.vue +1 -1
- package/src/components/AIconButton.vue +1 -1
- package/src/components/ALoadingIndicator.vue +1 -1
- package/src/components/AModal.vue +1 -1
- package/src/components/APagination.vue +1 -1
- package/src/components/ARadioGroup.vue +1 -1
- package/src/components/ARichTextArea.vue +257 -0
- package/src/components/ARow.vue +1 -1
- package/src/components/ASaveIndicator.vue +1 -1
- package/src/components/ASearchSelect.vue +34 -18
- package/src/components/ASelect.vue +1 -1
- package/src/components/ATable.vue +1 -1
- package/src/components/ATableHeader.vue +1 -1
- package/src/components/ATableRow.vue +1 -1
- package/src/components/ATextArea.vue +1 -1
- package/src/components/ATextField.vue +1 -1
- package/src/components/form/EditForm.vue +2 -6
- package/src/components/form/EditModal.vue +23 -18
- package/src/components/form/FormFieldMixin.js +2 -3
- package/src/components/form/fields/FormFieldCheckbox.vue +18 -0
- package/src/components/form/fields/FormFieldDate.vue +1 -1
- package/src/components/form/fields/FormFieldRadioGroup.vue +1 -1
- package/src/components/form/fields/FormFieldRichTextArea.vue +14 -0
- package/src/components/form/fields/FormFieldSearchSelect.vue +1 -1
- package/src/components/form/fields/FormFieldSelect.vue +1 -1
- package/src/components/form/fields/FormFieldSelect2.vue +1 -1
- package/src/components/form/fields/FormFieldText.vue +1 -1
- package/src/components/form/fields/FormFieldTextArea.vue +1 -1
- package/src/components/index.js +4 -0
- package/src/components/list/ListFilterMixin.js +1 -1
- package/src/components/list/ListFilterRow.vue +1 -1
- package/src/components/list/ListViewMixin.js +7 -4
- package/src/components/list/filters/ListFilterPage.vue +1 -1
- package/src/components/list/filters/ListFilterSearch.vue +1 -1
- package/src/components/list/filters/ListFilterSelect.vue +1 -1
- package/src/components/mixins/ClickOutsideMixin.js +1 -1
- package/src/components/mixins/ComponentWidthMixin.js +1 -1
- package/src/components/search-select/SearchSelectFilters.vue +1 -1
- package/src/components/search-select/SearchSelectList.vue +13 -3
- package/src/components/vue/Component.js +46 -0
- package/src/index.js +4 -0
- package/src/plugins/api-resources/ApiResourcesPlugin.js +12 -0
- package/src/plugins/route-config/RouteConfigPlugin.js +25 -1
- package/src/services/escape/CancelOnEscMixin.js +1 -1
- package/src/services/position/UsesPositionServiceMixin.js +1 -1
- package/src/styles/forms.scss +8 -0
- package/src/styles/vue-app.scss +1 -0
- package/src-admin/bootstrap.js +2 -5
- package/src-admin/components/App.vue +1 -1
- package/src-admin/components/NotFound.vue +65 -0
- package/src-admin/components/SidebarMenu.vue +1 -1
- package/src-admin/components/Splash.vue +34 -34
- package/src-admin/components/Start.vue +2 -2
- package/src-admin/components/app/AppBarButton.vue +1 -1
- package/src-admin/components/app/AppBarButtons.vue +1 -1
- package/src-admin/components/app/AppBarTitle.vue +1 -1
- package/src-admin/components/app/AppBarTitleContainer.vue +1 -1
- package/src-admin/components/controls/SearchSelectFormField.vue +223 -0
- package/src-admin/components/detail/DetailProperty.vue +2 -4
- package/src-admin/components/list/ListColumnHeader.vue +5 -4
- package/src-admin/components/list/ListTitle.vue +1 -1
- package/src-admin/components/list/ListView.vue +12 -10
- package/src-admin/components/menu/SidebarMenuItem.vue +1 -1
- package/src-admin/components/model/ModelCount.vue +1 -1
- package/src-admin/components/model/ModelIcon.vue +1 -1
- package/src-admin/components/pages/CreatePage.vue +2 -3
- package/src-admin/components/pages/DetailPage.vue +4 -4
- package/src-admin/components/pages/EditPage.vue +5 -6
- package/src-admin/components/pages/EditPageMixin.js +1 -1
- package/src-admin/components/pages/ListPage.vue +3 -4
- package/src-admin/components/routes/CreateRoute.vue +1 -1
- package/src-admin/components/routes/DetailRoute.vue +4 -4
- package/src-admin/components/routes/EditRoute.vue +4 -4
- package/src-admin/components/routes/ListRoute.vue +4 -4
- package/src-admin/config/vuetify.js +3 -1
- package/src-admin/models/Model.js +13 -0
- package/src-admin/models/ModelAdminConfig.js +20 -0
- package/src-components/AMdiIcon.vue +18 -0
- package/src/utils/props-helper.js +0 -21
@@ -121,7 +121,8 @@ class RouteConfigPlugin {
|
|
121
121
|
this._promise = this._promise.then(() => {
|
122
122
|
callback = callback({
|
123
123
|
ROUTESET: this.routeSet,
|
124
|
-
ROUTE: this.route
|
124
|
+
ROUTE: this.route,
|
125
|
+
GETROUTE: this.getRoute
|
125
126
|
})
|
126
127
|
|
127
128
|
if (!(callback instanceof Promise)) {
|
@@ -290,6 +291,29 @@ class RouteConfigPlugin {
|
|
290
291
|
return new RouteSetDefinition(options).getDefinitions()
|
291
292
|
}
|
292
293
|
|
294
|
+
getRoute = (name, component) => {
|
295
|
+
switch (name) {
|
296
|
+
case 'notfound':
|
297
|
+
return this.route({
|
298
|
+
path: '/:pathMatch(.*)*',
|
299
|
+
name: 'notfound',
|
300
|
+
ignoreBreadcrumb: true,
|
301
|
+
component: component || {
|
302
|
+
template: '<div>Not found</div>'
|
303
|
+
}
|
304
|
+
})
|
305
|
+
case 'auth':
|
306
|
+
return this.route({
|
307
|
+
path: '/auth2',
|
308
|
+
name: 'auth',
|
309
|
+
ignoreBreadcrumb: true,
|
310
|
+
component: {
|
311
|
+
template: '<div>Auth</div>'
|
312
|
+
}
|
313
|
+
})
|
314
|
+
}
|
315
|
+
}
|
316
|
+
|
293
317
|
breadcrumb = options => {
|
294
318
|
options.config = {
|
295
319
|
...this._config,
|
@@ -0,0 +1 @@
|
|
1
|
+
@import "forms";
|
package/src-admin/bootstrap.js
CHANGED
@@ -4,7 +4,6 @@ import './config/components'
|
|
4
4
|
import { apiResourcesPlugin } from '@a-vue/plugins/api-resources/ApiResourcesPlugin'
|
5
5
|
import { hasOptionsPlugin } from '@a-vue/plugins/has-options/HasOptionsPlugin'
|
6
6
|
import { timeout } from '@a-vue/utils/timeout'
|
7
|
-
import { apiResources } from '@afeefa/api-resources-client'
|
8
7
|
import Vue from 'vue'
|
9
8
|
|
10
9
|
import { appConfig } from './config/AppConfig'
|
@@ -17,9 +16,7 @@ Vue.use(hasOptionsPlugin)
|
|
17
16
|
Vue.config.productionTip = false
|
18
17
|
|
19
18
|
export async function bootstrap ({ apis, models, routing, authService, app, components }) {
|
20
|
-
|
21
|
-
.registerModels(models)
|
22
|
-
.registerApis(apis)
|
19
|
+
apiResourcesPlugin.register(models, apis)
|
23
20
|
|
24
21
|
appConfig.authService = authService
|
25
22
|
appConfig.app = app
|
@@ -36,7 +33,7 @@ export async function bootstrap ({ apis, models, routing, authService, app, comp
|
|
36
33
|
|
37
34
|
routing(routeConfigPlugin)
|
38
35
|
const router = await routeConfigPlugin.getRouter()
|
39
|
-
await
|
36
|
+
await apiResourcesPlugin.schemasLoaded()
|
40
37
|
|
41
38
|
if (authService) {
|
42
39
|
authService.initApp(router)
|
@@ -136,7 +136,7 @@
|
|
136
136
|
</template>
|
137
137
|
|
138
138
|
<script>
|
139
|
-
import { Component, Vue, Watch } from 'vue
|
139
|
+
import { Component, Vue, Watch } from '@a-vue'
|
140
140
|
import { LoadingEvent } from '@a-vue/events'
|
141
141
|
import { appConfig } from '@a-admin/config/AppConfig'
|
142
142
|
import { sleep } from '@a-vue/utils/timeout'
|
@@ -0,0 +1,65 @@
|
|
1
|
+
<template>
|
2
|
+
<div class="notFound">
|
3
|
+
<a-row
|
4
|
+
vertical
|
5
|
+
center
|
6
|
+
class="content"
|
7
|
+
>
|
8
|
+
<div class="logo">
|
9
|
+
<slot />
|
10
|
+
</div>
|
11
|
+
|
12
|
+
<a-row
|
13
|
+
vertical
|
14
|
+
center
|
15
|
+
>
|
16
|
+
<div class="mt-0">
|
17
|
+
{{ title || '404 - Not Found' }}
|
18
|
+
</div>
|
19
|
+
|
20
|
+
<div class="mt-4">
|
21
|
+
<router-link :to="backlink || { path: '/'}">
|
22
|
+
{{ backlinkTitle || 'Zurück' }}
|
23
|
+
</router-link>
|
24
|
+
</div>
|
25
|
+
</a-row>
|
26
|
+
</a-row>
|
27
|
+
</div>
|
28
|
+
</template>
|
29
|
+
|
30
|
+
|
31
|
+
<script>
|
32
|
+
import { Component, Vue } from '@a-vue'
|
33
|
+
|
34
|
+
@Component({
|
35
|
+
name: 'adminNotFound',
|
36
|
+
props: ['title', 'backlink', 'backlinkTitle']
|
37
|
+
})
|
38
|
+
export default class NotFound extends Vue {
|
39
|
+
created () {
|
40
|
+
this.$parent.$emit('appLoaded')
|
41
|
+
}
|
42
|
+
}
|
43
|
+
</script>
|
44
|
+
|
45
|
+
<style lang="scss" scoped>
|
46
|
+
.notFound {
|
47
|
+
position: fixed;
|
48
|
+
top: 0;
|
49
|
+
left: 0;
|
50
|
+
width: 100vw;
|
51
|
+
height: 100vh;
|
52
|
+
}
|
53
|
+
|
54
|
+
.content {
|
55
|
+
position: absolute;
|
56
|
+
top: 50%;
|
57
|
+
left: 50%;
|
58
|
+
min-height: 50vh;
|
59
|
+
transform: translate(-50%, -50%);
|
60
|
+
}
|
61
|
+
|
62
|
+
.logo {
|
63
|
+
margin-bottom: 2rem;
|
64
|
+
}
|
65
|
+
</style>
|
@@ -1,41 +1,37 @@
|
|
1
1
|
<template>
|
2
2
|
<v-app class="splash">
|
3
|
-
<
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
d-flex
|
8
|
-
align-center
|
9
|
-
justify-center
|
3
|
+
<a-row
|
4
|
+
vertical
|
5
|
+
center
|
6
|
+
class="content"
|
10
7
|
>
|
11
|
-
<div>
|
12
|
-
<
|
13
|
-
|
14
|
-
</div>
|
8
|
+
<div class="logo">
|
9
|
+
<slot />
|
10
|
+
</div>
|
15
11
|
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
12
|
+
<a-row
|
13
|
+
vertical
|
14
|
+
center
|
15
|
+
fullWidth
|
16
|
+
>
|
17
|
+
<v-progress-linear
|
18
|
+
:size="45"
|
19
|
+
:width="6"
|
20
|
+
indeterminate
|
21
|
+
:color="color || 'green'"
|
22
|
+
/>
|
26
23
|
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
</v-container>
|
24
|
+
<div class="mt-4">
|
25
|
+
{{ title || 'Lade App ...' }}
|
26
|
+
</div>
|
27
|
+
</a-row>
|
28
|
+
</a-row>
|
33
29
|
</v-app>
|
34
30
|
</template>
|
35
31
|
|
36
32
|
|
37
33
|
<script>
|
38
|
-
import { Component, Vue } from 'vue
|
34
|
+
import { Component, Vue } from '@a-vue'
|
39
35
|
|
40
36
|
@Component({
|
41
37
|
props: ['title', 'color']
|
@@ -47,20 +43,24 @@ export default class Splash extends Vue {
|
|
47
43
|
}
|
48
44
|
</script>
|
49
45
|
|
50
|
-
|
51
46
|
<style lang="scss" scoped>
|
52
47
|
.splash {
|
53
|
-
position:
|
48
|
+
position: fixed;
|
54
49
|
top: 0;
|
55
50
|
left: 0;
|
56
51
|
width: 100vw;
|
52
|
+
height: 100vh;
|
57
53
|
}
|
58
54
|
|
59
|
-
.
|
60
|
-
|
55
|
+
.content {
|
56
|
+
position: absolute;
|
57
|
+
top: 50%;
|
58
|
+
left: 50%;
|
59
|
+
min-height: 50vh;
|
60
|
+
transform: translate(-50%, -50%);
|
61
61
|
}
|
62
62
|
|
63
|
-
.
|
64
|
-
|
63
|
+
.logo {
|
64
|
+
margin-bottom: 2rem;
|
65
65
|
}
|
66
66
|
</style>
|
@@ -6,12 +6,12 @@
|
|
6
6
|
</template>
|
7
7
|
|
8
8
|
<script>
|
9
|
-
import { Component, Vue } from 'vue
|
9
|
+
import { Component, Vue } from '@a-vue'
|
10
10
|
|
11
11
|
@Component({
|
12
12
|
props: ['splash']
|
13
13
|
})
|
14
|
-
export default class
|
14
|
+
export default class Start extends Vue {
|
15
15
|
appLoaded () {
|
16
16
|
this.splash.$destroy()
|
17
17
|
}
|
@@ -0,0 +1,223 @@
|
|
1
|
+
<template>
|
2
|
+
<div>
|
3
|
+
<a-table
|
4
|
+
v-if="selectedItems.length"
|
5
|
+
:style="selectedWidthStyle"
|
6
|
+
>
|
7
|
+
<a-table-header
|
8
|
+
v-if="hasHeader"
|
9
|
+
small
|
10
|
+
>
|
11
|
+
<div
|
12
|
+
v-for="(column, index) in selectedColumns"
|
13
|
+
:key="index"
|
14
|
+
>
|
15
|
+
{{ column.header }}
|
16
|
+
</div>
|
17
|
+
</a-table-header>
|
18
|
+
|
19
|
+
<a-table-row
|
20
|
+
v-for="(item, index) in selectedItems"
|
21
|
+
:key="item.id"
|
22
|
+
:selected="isClicked(item)"
|
23
|
+
>
|
24
|
+
<template v-for="(column, index2) in selectedColumns">
|
25
|
+
<v-icon
|
26
|
+
v-if="column.icon"
|
27
|
+
:key="'icon' + index2"
|
28
|
+
:color="column.icon.color"
|
29
|
+
class="selectedIcon"
|
30
|
+
size="1.5rem"
|
31
|
+
v-text="column.icon.icon"
|
32
|
+
/>
|
33
|
+
|
34
|
+
<div
|
35
|
+
v-else
|
36
|
+
:key="'text' + index2"
|
37
|
+
class="selectedContent"
|
38
|
+
>
|
39
|
+
{{ column.text(item) }}
|
40
|
+
</div>
|
41
|
+
</template>
|
42
|
+
|
43
|
+
<div>
|
44
|
+
<a-context-menu
|
45
|
+
:ref="'editItem' + index"
|
46
|
+
@open="clickedItem = item"
|
47
|
+
@close="clickedItem = null"
|
48
|
+
>
|
49
|
+
<a-context-menu-item @click="removeItem(item, index)">
|
50
|
+
<v-icon>$trashCanIcon</v-icon>
|
51
|
+
Löschen
|
52
|
+
</a-context-menu-item>
|
53
|
+
</a-context-menu>
|
54
|
+
</div>
|
55
|
+
</a-table-row>
|
56
|
+
</a-table>
|
57
|
+
|
58
|
+
<div v-else>
|
59
|
+
{{ isEmptyText }}
|
60
|
+
</div>
|
61
|
+
|
62
|
+
<a-search-select
|
63
|
+
:listViewConfig="selectableConfig.listViewConfig"
|
64
|
+
:loadOnlyIfKeyword="false"
|
65
|
+
:selectedItems="selectableSelectedItems"
|
66
|
+
:width="selectableWidth"
|
67
|
+
@select="addItem"
|
68
|
+
>
|
69
|
+
<template #activator>
|
70
|
+
<a-icon-button
|
71
|
+
icon="$plusIcon"
|
72
|
+
:text="selectableConfig.addButtonTitle || 'Hinzufügen'"
|
73
|
+
class="mt-4"
|
74
|
+
/>
|
75
|
+
</template>
|
76
|
+
|
77
|
+
<template #filters>
|
78
|
+
<list-filter-row>
|
79
|
+
<list-filter-search
|
80
|
+
:focus="true"
|
81
|
+
maxWidth="100%"
|
82
|
+
label="Suche Berater:in"
|
83
|
+
/>
|
84
|
+
|
85
|
+
<list-filter-page
|
86
|
+
:has="{page_size: false, page_number: true}"
|
87
|
+
:totalVisible="0"
|
88
|
+
/>
|
89
|
+
</list-filter-row>
|
90
|
+
</template>
|
91
|
+
|
92
|
+
<template #row="{ model, on }">
|
93
|
+
<template
|
94
|
+
v-for="(column, index) in selectableColumns"
|
95
|
+
v-on="on"
|
96
|
+
>
|
97
|
+
<v-icon
|
98
|
+
v-if="column.icon"
|
99
|
+
:key="'icon' + index"
|
100
|
+
:color="column.icon.color"
|
101
|
+
class="selectableIcon"
|
102
|
+
size="1.5rem"
|
103
|
+
v-on="on"
|
104
|
+
v-text="column.icon.icon"
|
105
|
+
/>
|
106
|
+
|
107
|
+
<div
|
108
|
+
v-else
|
109
|
+
:key="'text' + index"
|
110
|
+
class="selectableContent"
|
111
|
+
v-on="on"
|
112
|
+
>
|
113
|
+
{{ column.text(model) }}
|
114
|
+
</div>
|
115
|
+
</template>
|
116
|
+
</template>
|
117
|
+
</a-search-select>
|
118
|
+
</div>
|
119
|
+
</template>
|
120
|
+
|
121
|
+
|
122
|
+
<script>
|
123
|
+
import { Component, Vue } from '@a-vue'
|
124
|
+
|
125
|
+
@Component({
|
126
|
+
props: [
|
127
|
+
'value',
|
128
|
+
'selectedConfig',
|
129
|
+
'selectedWidth',
|
130
|
+
'selectableConfig',
|
131
|
+
'selectableWidth'
|
132
|
+
]
|
133
|
+
})
|
134
|
+
export default class SearchSelectFormField extends Vue {
|
135
|
+
clickedItem = null
|
136
|
+
|
137
|
+
get hasHeader () {
|
138
|
+
return this.selectedColumns.some(c => !!c.header)
|
139
|
+
}
|
140
|
+
|
141
|
+
get selectedItems () {
|
142
|
+
return this.value
|
143
|
+
}
|
144
|
+
|
145
|
+
get selectableSelectedItems () {
|
146
|
+
return this.value.map(this.selectedConfig.selectedToSelectableItem)
|
147
|
+
}
|
148
|
+
|
149
|
+
get isEmptyText () {
|
150
|
+
return this.selectedConfig.isEmptyText
|
151
|
+
}
|
152
|
+
|
153
|
+
isClicked (selectedItem) {
|
154
|
+
return selectedItem === this.clickedItem
|
155
|
+
}
|
156
|
+
|
157
|
+
get selectedColumns () {
|
158
|
+
return this.selectedConfig.columns
|
159
|
+
}
|
160
|
+
|
161
|
+
get selectableColumns () {
|
162
|
+
return this.selectableConfig.columns
|
163
|
+
}
|
164
|
+
|
165
|
+
addItem (selectableItem) {
|
166
|
+
const selectedItem = this.selectedConfig.newSelectedItem(selectableItem)
|
167
|
+
const selectedItems = [...this.value, selectedItem]
|
168
|
+
if (this.$listeners.add) {
|
169
|
+
this.$emit('add', selectedItems)
|
170
|
+
} else {
|
171
|
+
this.$emit('input', selectedItems)
|
172
|
+
}
|
173
|
+
}
|
174
|
+
|
175
|
+
async removeItem (selectedItem, rowIndex) {
|
176
|
+
const removeDialog = this.selectedConfig.removeDialog(selectedItem)
|
177
|
+
const dialog = {
|
178
|
+
anchor: this.$refs['editItem' + rowIndex], // is array [component]
|
179
|
+
...removeDialog,
|
180
|
+
yesButton: 'Löschen',
|
181
|
+
yesColor: 'red white--text'
|
182
|
+
}
|
183
|
+
|
184
|
+
const selectedItems = this.value.filter(i => i !== selectedItem)
|
185
|
+
if (this.$listeners.remove) {
|
186
|
+
this.$emit('remove', selectedItems, dialog)
|
187
|
+
} else {
|
188
|
+
this.$emit('input', selectedItems)
|
189
|
+
}
|
190
|
+
}
|
191
|
+
|
192
|
+
get selectedWidthStyle () {
|
193
|
+
if (!this.selectedWidth) {
|
194
|
+
return ''
|
195
|
+
}
|
196
|
+
|
197
|
+
let width = this.selectedWidth
|
198
|
+
if (!isNaN(width)) {
|
199
|
+
width = width + 'px'
|
200
|
+
}
|
201
|
+
return `width: ${width};`
|
202
|
+
}
|
203
|
+
}
|
204
|
+
</script>
|
205
|
+
|
206
|
+
|
207
|
+
<style scoped lang="scss">
|
208
|
+
.selectedIcon::v-deep {
|
209
|
+
padding-right: .3rem !important;
|
210
|
+
}
|
211
|
+
|
212
|
+
.selectableIcon::v-deep {
|
213
|
+
padding-right: 2rem !important;
|
214
|
+
}
|
215
|
+
|
216
|
+
.selectedContent::v-deep {
|
217
|
+
width: 100%;
|
218
|
+
}
|
219
|
+
|
220
|
+
.selectableContent::v-deep {
|
221
|
+
width: 100%;
|
222
|
+
}
|
223
|
+
</style>
|
@@ -24,8 +24,7 @@
|
|
24
24
|
|
25
25
|
|
26
26
|
<script>
|
27
|
-
import { Component, Vue } from 'vue
|
28
|
-
import { apiResources } from '@afeefa/api-resources-client'
|
27
|
+
import { Component, Vue } from '@a-vue'
|
29
28
|
|
30
29
|
@Component({
|
31
30
|
props: ['icon', 'iconModelType', 'label']
|
@@ -37,7 +36,7 @@ export default class DetailProperty extends Vue {
|
|
37
36
|
}
|
38
37
|
|
39
38
|
if (this.iconModelType) {
|
40
|
-
const ModelClass = apiResources.getModelClass(this.iconModelType)
|
39
|
+
const ModelClass = this.$apiResources.getModelClass(this.iconModelType)
|
41
40
|
return ModelClass.icon
|
42
41
|
}
|
43
42
|
}
|
@@ -77,6 +76,5 @@ export default class DetailProperty extends Vue {
|
|
77
76
|
padding-left: 55px;
|
78
77
|
}
|
79
78
|
}
|
80
|
-
|
81
79
|
}
|
82
80
|
</style>
|
@@ -4,9 +4,10 @@
|
|
4
4
|
:class="['content', {order}]"
|
5
5
|
@click="toggleSort"
|
6
6
|
>
|
7
|
-
<div
|
8
|
-
|
9
|
-
|
7
|
+
<div
|
8
|
+
:class="['text', {active}]"
|
9
|
+
v-html="text"
|
10
|
+
/>
|
10
11
|
|
11
12
|
<svg
|
12
13
|
v-if="order"
|
@@ -21,7 +22,7 @@
|
|
21
22
|
|
22
23
|
|
23
24
|
<script>
|
24
|
-
import { Component, Vue } from 'vue
|
25
|
+
import { Component, Vue } from '@a-vue'
|
25
26
|
|
26
27
|
@Component({
|
27
28
|
props: ['text', 'order']
|
@@ -9,7 +9,15 @@
|
|
9
9
|
</div>
|
10
10
|
|
11
11
|
<template v-if="models_.length">
|
12
|
-
<template v-if="
|
12
|
+
<template v-if="$scopedSlots.models">
|
13
|
+
<slot
|
14
|
+
name="models"
|
15
|
+
:models="models_"
|
16
|
+
:setFilter="setFilter"
|
17
|
+
/>
|
18
|
+
</template>
|
19
|
+
|
20
|
+
<template v-else-if="$scopedSlots['model-table']">
|
13
21
|
<a-table>
|
14
22
|
<a-table-header>
|
15
23
|
<div v-if="$has.icon" />
|
@@ -37,7 +45,7 @@
|
|
37
45
|
</a-table>
|
38
46
|
</template>
|
39
47
|
|
40
|
-
<template v-else>
|
48
|
+
<template v-else-if="$scopedSlots.model">
|
41
49
|
<div
|
42
50
|
v-for="model in models_"
|
43
51
|
:key="model.id"
|
@@ -61,13 +69,11 @@
|
|
61
69
|
|
62
70
|
|
63
71
|
<script>
|
64
|
-
import { Component, Watch, Mixins } from 'vue
|
72
|
+
import { Component, Watch, Mixins } from '@a-vue'
|
65
73
|
import { ListViewMixin } from '@a-vue/components/list/ListViewMixin'
|
66
74
|
import { LoadingEvent } from '@a-vue/events'
|
67
75
|
|
68
|
-
@Component
|
69
|
-
props: ['table']
|
70
|
-
})
|
76
|
+
@Component
|
71
77
|
export default class ListView extends Mixins(ListViewMixin) {
|
72
78
|
$hasOptions = ['icon']
|
73
79
|
|
@@ -83,10 +89,6 @@ export default class ListView extends Mixins(ListViewMixin) {
|
|
83
89
|
this.$emit('update:isLoading', this.isLoading)
|
84
90
|
}
|
85
91
|
|
86
|
-
get _table () {
|
87
|
-
return this.table !== false
|
88
|
-
}
|
89
|
-
|
90
92
|
setFilter (name, value) {
|
91
93
|
this.filters[name].value = value
|
92
94
|
}
|