Errors compiling template: The value for a v-bind expression cannot be empty. Found in “v-bind:“

进行vue前端项目的修改的时候,运行文件的时候出现了

Starting development server...
98% after emitting CopyPlugin

 ERROR  Failed to compile with 1 error                                                                                                                        23:07:46

 error  in ./src/layout/components/AppMain.vue?vue&type=template&id=078753dd&scoped=true&xmlns%3Akeep-alive=http%3A%2F%2Fwww.w3.org%2F1999%2Fhtml&

Module Error (from ./node_modules/vue-loader/lib/loaders/templateLoader.js):
(Emitted value instead of an instance of Error) 

  Errors compiling template:

  The value for a v-bind expression cannot be empty. Found in "v-bind:"

  1  |
     |
  2  |  <section class="app-main">
     |  ^^^^^^^^^^^^^^^^^^^^^^^^^^
  3  |    <transition name="fade-transform" mode="out-in">
     |  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  4  |      <keep-alive: include="cachedViews">
     |  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  5  |        <router-view :key="key"/>
     |  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  6  |      </keep-alive:>
     |  ^^^^^^^^^^^^^^^^^^
  7  |    </transition>
     |  ^^^^^^^^^^^^^^^
  8  |  </section>
     |  ^^^^^^^^^^

仔细看了一下,也没哪里报错,ESLint也没让你修改啥的,后面才对照了一下代码,根据 下面这句

  <section class="app-main">
     |  ^^^^^^^^^^^^^^^^^^^^^^^^^^
  3  |    <transition name="fade-transform" mode="out-in">
     |  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  4  |      <keep-alive: include="cachedViews">
     |  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  5  |        <router-view :key="key"/>
     |  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  6  |      </keep-alive:>
     |  ^^^^^^^^^^^^^^^^^^
  7  |    </transition>
     |  ^^^^^^^^^^^^^^^
  8  |  </section>
     |  ^^^^^^^^^^
 

终于发现 ,这里出现了问题

 正确的修改是

 修改完就可以了,格式问题咯

  • 2
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值