vue文件中的 text 内容没有显示,并且在页面报错
报错提示:
[Vue warn]: Failed to mount component: template or render function not defined.
found in
---> <App> at src/app.vue
<Root>
相关代码:
app.vue:
<template>
<div id='test'>
{{text}}
</div>
</template>
<script>
export default {
data(){
return{
text:'abc'
}
}
}
</script>
<style>
#test{
color:black;
}
</style>
index.js:
import Vue from 'vue'
import App from './app.vue'
import './assert/style/test.css'
import './assert/image/nn.png'
import './assert/style/test.less'
const root = document.createElement('div')
document.body.appendChild(root)
new Vue({
render:(h)=>h(App)
}).$mount(root)