mirror of
https://github.com/bs-community/blessing-skin-server.git
synced 2024-12-21 06:19:38 +08:00
Emit an event after mounted
This commit is contained in:
parent
cd43fb6f0e
commit
4db7872c02
@ -1,5 +1,6 @@
|
||||
import Vue from 'vue';
|
||||
import './js';
|
||||
import * as emitter from './js/event';
|
||||
import routes from './components/route';
|
||||
|
||||
Vue.config.productionTip = false;
|
||||
@ -20,6 +21,9 @@ if (process.env.NODE_ENV === 'development') {
|
||||
Vue.prototype.$route = (new RegExp(`^${route.path}$`, 'i')).exec(blessing.route);
|
||||
new Vue({
|
||||
el: route.el,
|
||||
mounted() {
|
||||
emitter.emit('mounted', { el: route.el });
|
||||
},
|
||||
render: h => h(route.component)
|
||||
});
|
||||
}
|
||||
|
@ -10,7 +10,6 @@ window.Request = function Request(url, init) {
|
||||
this.headers = new Map(Object.entries(init.headers));
|
||||
};
|
||||
|
||||
|
||||
test('the GET method', async () => {
|
||||
const json = jest.fn().mockResolvedValue({});
|
||||
window.fetch = jest.fn().mockResolvedValue({
|
||||
|
Loading…
Reference in New Issue
Block a user