[update] 修改操作列只显示一个按钮,其他显示在更多
This commit is contained in:
@@ -130,16 +130,44 @@
|
||||
<template v-slot:fileName="{text}" :title="text">
|
||||
{{ text }}
|
||||
</template>
|
||||
<!-- v-has="'externalReport:download'"-->
|
||||
<!-- v-has="'externalReport:edit'"-->
|
||||
<!-- v-has="'externalReport:delete'"-->
|
||||
<!-- v-if="authmanage"-->
|
||||
<!-- <template v-slot:operation="{text, record}">-->
|
||||
<!-- <a class="text-operation"-->
|
||||
<!-- @click="download(record)">{{$t('download')}}</a>-->
|
||||
<!-- <a-divider type="vertical"/>-->
|
||||
<!-- <a-dropdown v-if="authmanage">-->
|
||||
<!-- <a class="ant-dropdown-link">-->
|
||||
<!-- {{ $t('more') }} <a-icon type="down"/>-->
|
||||
<!-- </a>-->
|
||||
<!-- <a-menu slot="overlay">-->
|
||||
<!-- <a-menu-item>-->
|
||||
<!-- <a class="text-operation"-->
|
||||
<!-- @click="handleEdit(record)">{{$t('edit')}}</a>-->
|
||||
<!-- </a-menu-item>-->
|
||||
<!-- <a-menu-item>-->
|
||||
<!-- <a class="text-operation"-->
|
||||
<!-- @click="batchDel(record)">{{$t('delete')}}</a>-->
|
||||
<!-- </a-menu-item>-->
|
||||
<!-- </a-menu>-->
|
||||
<!-- </a-dropdown>-->
|
||||
<!-- </template>-->
|
||||
<template v-slot:operation="{text, record}">
|
||||
<a class="text-operation"
|
||||
v-has="'externalReport:download'"
|
||||
@click="download(record)">{{$t('download')}}</a>
|
||||
<a class="text-operation"
|
||||
v-has="'externalReport:edit'"
|
||||
@click="handleEdit(record)" v-if='authmanage'>{{$t('edit')}}</a>
|
||||
<a class="text-operation"
|
||||
v-has="'externalReport:delete'"
|
||||
@click="batchDel(record)" v-if='authmanage'>{{$t('delete')}}</a>
|
||||
<a v-for="(operation, index) in operationList.slice(0, operateMaxNum)" :key="index" class="text-operation"
|
||||
@click="operationClick(record)">{{operation.text}}</a>
|
||||
<!-- authmanage &&-->
|
||||
<a-divider v-if="operationList.length >= operateMaxNum" type="vertical"/>
|
||||
<a-dropdown v-if="operationList.length >= operateMaxNum">
|
||||
<a class="ant-dropdown-link">{{ $t('more') }} <a-icon type="down"/></a>
|
||||
<a-menu slot="overlay">
|
||||
<a-menu-item v-for="(operation, index) in operationList.slice(operateMaxNum)" :key="index">
|
||||
<!-- v-if="authmanage"-->
|
||||
<a class="text-operation" @click="operationClick(record)">{{operation.text}}</a>
|
||||
</a-menu-item>
|
||||
</a-menu>
|
||||
</a-dropdown>
|
||||
</template>
|
||||
</j-table>
|
||||
</div>
|
||||
@@ -172,12 +200,31 @@ export default {
|
||||
mixins: [JeroListMixin],
|
||||
data () {
|
||||
return {
|
||||
operationList: [
|
||||
{
|
||||
text: this.$t('download'),
|
||||
clickEvent: 'download',
|
||||
has: 'externalReport:download'
|
||||
},
|
||||
{
|
||||
text: this.$t('edit'),
|
||||
clickEvent: 'handleEdit',
|
||||
has: 'externalReport:edit'
|
||||
},
|
||||
{
|
||||
text: this.$t('delete'),
|
||||
clickEvent: 'batchDel',
|
||||
has: 'externalReport:delete'
|
||||
}
|
||||
],
|
||||
labelCol: { span: 6 },
|
||||
wrapperCol: { span: 16 },
|
||||
disabled: false,
|
||||
manager: false, // 是否有树右键菜单
|
||||
addSub: true,
|
||||
dataSource: [],
|
||||
dataSource: [
|
||||
{ id: 1 }
|
||||
],
|
||||
expandedKeys: [],
|
||||
searchValue: '',
|
||||
autoExpandParent: true,
|
||||
@@ -225,7 +272,7 @@ export default {
|
||||
},
|
||||
{
|
||||
title: this.$t('operation'),
|
||||
align: 'left',
|
||||
align: 'center',
|
||||
fixed: 'right',
|
||||
ellipsis: true,
|
||||
width: 240,
|
||||
@@ -233,7 +280,7 @@ export default {
|
||||
}
|
||||
],
|
||||
url: {
|
||||
list: 'com.jero.modules.extRepo/extRepoData/page',
|
||||
list: '/extRepo/extRepoData/page',
|
||||
getSysCategoryTree: '/sys/category/getSysCategoryTree'
|
||||
},
|
||||
// upAccept:'.zip', //导入文件类型
|
||||
|
||||
Reference in New Issue
Block a user