mirror of
https://github.com/ElemeFE/element.git
synced 2025-12-16 11:44:01 +08:00
Initial commit
This commit is contained in:
26
examples/entry.js
Normal file
26
examples/entry.js
Normal file
@@ -0,0 +1,26 @@
|
||||
import Vue from 'vue';
|
||||
import entry from './app';
|
||||
import VueRouter from 'vue-router';
|
||||
import configRouter from './route.config';
|
||||
import Element from 'main/index.js';
|
||||
import 'packages/theme-default/src/index.css';
|
||||
|
||||
// test Released package
|
||||
// import Element from '../lib/index.js';
|
||||
// import '../lib/theme-default/index.css';
|
||||
|
||||
Vue.use(Element);
|
||||
Vue.use(VueRouter);
|
||||
|
||||
const router = new VueRouter();
|
||||
const app = Vue.extend({
|
||||
template: '<entry></entry>',
|
||||
components: { entry }
|
||||
});
|
||||
|
||||
configRouter(router);
|
||||
router.start(app, 'app');
|
||||
|
||||
router.afterEach(() => {
|
||||
document.body.scrollTop = 0;
|
||||
});
|
||||
Reference in New Issue
Block a user