Delay loading and toast 待æDone
This commit is contained in:
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user