@afeefa/vue-app 0.0.53 → 0.0.56

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.
Files changed (92) hide show
  1. package/.afeefa/package/release/version.txt +1 -1
  2. package/package.json +3 -10
  3. package/src/api-resources/ApiActions.js +31 -0
  4. package/src/components/AAlert.vue +1 -1
  5. package/src/components/AAutocomplete.vue +1 -1
  6. package/src/components/ABadge.vue +1 -1
  7. package/src/components/ABreadcrumbs.vue +1 -1
  8. package/src/components/ACheckbox.vue +35 -0
  9. package/src/components/AContextMenu.vue +2 -2
  10. package/src/components/AContextMenuItem.vue +2 -2
  11. package/src/components/ADatePicker.vue +1 -1
  12. package/src/components/ADialog.vue +3 -1
  13. package/src/components/AGrid.vue +2 -1
  14. package/src/components/AIcon.vue +1 -1
  15. package/src/components/AIconButton.vue +1 -1
  16. package/src/components/ALoadingIndicator.vue +1 -1
  17. package/src/components/AModal.vue +1 -1
  18. package/src/components/APagination.vue +1 -1
  19. package/src/components/ARadioGroup.vue +1 -1
  20. package/src/components/ARichTextArea.vue +257 -0
  21. package/src/components/ARow.vue +1 -1
  22. package/src/components/ASaveIndicator.vue +1 -1
  23. package/src/components/ASearchSelect.vue +34 -18
  24. package/src/components/ASelect.vue +1 -1
  25. package/src/components/ATable.vue +1 -1
  26. package/src/components/ATableHeader.vue +1 -1
  27. package/src/components/ATableRow.vue +1 -1
  28. package/src/components/ATextArea.vue +1 -1
  29. package/src/components/ATextField.vue +1 -1
  30. package/src/components/form/EditForm.vue +2 -6
  31. package/src/components/form/EditModal.vue +23 -18
  32. package/src/components/form/FormFieldMixin.js +2 -3
  33. package/src/components/form/fields/FormFieldCheckbox.vue +18 -0
  34. package/src/components/form/fields/FormFieldDate.vue +1 -1
  35. package/src/components/form/fields/FormFieldRadioGroup.vue +1 -1
  36. package/src/components/form/fields/FormFieldRichTextArea.vue +14 -0
  37. package/src/components/form/fields/FormFieldSearchSelect.vue +1 -1
  38. package/src/components/form/fields/FormFieldSelect.vue +1 -1
  39. package/src/components/form/fields/FormFieldSelect2.vue +1 -1
  40. package/src/components/form/fields/FormFieldText.vue +1 -1
  41. package/src/components/form/fields/FormFieldTextArea.vue +1 -1
  42. package/src/components/index.js +4 -0
  43. package/src/components/list/ListFilterMixin.js +1 -1
  44. package/src/components/list/ListFilterRow.vue +1 -1
  45. package/src/components/list/ListViewMixin.js +7 -4
  46. package/src/components/list/filters/ListFilterPage.vue +1 -1
  47. package/src/components/list/filters/ListFilterSearch.vue +1 -1
  48. package/src/components/list/filters/ListFilterSelect.vue +1 -1
  49. package/src/components/mixins/ClickOutsideMixin.js +1 -1
  50. package/src/components/mixins/ComponentWidthMixin.js +1 -1
  51. package/src/components/search-select/SearchSelectFilters.vue +1 -1
  52. package/src/components/search-select/SearchSelectList.vue +13 -3
  53. package/src/components/vue/Component.js +46 -0
  54. package/src/index.js +4 -0
  55. package/src/plugins/api-resources/ApiResourcesPlugin.js +12 -0
  56. package/src/plugins/route-config/RouteConfigPlugin.js +25 -1
  57. package/src/services/escape/CancelOnEscMixin.js +1 -1
  58. package/src/services/position/UsesPositionServiceMixin.js +1 -1
  59. package/src/styles/forms.scss +8 -0
  60. package/src/styles/vue-app.scss +1 -0
  61. package/src-admin/bootstrap.js +2 -5
  62. package/src-admin/components/App.vue +1 -1
  63. package/src-admin/components/NotFound.vue +65 -0
  64. package/src-admin/components/SidebarMenu.vue +1 -1
  65. package/src-admin/components/Splash.vue +34 -34
  66. package/src-admin/components/Start.vue +2 -2
  67. package/src-admin/components/app/AppBarButton.vue +1 -1
  68. package/src-admin/components/app/AppBarButtons.vue +1 -1
  69. package/src-admin/components/app/AppBarTitle.vue +1 -1
  70. package/src-admin/components/app/AppBarTitleContainer.vue +1 -1
  71. package/src-admin/components/controls/SearchSelectFormField.vue +223 -0
  72. package/src-admin/components/detail/DetailProperty.vue +2 -4
  73. package/src-admin/components/list/ListColumnHeader.vue +5 -4
  74. package/src-admin/components/list/ListTitle.vue +1 -1
  75. package/src-admin/components/list/ListView.vue +12 -10
  76. package/src-admin/components/menu/SidebarMenuItem.vue +1 -1
  77. package/src-admin/components/model/ModelCount.vue +1 -1
  78. package/src-admin/components/model/ModelIcon.vue +1 -1
  79. package/src-admin/components/pages/CreatePage.vue +2 -3
  80. package/src-admin/components/pages/DetailPage.vue +4 -4
  81. package/src-admin/components/pages/EditPage.vue +5 -6
  82. package/src-admin/components/pages/EditPageMixin.js +1 -1
  83. package/src-admin/components/pages/ListPage.vue +3 -4
  84. package/src-admin/components/routes/CreateRoute.vue +1 -1
  85. package/src-admin/components/routes/DetailRoute.vue +4 -4
  86. package/src-admin/components/routes/EditRoute.vue +4 -4
  87. package/src-admin/components/routes/ListRoute.vue +4 -4
  88. package/src-admin/config/vuetify.js +3 -1
  89. package/src-admin/models/Model.js +13 -0
  90. package/src-admin/models/ModelAdminConfig.js +20 -0
  91. package/src-components/AMdiIcon.vue +18 -0
  92. 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,
