Delay loading and toast 待æDone

This commit is contained in:
chiayin
2023-02-16 15:00:16 +08:00
parent 819199864d
commit a20c22dcae
7 changed files with 89 additions and 25 deletions

View File

@@ -7,14 +7,18 @@ import axios from 'axios';
import VueAxios from 'vue-axios';
import moment from 'moment';
import mitt from 'mitt';
import ToastPlugin from 'vue-toast-notification';
import "./assets/main.css";
//import 'vue-toast-notification/dist/theme-default.css';
import 'vue-toast-notification/dist/theme-sugar.css';
const emitter = mitt();
const app = createApp(App);
pinia.use(({ store }) => {
store.$router = markRaw(router)
store.$toast = markRaw(ToastPlugin)
});
// can use `this.$moment` in Vue.js
@@ -23,5 +27,9 @@ app.config.globalProperties.emitter = emitter;
app.use(pinia);
app.use(router);
app.use(VueAxios, axios);
// use `this.$toast` in Vue.js
app.use(ToastPlugin, {
duration: 10000,
});
app.mount("#app");