feat: ✨ 提供多页面构建示例,优化了打包分包,取消CDN加载依赖但保留了设置入口
This commit is contained in:
5
src.mobile/App.vue
Normal file
5
src.mobile/App.vue
Normal file
@@ -0,0 +1,5 @@
|
||||
<template>
|
||||
<div id="app">
|
||||
<router-view/>
|
||||
</div>
|
||||
</template>
|
||||
15
src.mobile/main.js
Normal file
15
src.mobile/main.js
Normal file
@@ -0,0 +1,15 @@
|
||||
import Vue from 'vue'
|
||||
import App from './App.vue'
|
||||
import router from './router'
|
||||
import store from './store'
|
||||
|
||||
import 'flex.css'
|
||||
import './vant'
|
||||
|
||||
Vue.config.productionTip = false
|
||||
|
||||
new Vue({
|
||||
router,
|
||||
store,
|
||||
render: h => h(App)
|
||||
}).$mount('#app')
|
||||
18
src.mobile/router/index.js
Normal file
18
src.mobile/router/index.js
Normal file
@@ -0,0 +1,18 @@
|
||||
import Vue from 'vue'
|
||||
import VueRouter from 'vue-router'
|
||||
|
||||
Vue.use(VueRouter)
|
||||
|
||||
const routes = [
|
||||
{
|
||||
path: '/',
|
||||
name: 'index',
|
||||
component: () => import('../views/index.vue')
|
||||
}
|
||||
]
|
||||
|
||||
const router = new VueRouter({
|
||||
routes
|
||||
})
|
||||
|
||||
export default router
|
||||
15
src.mobile/store/index.js
Normal file
15
src.mobile/store/index.js
Normal file
@@ -0,0 +1,15 @@
|
||||
import Vue from 'vue'
|
||||
import Vuex from 'vuex'
|
||||
|
||||
Vue.use(Vuex)
|
||||
|
||||
export default new Vuex.Store({
|
||||
state: {
|
||||
},
|
||||
mutations: {
|
||||
},
|
||||
actions: {
|
||||
},
|
||||
modules: {
|
||||
}
|
||||
})
|
||||
7
src.mobile/vant.js
Normal file
7
src.mobile/vant.js
Normal file
@@ -0,0 +1,7 @@
|
||||
import Vue from 'vue'
|
||||
|
||||
import {
|
||||
Button
|
||||
} from 'vant'
|
||||
|
||||
Vue.use(Button)
|
||||
7
src.mobile/views/index.vue
Normal file
7
src.mobile/views/index.vue
Normal file
@@ -0,0 +1,7 @@
|
||||
<template>
|
||||
<div>
|
||||
<van-button type="info" block>
|
||||
Vant info button with custom color
|
||||
</van-button>
|
||||
</div>
|
||||
</template>
|
||||
Reference in New Issue
Block a user