[update] 修改企标操作列按钮显示逻辑
This commit is contained in:
@@ -153,15 +153,38 @@
|
||||
<i class="iconfont icon-star" v-show="!record.collectionFlag" />
|
||||
</a>
|
||||
</template>
|
||||
<a-divider v-if="operationList.find(item => item.text === $t('share')) &&
|
||||
<a-divider v-if="operationList.slice(operateMaxNum).filter(item => ![$t('edit'), $t('delete')].includes(item.text)).length > 0 &&
|
||||
operationList.find(item => item.text === $t('enterpriseStandardLibrary.standard.collection'))"
|
||||
type="vertical" />
|
||||
<template v-if="operationList.find(item => item.text === $t('share'))">
|
||||
<template v-for="(operation, index) in operationList.slice(operateMaxNum)">
|
||||
<a :key="index" @click="operationClick(operation,record)" v-if="operation.text === $t('share')">
|
||||
<!-- 分享图标 -->
|
||||
<i class="iconfont icon-fangxingfenxiang operate-btn-icon" />{{ operation.text }}
|
||||
</a>
|
||||
<template v-if="operationList.slice(operateMaxNum).filter(item => ![$t('edit'), $t('delete')].includes(item.text)).length > 0">
|
||||
<!--{{operationList.slice(operateMaxNum).filter(item => ![$t('edit'), $t('delete')].includes(item.text))}}-->
|
||||
<template
|
||||
v-if="operationList.slice(operateMaxNum).filter(item => ![$t('edit'), $t('delete')].includes(item.text)).length <= 1">
|
||||
<template v-for="(operation, index) in operationList.slice(operateMaxNum).filter(item => ![$t('edit'), $t('delete')].includes(item.text))">
|
||||
<a :key="index" @click="operationClick(operation,record)">
|
||||
<!-- 分享图标 -->
|
||||
<i class="iconfont icon-fangxingfenxiang operate-btn-icon" v-if="operation.text === $t('share')"/>
|
||||
<!-- 查看图标-->
|
||||
<i class="iconfont icon-link operate-btn-icon" v-if="operation.text === $t('viewDetail')" />
|
||||
{{ operation.text }}
|
||||
</a>
|
||||
</template>
|
||||
</template>
|
||||
<template v-else>
|
||||
<a-dropdown placement="bottomCenter">
|
||||
<a-icon type="more" class="operate-icon-btn operate-icon-more" />
|
||||
<a-menu slot="overlay">
|
||||
<a-menu-item v-for="(operation, index) in operationList.slice(operateMaxNum).filter(item => ![$t('edit'), $t('delete')].includes(item.text))" :key="index">
|
||||
<a @click="operationClick(operation,record)">
|
||||
<!-- 查看图标-->
|
||||
<i class="iconfont icon-link operate-btn-icon" v-if="operation.text === $t('viewDetail')" />
|
||||
<!-- 分享图标 -->
|
||||
<i class="iconfont icon-fangxingfenxiang operate-btn-icon" v-if="operation.text === $t('share')" />
|
||||
{{ operation.text }}
|
||||
</a>
|
||||
</a-menu-item>
|
||||
</a-menu>
|
||||
</a-dropdown>
|
||||
</template>
|
||||
</template>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user