@bildvitta/quasar-ui-asteroid 3.13.0-beta.13 → 3.13.0-beta.15
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
|
@@ -125,7 +125,7 @@ const screen = useScreen()
|
|
|
125
125
|
const slots = useSlots()
|
|
126
126
|
|
|
127
127
|
// usado para o plugin
|
|
128
|
-
const { dialogRef } = useDialogPluginComponent()
|
|
128
|
+
const { dialogRef, onDialogHide } = useDialogPluginComponent()
|
|
129
129
|
|
|
130
130
|
// QForm template
|
|
131
131
|
const form = ref(null)
|
|
@@ -139,7 +139,9 @@ const { descriptionComponent, mainComponent } = useDynamicComponents({ ...compos
|
|
|
139
139
|
const dialogProps = computed(() => {
|
|
140
140
|
return {
|
|
141
141
|
...(!props.usePlugin && { modelValue: props.modelValue }),
|
|
142
|
-
...attrs
|
|
142
|
+
...attrs,
|
|
143
|
+
|
|
144
|
+
onHide: onDialogHide
|
|
143
145
|
}
|
|
144
146
|
})
|
|
145
147
|
|
|
@@ -28,11 +28,8 @@
|
|
|
28
28
|
import QasHeaderActions from '../header-actions/QasHeaderActions.vue'
|
|
29
29
|
|
|
30
30
|
import { castArray } from 'lodash-es'
|
|
31
|
-
import { useHistory } from '../../composables'
|
|
32
31
|
import { createMetaMixin } from 'quasar'
|
|
33
32
|
|
|
34
|
-
const { history } = useHistory()
|
|
35
|
-
|
|
36
33
|
export default {
|
|
37
34
|
name: 'QasPageHeader',
|
|
38
35
|
|
|
@@ -94,13 +91,6 @@ export default {
|
|
|
94
91
|
item.route = { name: item.routeName }
|
|
95
92
|
}
|
|
96
93
|
|
|
97
|
-
const historyList = history.list
|
|
98
|
-
|
|
99
|
-
if (historyList.length && item?.route?.name) {
|
|
100
|
-
const previous = historyList.find(history => history.name === item.route.name)
|
|
101
|
-
item.route.query = previous ? previous.query : null
|
|
102
|
-
}
|
|
103
|
-
|
|
104
94
|
return item
|
|
105
95
|
})
|
|
106
96
|
},
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { reactive, computed } from 'vue'
|
|
2
|
-
import { findLastIndex } from 'lodash-es'
|
|
3
2
|
|
|
4
3
|
const history = reactive({ list: [] })
|
|
5
4
|
|
|
@@ -7,17 +6,18 @@ export default function () {
|
|
|
7
6
|
const hasPreviousRoute = computed(() => history.list.length > 1)
|
|
8
7
|
|
|
9
8
|
function getPreviousRoute (currentRoute) {
|
|
10
|
-
const index =
|
|
9
|
+
const index = history.list.findLastIndex(item => item.name === currentRoute.name)
|
|
11
10
|
|
|
12
11
|
if (~index) {
|
|
13
12
|
history.list.splice(index, 1)
|
|
14
13
|
}
|
|
15
14
|
|
|
16
|
-
return history.list
|
|
15
|
+
return history.list.at(-1)
|
|
17
16
|
}
|
|
18
17
|
|
|
19
18
|
function addRoute (route) {
|
|
20
|
-
const
|
|
19
|
+
const lastRoute = history.list?.at(-1)
|
|
20
|
+
const routeExistsInList = lastRoute?.name === route.name
|
|
21
21
|
|
|
22
22
|
if (routeExistsInList) return
|
|
23
23
|
|
|
@@ -7,7 +7,7 @@ import QasDialog from '../../components/dialog/QasDialog.vue'
|
|
|
7
7
|
* @example Dialog({ card: { title: 'Esse é o meu titulo!' } })
|
|
8
8
|
*/
|
|
9
9
|
export default (componentProps = {}) => {
|
|
10
|
-
Dialog.create({
|
|
10
|
+
return Dialog.create({
|
|
11
11
|
component: QasDialog,
|
|
12
12
|
componentProps: { ...componentProps, usePlugin: true }
|
|
13
13
|
})
|