fix: template v-for 的 key 移到 template 标签,修复编译报错
- Vue 要求 <template v-for> 的 key 放在 template 标签上,而非内部元素
This commit is contained in:
@ -17,10 +17,9 @@
|
||||
<scroll-view v-else scroll-y class="tree-scroll" :style="{ height: scrollHeight + 'px' }">
|
||||
<view class="tree-root">
|
||||
<!-- 递归纵向流转树:根级主线之间用 ↓ 连线,分支由 FlowTree 内部缩进 -->
|
||||
<template v-for="(t, i) in product.task_tree">
|
||||
<view :key="'arrow-' + i" v-if="i > 0" class="ft-flow-arrow">↓</view>
|
||||
<template v-for="(t, i) in product.task_tree" :key="'rt-' + t.id">
|
||||
<view v-if="i > 0" class="ft-flow-arrow">↓</view>
|
||||
<FlowTree
|
||||
:key="t.id"
|
||||
:node="t"
|
||||
:current-user="currentUser"
|
||||
:current-user-id="currentUserId"
|
||||
|
||||
Reference in New Issue
Block a user