Skip to content

Components didn't display in browser when i use nested tag <template> in .vue with version 1.0.17 #2435

@sharkrice

Description

@sharkrice

in Home.vue

<template>
  <div>
    <mui-content :options="options.content">
      <mui-slider v-if="options.slider.display" :options="options.slider"></mui-slider>
      <mui-category></mui-category>
      <mui-list></mui-list>
    </mui-content>
  </div>
</template>

in content.vue

<template>
  <div class="mui-content" :class="{ 'mui-scroll-wrapper': options.scroll, 'index': options.index }">
    <template v-if="options.scroll">
      <div class="mui-scroll">
        <slot></slot>
      </div>
    </template>
    <template v-else>
      <slot></slot>
    </template>
  </div>
</template>

当升级到vue1.0.17时,在.vue文件里用这种template嵌套template加slot标签时,网页不会显示这些放进slot的组件,也不会报错。
用旧版本就没有这个问题。

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions