@bildvitta/quasar-ui-asteroid 3.13.0-beta.0 → 3.13.0-beta.2
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
|
@@ -128,11 +128,13 @@ export default {
|
|
|
128
128
|
},
|
|
129
129
|
|
|
130
130
|
defaultOk () {
|
|
131
|
+
const { onClick, ...attrs } = this.ok
|
|
132
|
+
|
|
131
133
|
return {
|
|
132
134
|
label: 'Ok',
|
|
133
135
|
type: this.ok?.type || this.useForm ? 'submit' : 'button',
|
|
134
136
|
|
|
135
|
-
...
|
|
137
|
+
...attrs,
|
|
136
138
|
|
|
137
139
|
// adiciona somente se não estiver usando useForm pois o controle ficará no submit.
|
|
138
140
|
...(!this.useForm && { onClick: this.onOk })
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
</template>
|
|
23
23
|
|
|
24
24
|
<script setup>
|
|
25
|
-
import { ref, computed, inject } from 'vue'
|
|
25
|
+
import { ref, computed, inject, nextTick } from 'vue'
|
|
26
26
|
import { NotifyError } from '../../plugins'
|
|
27
27
|
|
|
28
28
|
defineOptions({ name: 'QasInfiniteScroll' })
|
|
@@ -151,8 +151,10 @@ function refresh () {
|
|
|
151
151
|
|
|
152
152
|
hasMadeFirstFetch.value = false
|
|
153
153
|
|
|
154
|
-
|
|
155
|
-
|
|
154
|
+
nextTick(() => {
|
|
155
|
+
infiniteScroll.value.reset()
|
|
156
|
+
infiniteScroll.value.resume()
|
|
157
|
+
})
|
|
156
158
|
}
|
|
157
159
|
|
|
158
160
|
function remove (index) {
|
|
@@ -4,19 +4,22 @@ import { NotifySuccess, NotifyError } from '../plugins'
|
|
|
4
4
|
/** Função para lidar com promises, por exemplo requests.
|
|
5
5
|
*
|
|
6
6
|
* @param {Promise} promise
|
|
7
|
-
* @param {object} config={successMessage, errorMessage, useLoading}
|
|
7
|
+
* @param {object} config={successMessage, errorMessage, useLoading, loadingConfig, onLoading}
|
|
8
8
|
* @example promiseHandle(new Promise(), { errorMessage: 'Erro', successMessage: 'Sucesso' })
|
|
9
9
|
*/
|
|
10
10
|
export default async function (promise, config = {}) {
|
|
11
11
|
const {
|
|
12
|
-
successMessage,
|
|
13
12
|
errorMessage,
|
|
13
|
+
loadingConfig = {},
|
|
14
|
+
successMessage,
|
|
14
15
|
useLoading = true,
|
|
16
|
+
|
|
17
|
+
// callback
|
|
15
18
|
onLoading
|
|
16
19
|
} = config
|
|
17
20
|
|
|
18
21
|
onLoading && onLoading(true)
|
|
19
|
-
useLoading && Loading.show()
|
|
22
|
+
useLoading && Loading.show(loadingConfig)
|
|
20
23
|
|
|
21
24
|
const promiseToBeExec = typeof promise === 'function' ? promise() : promise
|
|
22
25
|
|