Vue Component不呈现...呈现为空HTML注释

时间:2018-05-10 21:00:05

标签: c# vue.js vue-component asp.net-core-2.0

问题:

  • Vue组件在屏幕上呈现为<!---->

设置:

  • 应用程序位于C#Core 2.0
  • Vue版本2.5.16
  • 使用gulp将静态js文件复制到/ wwwroot
    gulp.src('./node_modules/vue/dist/vue.min.js') .pipe(gulp.dest('./wwwroot/dist/'))
  • 调用以HTML格式加载Vue <script src="~/dist/vue.min.js" asp-append-version="true"></script>
  • 我有四个组成部分。两个使用字符串文字模板,两个使用<template>。在后者中,只有一个显示。
    <template id="paging-template"></template> <template id="modal-template"></template>

    Vue.component('modal',{ template:'#modal-template'}); Vue.component('paging',{ template:'#paging-template'});

使用<modal></modal>调用模态,使用<paging></paging>调用。

模态显示正确。分页显示为<!---->,但在Chrome中使用Vue调试器插件我可以看到模型,Paging组件的所有内容都在那里。

我错过了什么?

编辑:  JSFiddle Link

这个css不是我的,只是他们提供的Vue模板的默认值

0 个答案:

没有答案
相关问题