账号密码登录
微信安全登录
微信扫描二维码登录

登录后绑定QQ、微信即可实现信息互通

手机验证码登录
找回密码返回
邮箱找回 手机找回
注册账号返回
其他登录方式
分享
  • 收藏
    X
    vue出现以下两个问题
    21
    0

    Cannot find element: #app 和 Failed to mount component: template or render function not defined. 两个错误

    其中 app.vue
    <template>

    <div id="app">
        <router-view/>
    </div>

    </template>

    <script>

    export default {
        name: 'App'
    }

    </script>

    <style lang="less">

    @import '~vux/src/styles/reset.less';

    </style>

    main.js
    import Vue from 'vue'
    import App from './App'
    import FastClick from 'fastclick'

    import router from './router'
    import VueCookies from 'vue-cookies'
    Vue.use(VueCookies);

    FastClick.attach(document.body)

    Vue.config.productionTip = false

    / eslint-disable no-new /
    new Vue({

    el: '#app',
    router,
    components: { App },
    template: '<App/>'

    })

    为啥报错啊

    0
    打赏
    收藏
    点击回答
        全部回答
    • 0
    • 邋遢仙人 普通会员 1楼

      很抱歉,您没有提供具体的错误信息,我无法为您提供准确的解决方案。请您提供更详细的问题描述,包括报错信息、出现错误的时间、错误发生在哪个组件或者哪个方法上,以及您尝试过哪些解决方案等。这样我才能更好地帮助您解决问题。

    更多回答
    扫一扫访问手机版
    • 回到顶部
    • 回到顶部