fix:将批量删除按钮放入顶部下拉菜单中
This commit is contained in:
@@ -1,6 +1,11 @@
|
|||||||
<template>
|
<template>
|
||||||
<div :class="['delete-button',(deleteObjs.length<1?'':'delete-button-light')]">
|
<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>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -12,7 +17,14 @@ export default {
|
|||||||
deleteObjs: Array,
|
deleteObjs: Array,
|
||||||
api: String,
|
api: String,
|
||||||
clickFunction: Function,
|
clickFunction: Function,
|
||||||
id: String
|
id: String,
|
||||||
|
type: {
|
||||||
|
type: String,
|
||||||
|
default: 'button'
|
||||||
|
},
|
||||||
|
title: {
|
||||||
|
type: String
|
||||||
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
batchDelete: function () {
|
batchDelete: function () {
|
||||||
|
|||||||
@@ -108,7 +108,8 @@ const cn = {
|
|||||||
silence: '静默',
|
silence: '静默',
|
||||||
labels: '标签',
|
labels: '标签',
|
||||||
editType: '类型',
|
editType: '类型',
|
||||||
searchCondition: '搜索条件'
|
searchCondition: '搜索条件',
|
||||||
|
batchDel: '批量删除'
|
||||||
},
|
},
|
||||||
setup: {
|
setup: {
|
||||||
step0: '欢迎',
|
step0: '欢迎',
|
||||||
|
|||||||
@@ -113,7 +113,8 @@ const en = {
|
|||||||
copy: 'Copy',
|
copy: 'Copy',
|
||||||
silence: 'Silence',
|
silence: 'Silence',
|
||||||
editType: 'Type',
|
editType: 'Type',
|
||||||
searchCondition: 'Search condition'
|
searchCondition: 'Search condition',
|
||||||
|
batchDel: 'Batches delete'
|
||||||
},
|
},
|
||||||
pageSize: '/page',
|
pageSize: '/page',
|
||||||
setup: {
|
setup: {
|
||||||
|
|||||||
@@ -10,7 +10,6 @@
|
|||||||
@search="search"
|
@search="search"
|
||||||
>
|
>
|
||||||
<template v-slot:top-tool-right>
|
<template v-slot:top-tool-right>
|
||||||
<delete-button id="asset-list-batch-delete" v-has="'asset_delete'" :api="url" :delete-objs="batchDeleteObjs" @after="getTableData" @before="delFlag=true"></delete-button>
|
|
||||||
<button id="asset-create-asset" v-has="'asset_add'" :title="$t('overall.createAsset')" class="top-tool-btn" @click.stop="add">
|
<button id="asset-create-asset" v-has="'asset_add'" :title="$t('overall.createAsset')" class="top-tool-btn" @click.stop="add">
|
||||||
<i class="nz-icon nz-icon-create-square"></i>
|
<i class="nz-icon nz-icon-create-square"></i>
|
||||||
</button>
|
</button>
|
||||||
@@ -35,6 +34,9 @@
|
|||||||
<el-dropdown-item>
|
<el-dropdown-item>
|
||||||
<div id="asset-filte" :class="{ 'is-focus': dataListLayout.indexOf('clickSearch') > -1 }" v-has="'asset_edit'" @click.stop="showClickSearch"><i class="nz-icon nz-icon-funnel"></i>{{$t('overall.searchCondition')}}</div>
|
<div id="asset-filte" :class="{ 'is-focus': dataListLayout.indexOf('clickSearch') > -1 }" v-has="'asset_edit'" @click.stop="showClickSearch"><i class="nz-icon nz-icon-funnel"></i>{{$t('overall.searchCondition')}}</div>
|
||||||
</el-dropdown-item>
|
</el-dropdown-item>
|
||||||
|
<el-dropdown-item>
|
||||||
|
<delete-button :type="'link'" :title="$t('overall.batchDel')" id="asset-list-batch-delete" v-has="'asset_delete'" :api="url" :delete-objs="batchDeleteObjs" @after="getTableData" @before="delFlag=true"></delete-button>
|
||||||
|
</el-dropdown-item>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</top-tool-more-options>
|
</top-tool-more-options>
|
||||||
|
|||||||
Reference in New Issue
Block a user