fix:将批量删除按钮放入顶部下拉菜单中

This commit is contained in:
zhangyu
2021-05-14 17:19:21 +08:00
parent e2636bee95
commit 97813ee1da
4 changed files with 21 additions and 5 deletions

View File

@@ -1,6 +1,11 @@
<template>
<div :class="['delete-button',(deleteObjs.length<1?'':'delete-button-light')]">
<button :id="id" :class="{'nz-btn-disabled' : deleteObjs.length<1}" class="top-tool-btn top-tool-btn--delete" @click="batchDelete"><span><i class="nz-icon nz-icon-delete" ></i></span></button>
<button v-if="this.type === 'button'" :id="id" :class="{'nz-btn-disabled' : deleteObjs.length<1}" class="top-tool-btn top-tool-btn--delete" @click="batchDelete">
<span><i class="nz-icon nz-icon-delete" ></i></span>
</button>
<div v-if="this.type === 'link'" :id="id" :class="{'nz-btn-disabled' : deleteObjs.length<1}" class="top-tool-btn top-tool-btn--delete" @click="batchDelete">
<span><i class="nz-icon nz-icon-delete" ></i>{{title}}</span>
</div>
</div>
</template>
@@ -12,7 +17,14 @@ export default {
deleteObjs: Array,
api: String,
clickFunction: Function,
id: String
id: String,
type: {
type: String,
default: 'button'
},
title: {
type: String
}
},
methods: {
batchDelete: function () {