@bildvitta/quasar-ui-asteroid 3.16.0-beta.9 → 3.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
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@bildvitta/quasar-ui-asteroid",
3
3
  "description": "Asteroid",
4
- "version": "3.16.0-beta.9",
4
+ "version": "3.16.0",
5
5
  "author": "Bild & Vitta <systemteam@bild.com.br>",
6
6
  "license": "MIT",
7
7
  "main": "dist/asteroid.cjs.min.js",
@@ -1,5 +1,9 @@
1
1
  <template>
2
2
  <div class="q-mt-sm" :class="classes">
3
+ <div v-if="hasTertiarySlot" :class="columnClasses">
4
+ <slot name="tertiary" />
5
+ </div>
6
+
3
7
  <div v-if="hasSecondarySlot" :class="columnClasses">
4
8
  <slot name="secondary" />
5
9
  </div>
@@ -52,6 +56,8 @@ const classes = computed(() => {
52
56
  const isSmallOrFullWidth = screen.isSmall || props.useFullWidth
53
57
 
54
58
  return [
59
+ 'items-center',
60
+
55
61
  // alinhamento
56
62
  `justify-${props.align}`,
57
63
 
@@ -71,4 +77,5 @@ const columnClasses = computed(() => {
71
77
 
72
78
  const hasPrimarySlot = computed(() => !!slots.primary)
73
79
  const hasSecondarySlot = computed(() => !!slots.secondary)
80
+ const hasTertiarySlot = computed(() => !!slots.tertiary)
74
81
  </script>
@@ -4,14 +4,14 @@
4
4
  <slot name="header" />
5
5
  </header>
6
6
 
7
- <template v-if="hasResult">
7
+ <slot v-if="canShowFetchErrorSlot" name="fetch-error" />
8
+
9
+ <template v-else-if="hasResult">
8
10
  <slot />
9
11
  </template>
10
12
 
11
13
  <div v-else-if="!viewState.fetching">
12
- <slot v-if="canShowFetchErrorSlot" name="fetch-error" />
13
-
14
- <qas-empty-result-text v-else class="q-my-xl" />
14
+ <qas-empty-result-text class="q-my-xl" />
15
15
  </div>
16
16
 
17
17
  <footer v-if="hasFooterSlot">
@@ -99,7 +99,7 @@ const resultModel = computed(() => {
99
99
  return viewState.value.result || {}
100
100
  })
101
101
 
102
- const hasResult = computed(() => !!Object.keys(resultModel.value).length)
102
+ const hasResult = computed(() => !!resultModel.value)
103
103
 
104
104
  // watch
105
105
  watch(() => route, (to, from) => {
@@ -89,7 +89,7 @@ export default function useView (config) {
89
89
  const componentClass = computed(() => props.useBoundary && 'container spaced')
90
90
  const hasFooterSlot = computed(() => !!slots.footer)
91
91
  const hasHeaderSlot = computed(() => !!slots.header)
92
- const hasFetchErrorSlot = computed(() => !!slots.fetchError)
92
+ const hasFetchErrorSlot = computed(() => !!slots['fetch-error'])
93
93
  const canShowFetchErrorSlot = computed(() => hasFetchErrorSlot.value && hasFetchError.value)
94
94
 
95
95
  // watch
@@ -81,7 +81,7 @@ export default {
81
81
  },
82
82
 
83
83
  mx_hasFetchErrorSlot () {
84
- return !!(this.$slots.fetchError)
84
+ return !!(this.$slots['fetch-error'])
85
85
  },
86
86
 
87
87
  mx_fetchErrorMessage () {