优化后台用户列表和回收站

This commit is contained in:
pushuo 2022-08-16 14:03:03 +08:00
parent f911ddbd68
commit 036b6a466e
2 changed files with 7 additions and 5 deletions

View File

@ -35,7 +35,7 @@
<td>@{{ tax.name }}</td> <td>@{{ tax.name }}</td>
<td>@{{ tax.email }}</td> <td>@{{ tax.email }}</td>
<td> <td>
<span v-for="role, role_index in tax.roles" :key="role_index"> <span v-for="role, role_index in tax.roles_name" :key="role_index">
@{{ role }} @{{ role }}
</span> </span>
</td> </td>

View File

@ -109,11 +109,13 @@
<td>@{{ item.position }}</td> <td>@{{ item.position }}</td>
<td>@{{ item.active ? '上架' : '下架' }}</td> <td>@{{ item.active ? '上架' : '下架' }}</td>
<td width="140" class="text-end"> <td width="140" class="text-end">
<a :href="item.url_edit" class="btn btn-outline-dark btn-sm">编辑</a> <template v-if="item.deleted_at == ''">
<template> <a :href="item.url_edit" class="btn btn-outline-secondary btn-sm">编辑</a>
<a v-if="item.deleted_at == ''" href="javascript:void(0)" class="btn btn-outline-danger btn-sm" <a href="javascript:void(0)" class="btn btn-outline-danger btn-sm"
@click.prevent="deleteProduct(index)">删除</a> @click.prevent="deleteProduct(index)">删除</a>
<a v-else href="javascript:void(0)" class="btn btn-outline-secondary btn-sm" </template>
<template v-else>
<a href="javascript:void(0)" class="btn btn-outline-secondary btn-sm"
@click.prevent="restoreProduct(index)">恢复</a> @click.prevent="restoreProduct(index)">恢复</a>
</template> </template>
</td> </td>