@@ -1,4 +1,4 @@
1
- import { Component, Vue } from 'vue-property-decorator'
1
+ import { Component, Vue } from '@a-vue'
2
2
 
3
3
  import { cascadingWindowEventDispatcher } from './CascadingWindowEventDispatcher'
4
4
 
@@ -1,4 +1,4 @@
1
- import { Component, Vue } from 'vue-property-decorator'
1
+ import { Component, Vue } from '@a-vue'
2
2
 
3
3
  import { positionService } from '../PositionService'
4
4
 
@@ -0,0 +1,8 @@
1
+ .a-text-input {
2
+ border: 1px solid #CCCCCC;
3
+ padding: .5rem;
4
+
5
+ &-focused {
6
+ outline: 1px solid #9999FF;
7
+ }
8
+ }
@@ -0,0 +1 @@
1
+ @import "forms";
@@ -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
- apiResources
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 apiResources.schemasLoaded()
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-property-decorator'
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>
@@ -32,7 +32,7 @@
32
32
  </template>
33
33
 
34
34
  <script>
35
- import { Component, Vue } from 'vue-property-decorator'
35
+ import { Component, Vue } from '@a-vue'
36
36
  import SidebarMenuItem from './menu/SidebarMenuItem'
37
37
 
38
38
  @Component({
@@ -1,41 +1,37 @@
1
1
  <template>
2
2
  <v-app class="splash">
3
- <v-container
4
- fill-height
5
- fluid
6
- pb-0
7
- d-flex
8
- align-center
9
- justify-center
3
+ <a-row
4
+ vertical
5
+ center
6
+ class="content"
10
7
  >
11
- <div>
12
- <div class="logo">
13
- <slot />
14
- </div>
8
+ <div class="logo">
9
+ <slot />
10
+ </div>
15
11
 
16
- <a-row
17
- vertical
18
- center
19
- >
20
- <v-progress-linear
21
- :size="45"
22
- :width="6"
23
- indeterminate
24
- :color="color || 'green'"
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
- <div class="mt-4">
28
- {{ title || 'Lade App ...' }}
29
- </div>
30
- </a-row>
31
- </div>
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-property-decorator'
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: absolute;
48
+ position: fixed;
54
49
  top: 0;
55
50
  left: 0;
56
51
  width: 100vw;
52
+ height: 100vh;
57
53
  }
58
54
 
59
- .logo {
60
- margin-bottom: 2rem;
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
- .container {
64
- transform: translateY(-10%);
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-property-decorator'
9
+ import { Component, Vue } from '@a-vue'
10
10
 
11
11
  @Component({
12
12
  props: ['splash']
13
13
  })
14
- export default class Index extends Vue {
14
+ export default class Start extends Vue {
15
15
  appLoaded () {
16
16
  this.splash.$destroy()
17
17
  }
@@ -5,7 +5,7 @@
5
5
  </template>
6
6
 
7
7
  <script>
8
- import { Component, Vue } from 'vue-property-decorator'
8
+ import { Component, Vue } from '@a-vue'
9
9
 
10
10
  @Component({
11
11
  props: ['prepend']
@@ -6,7 +6,7 @@
6
6
  </template>
7
7
 
8
8
  <script>
9
- import { Component, Vue } from 'vue-property-decorator'
9
+ import { Component, Vue } from '@a-vue'
10
10
 
11
11
  @Component
12
12
  export default class AppBarButtons extends Vue {
@@ -12,7 +12,7 @@
12
12
  </template>
13
13
 
14
14
  <script>
15
- import { Component, Vue } from 'vue-property-decorator'
15
+ import { Component, Vue } from '@a-vue'
16
16
 
17
17
  @Component({
18
18
  props: ['icon', 'title']
@@ -4,7 +4,7 @@
4
4
 
5
5
 
6
6
  <script>
7
- import { Component, Vue } from 'vue-property-decorator'
7
+ import { Component, Vue } from '@a-vue'
8
8
 
9
9
  @Component
10
10
  export default class AppBarTitleContainer extends Vue {
@@ -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-property-decorator'
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 :class="['text', {active}]">
8
- {{ text }}
9
- </div>
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-property-decorator'
25
+ import { Component, Vue } from '@a-vue'
25
26
 
26
27
  @Component({
27
28
  props: ['text', 'order']
@@ -14,7 +14,7 @@
14
14
  </template>
15
15
 
16
16
  <script>
17
- import { Component, Vue } from 'vue-property-decorator'
17
+ import { Component, Vue } from '@a-vue'
18
18
 
19
19
  @Component({
20
20
  props: ['link']
@@ -9,7 +9,15 @@
9
9
  </div>
10
10
 
11
11
  <template v-if="models_.length">
12
- <template v-if="_table">
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-property-decorator'
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
  }
@@ -45,7 +45,7 @@
45
45
  </template>
46
46
 
47
47
  <script>
48
- import { Component, Vue } from 'vue-property-decorator'
48
+ import { Component, Vue } from '@a-vue'
49
49
 
50
50
  @Component({
51
51
  props: ['item']
@@ -10,7 +10,7 @@
10
10
 
11
11
 
12
12
  <script>
13
- import { Component, Vue } from 'vue-property-decorator'
13
+ import { Component, Vue } from '@a-vue'
14
14
  import { modelCountService } from './ModelCountService'
15
15
  import { SaveEvent } from '@a-vue/events'
16
16