Commit 16dbb0c8 authored by dragondean@qq.com's avatar dragondean@qq.com

产品全清

parent 14827641
......@@ -27,8 +27,10 @@
</div>
<div class="flex-1 ml-10">
<el-card style="height:100%">
<div slot="header" class="header">
{{$t('已选{cnt}个产品', {cnt: isAllProduct ? total : choosedList.length})}}
<div slot="header" class="header flex">
<div class="flex-1 flex items-center">{{$t('已选{cnt}个产品', {cnt: isAllProduct ? total : choosedList.length})}}</div>
<el-button v-if="choosedList.length" type="text" @click="clearAll">{{$t('全部清除')}}</el-button>
</div>
<div class="list">
<div class="item" v-for="(choosed) in choosedList" :key="choosed.id" :data-data="JSON.stringify(choosed)">
......@@ -189,6 +191,11 @@ export default {
this.choosedList.forEach((choosed, index) => {
if (choosed.id == item.id) this.choosedList.splice(index, 1)
})
},
// 清除全部
async clearAll() {
await this.$confirm(this.$t('确定要全部清除么?'))
this.choosedList = []
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment