首页 > 解决方案 > Vue Js 没有在 v-for 中渲染几个组件

问题描述

我正在使用 v-for ,然后显示组件。渲染良好,但缺少内部元素。我无法理解。您可以看到两列是空的,但在控制台中,三列是渲染的 5 个组件,但仅显示 3 个组件。告诉可能是什么问题。任何帮助将不胜感激 使用控制台截图

    <div v-for="(counterDate, index) in fulldate_array" >
    <template v-if="shift[officer.oid]">
        <shiftlayout v-for="(data,shiftKey) in shift[officer.oid][fulldate_array[index]]" :shift_data="data" :shiftKey="shiftKey" :date="singledate_array[index]" :fulldate="fulldate_array[index]" :width="shiftWidth"/>
    </template>
</div>

标签: vuejs2

解决方案


推荐阅读