Commit 0f942b82 authored by youjie's avatar youjie

no message

parent cd24672a
......@@ -129,7 +129,7 @@ module.exports = configure(function (ctx) {
directives: ['ClosePopup'],
// Quasar plugins
plugins: ['Notify', 'SessionStorage', 'Dialog', 'LoadingBar']
plugins: ['Loading','Notify', 'SessionStorage', 'Dialog', 'LoadingBar']
},
animations: 'all', // --- includes all animations
......
......@@ -3,10 +3,44 @@
</template>
<script lang="ts">
import { defineComponent } from 'vue';
import { defineComponent, onBeforeUnmount, created } from 'vue';
import { useQuasar,QSpinnerFacebook } from 'quasar'
import { useI18n } from 'vue-i18n'
export default defineComponent({
name: 'App'
name: 'App',
setup(props, context) {
const { t } = useI18n()
const $q = useQuasar()
let timer
onBeforeUnmount(() => {
if (timer !== void 0) {
clearTimeout(timer)
$q.loading.hide()
}
})
const methods = {
showLoading () {
$q.loading.show({
spinner: QSpinnerFacebook,
spinnerColor: 'yellow',
spinnerSize: 140,
backgroundColor: 'grey',
message: t('loading2'),
messageColor: 'black'
})
// hiding in 3s
timer = setTimeout(() => {
$q.loading.hide()
timer = void 0
}, 4000)
}
}
if(window.performance.navigation.type!=1){
methods.showLoading()
}
return { ...methods }
}
});
</script>
<style lang="sass">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment