rnjs-webapp
v0.0.18
Published
> 移动网页(m)端基础框架
Downloads
8
Readme
rnjs-webapp
移动网页(m)端基础框架
安装依赖
yarn add rnjs-webapp axios vant amfe-flexible yarn add --dev ts-import-plugin postcss-pxtorem compression-webpack-plugin babel-plugin-import
使用方法(main.ts)
import Vue from 'vue'
import 'amfe-flexible'
import webapp from 'rnjs-webapp'
// vuex和路由
import router from './router'
import store from './store'
// 公共样式
import './assets/css/public.less'
// 注册全局组件及函数
import components from './components'
import App from './App.vue'
Vue.config.productionTip = false
Vue.use(webapp)
Vue.use(components)
new Vue({
router,
store,
render: h => h(App),
created () {
webapp.onVueCreated(this)
store.dispatch('system/customize/update', (window as any).VUE_CUSTOMIZE || {})
},
mounted () {
webapp.onVueMounted(this)
}
}).$mount('#app')