[ERROR] : [Vue warn]: Failed to mount component: template or render function not defined.
(found in <Root>) __ERROR

錯(cuò)誤
看mpType是否正確,默認(rèn)是配置:‘a(chǎn)pp’
app.vue
import Vue from 'vue'
import App from './App'
import pageHead from './components/page-head.vue' //全局引用page-head組件
Vue.config.productionTip = false
Vue.component('page-head', pageHead) //全局注冊(cè)page-head組件,每個(gè)頁(yè)面將可以直接使用該組件
App.mpType = 'app' // 確保mpType
const app = new Vue({
...App
})
app.$mount() //掛載Vue實(shí)例
使用Vue.use引用插件,使用Vue.prototype添加全局變量,使用Vue.component注冊(cè)全局組件。
可以引用vuex,因涉及多個(gè)文件,此處沒(méi)有提供示例,詳見(jiàn)hello uni-app示例工程。
無(wú)法使用vue-router,路由須在pages.json中進(jìn)行配置。
https://nativesupport.dcloud.net.cn/AppDocs/usesdk/android

云打包

安卓打包,密鑰生成
keytool -genkey -alias testalias -keyalg RSA -keysize 2048 -validity 36500 -keystore test.keystore
IOS打包
https://nativesupport.dcloud.net.cn/AppDocs/usesdk/ios
申請(qǐng)證書(shū)