vue中v-class中动态添加的属性可以用吗

发布网友 发布时间:2022-04-22 00:04

我来回答

1个回答

热心网友 时间:2022-04-22 17:55

<ul class="rs_tree">
<li v-for="node in treeData">
<div @click="childrenShow(node,$event)" class="rs_tree_text">
<span class="rs_tree_dot" v-if="!isFolder(node)"></span>
<em class="fa fa-folder" v-if="isFolder(node)&&!node.isShow"></em>
<em class="fa fa-folder-open" v-if="isFolder(node)&&node.isShow"></em>
<span class="rs_tree_label">{{node.text}}</span>
<input type="text" class="rs_edit_input" v-model="node.text" @click="stop($event)" @keyup.enter="editEnd()">
<div class="rs_tree_icon" v-if="node.add" @click="addItem(node,$event)" title="新增"><i class="fa fa-plus"></i></div>
<div class="rs_tree_icon" v-if="node.edit" @click="editItem(node,$event)" title="编辑"><i class="fa fa-edit"></i></div>
<div class="rs_tree_icon" v-if="node.del" @click="delItem(node,$event)" title="删除"><i class="fa fa-trash"></i></div>
</div>
<items v-if="isFolder(node)" v-show="node.isShow" :tree-data="node.children" transition="node-down"></items>
</li>

声明声明:本网页内容为用户发布,旨在传播知识,不代表本网认同其观点,若有侵权等问题请及时与本网联系,我们将在第一时间删除处理。E-MAIL:11247931@qq.com