feat: 🚀 添加权限显示

This commit is contained in:
Bunny 2024-12-29 15:00:42 +08:00
parent 07ed1789ab
commit c75f12a2b1
15 changed files with 243 additions and 45 deletions

View File

@ -1,5 +1,5 @@
# 平台本地运行端口号
VITE_PORT=1010
VITE_PORT=1000
# 预发布环境路由历史模式Hash模式传"hash"、HTML5模式传"h5"、Hash模式带base参数传"hash,base参数"、HTML5模式带base参数传"h5,base参数"
VITE_ROUTER_HISTORY="hash"
@ -8,7 +8,7 @@ VITE_ROUTER_HISTORY="hash"
VITE_BASE_API=/api
# 跨域代理地址
VITE_APP_URL=http://localhost:1000
VITE_APP_URL=http://localhost:1010
# mock地址
VITE_MOCK_BASE_API=/mock

View File

@ -1,9 +1,11 @@
const baseRequestUrl = 'http://localhost:1010';
/**
* * 自动创建权限内容
*/
(async function requestPath() {
// 获取基础paths对象
const response = await fetch('http://localhost:7070/v3/api-docs/%E9%BB%98%E8%AE%A4%E8%AF%B7%E6%B1%82%E6%8E%A5%E5%8F%A3', { method: 'GET' });
const response = await fetch(`${baseRequestUrl}/v3/api-docs/%E5%90%8E%E5%8F%B0%E7%AE%A1%E7%90%86`, { method: 'GET' });
const json = await response.json();
const paths = json.paths;
@ -71,12 +73,12 @@
// 向服务器添加的内容
async function add(data) {
const response = await fetch('http://localhost:7070/admin/power/addPower', {
const response = await fetch(`${baseRequestUrl}/admin/power/addPower`, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
token:
'eyJhbGciOiJIUzI1NiIsInppcCI6IkdaSVAifQ.H4sIAAAAAAAA_yWLywqFIBQA_-WsE9Sjt2xXuz7jmAYGWfiAIu6_X-HuhmHmhVwtjDDXGB_owN8XjKJH3iMayTuo2afFNffHSIdv-eSOEEMuicqZ2raX0Kx22g4ciRkUyBRpw6yxgq1S0SBXubnPBt8fEjhnWnMAAAA.YwSm-NO_6Kg1k1GRwucIt50Y70FbPHoldsdTPVHK_Y4',
'eyJhbGciOiJIUzI1NiIsInppcCI6IkdaSVAifQ.H4sIAAAAAAAA_yWLSwrDIBQA7_LWCjE-f9k1ux7D1CdYiCl-ICXk7hW6G4aZC2rfYIG15_wFBnR-YBFGKus0WsOgVyrPMNwfs99p5I-wp5xqK74dZWzvloZVOEvnhea0ReI4aeQe0XCrhCP10jJOEe4fV-ghSXMAAAA.Vr41db3JGTYyZyz2H1YxNFvJjFkOZ0bq6RziYJ3uhBc',
},
body: JSON.stringify(data),
});

View File

@ -18,6 +18,8 @@ import LoadingSvg from '@/assets/svg/loading.svg';
import { useAdminUserStore } from '@/store/system/adminUser';
import Upload from '@iconify-icons/ep/upload';
import { currentMouth, currentWeek, currentYear, shortcutsAllMouth } from '@/enums/dateEnums';
import { hasAuth } from '@/router/utils';
import { auth } from '@/views/financial/account-bill/bill/utils/auth';
const tableRef = ref();
const formRef = ref();
@ -132,15 +134,23 @@ onMounted(() => {
<!-- 搜索 -->
<el-form-item>
<el-button :icon="useRenderIcon('ri:search-line')" :loading="billStore.loading" type="primary" @click="onSearch"> {{ $t('search') }} </el-button>
<el-button :icon="useRenderIcon(Refresh)" @click="resetForm(formRef)"> {{ $t('buttons.reset') }}</el-button>
<el-button v-if="hasAuth(auth.search)" :icon="useRenderIcon('ri:search-line')" :loading="billStore.loading" type="primary" @click="onSearch">
{{ $t('search') }}
</el-button>
<el-button v-if="hasAuth(auth.search)" :icon="useRenderIcon(Refresh)" @click="resetForm(formRef)">
{{ $t('buttons.reset') }}
</el-button>
</el-form-item>
</el-form>
<PureTableBar :columns="columns" title="账单信息" @fullscreen="tableRef.setAdaptive()" @refresh="onSearch">
<template #buttons>
<el-button :icon="useRenderIcon(Upload)" type="primary" @click="onExportBill"> {{ $t('exportBill') }} </el-button>
<el-button :icon="useRenderIcon(AddFill)" type="primary" @click="onAdd"> {{ $t('addNew') }}</el-button>
<el-button v-if="hasAuth(auth.exportBill)" :icon="useRenderIcon(Upload)" type="primary" @click="onExportBill">
{{ $t('exportBill') }}
</el-button>
<el-button v-if="hasAuth(auth.add)" :icon="useRenderIcon(AddFill)" type="primary" @click="onAdd">
{{ $t('addNew') }}
</el-button>
<!-- 批量删除按钮 -->
<el-button v-show="deleteIds.length > 0" :icon="useRenderIcon(Delete)" type="danger" @click="onDeleteBatch">
@ -188,10 +198,18 @@ onMounted(() => {
</template>
<template #operation="{ row }">
<el-button :icon="useRenderIcon(EditPen)" :size="size" class="reset-margin" link type="primary" @click="onUpdate(row)">
<el-button
v-if="hasAuth(auth.update)"
:icon="useRenderIcon(EditPen)"
:size="size"
class="reset-margin"
link
type="primary"
@click="onUpdate(row)"
>
{{ $t('modify') }}
</el-button>
<el-popconfirm :title="`${$t('delete')}${row.description}?`" @confirm="onDelete(row)">
<el-popconfirm v-if="hasAuth(auth.deleted)" :title="`${$t('delete')}${row.description}?`" @confirm="onDelete(row)">
<template #reference>
<el-button :icon="useRenderIcon(Delete)" :size="size" class="reset-margin" link type="primary">
{{ $t('delete') }}

View File

@ -0,0 +1,12 @@
export const auth = {
// 分页查询
search: ['bill::getBillList'],
// 添加操作
add: ['bill::addBill'],
// 更新操作
update: ['bill::updateBill'],
// 删除操作
deleted: ['bill::deleteBill'],
// 导出账单
exportBill: ['bill::exportBillByAdmin'],
};

View File

@ -25,6 +25,8 @@ import { usePublicHooks } from '@/views/hooks';
import { isDefaultOptions } from '@/enums/baseConstant';
import LoadingSvg from '@/assets/svg/loading.svg';
import { useAdminUserStore } from '@/store/system/adminUser';
import { auth } from '@/views/financial/account-bill/category/utils/auth';
import { hasAuth } from '@/router/utils';
const tableRef = ref();
const formRef = ref();
@ -113,19 +115,23 @@ onMounted(() => {
<!-- 查询 -->
<el-form-item>
<el-button :icon="useRenderIcon('ri:search-line')" :loading="categoryStore.loading" type="primary" @click="onSearch">
<el-button v-if="hasAuth(auth.search)" :icon="useRenderIcon('ri:search-line')" :loading="categoryStore.loading" type="primary" @click="onSearch">
{{ $t('search') }}
</el-button>
<el-button :icon="useRenderIcon(Refresh)" @click="resetForm(formRef)"> {{ $t('buttons.reset') }}</el-button>
<el-button v-if="hasAuth(auth.search)" :icon="useRenderIcon(Refresh)" @click="resetForm(formRef)">
{{ $t('buttons.reset') }}
</el-button>
</el-form-item>
</el-form>
<PureTableBar :columns="columns" :title="$t('category')" @fullscreen="tableRef.setAdaptive()" @refresh="onSearch">
<template #buttons>
<el-button :icon="useRenderIcon(AddFill)" type="primary" @click="onAdd"> {{ $t('addNew') }}</el-button>
<el-button v-if="hasAuth(auth.add)" :icon="useRenderIcon(AddFill)" type="primary" @click="onAdd">
{{ $t('addNew') }}
</el-button>
<!-- 批量删除按钮 -->
<el-button v-show="deleteIds.length > 0" :icon="useRenderIcon(Delete)" type="danger" @click="onDeleteBatch">
<el-button v-if="hasAuth(auth.deleted)" v-show="deleteIds.length > 0" :icon="useRenderIcon(Delete)" type="danger" @click="onDeleteBatch">
{{ $t('delete_batches') }}
</el-button>
</template>
@ -186,10 +192,18 @@ onMounted(() => {
</template>
<template #operation="{ row }">
<el-button :icon="useRenderIcon(EditPen)" :size="size" class="reset-margin" link type="primary" @click="onUpdate(row)">
<el-button
v-if="hasAuth(auth.update)"
:icon="useRenderIcon(EditPen)"
:size="size"
class="reset-margin"
link
type="primary"
@click="onUpdate(row)"
>
{{ $t('modify') }}
</el-button>
<el-popconfirm :title="`${$t('delete')}${row.categoryName}?`" @confirm="onDelete(row)">
<el-popconfirm v-if="hasAuth(auth.deleted)" :title="`${$t('delete')}${row.categoryName}?`" @confirm="onDelete(row)">
<template #reference>
<el-button :icon="useRenderIcon(Delete)" :size="size" class="reset-margin" link type="primary">
{{ $t('delete') }}

View File

@ -0,0 +1,10 @@
export const auth = {
// 分页查询
search: ['category::getCategoryList'],
// 添加操作
add: ['category::addCategory'],
// 更新操作
update: ['category::updateCategory'],
// 删除操作
deleted: ['category::deleteCategory'],
};

View File

@ -17,6 +17,8 @@ import { useAdminUserStore } from '@/store/system/adminUser';
import LoadingSvg from '@/assets/svg/loading.svg';
import { budget } from '@/enums/bill/budget';
import { handleTree } from '@pureadmin/utils';
import { auth } from '@/views/financial/budget-saving/budget-category/utils/auth';
import { hasAuth } from '@/router/utils';
const tableRef = ref();
const formRef = ref();
@ -142,10 +144,18 @@ onMounted(() => {
<!-- 搜索和重置 -->
<el-form-item>
<el-button :icon="useRenderIcon('ri:search-line')" :loading="budgetCategoryStore.loading" type="primary" @click="onSearch">
<el-button
v-if="hasAuth(auth.search)"
:icon="useRenderIcon('ri:search-line')"
:loading="budgetCategoryStore.loading"
type="primary"
@click="onSearch"
>
{{ $t('search') }}
</el-button>
<el-button :icon="useRenderIcon(Refresh)" @click="resetForm(formRef)"> {{ $t('buttons.reset') }}</el-button>
<el-button v-if="hasAuth(auth.search)" :icon="useRenderIcon(Refresh)" @click="resetForm(formRef)">
{{ $t('buttons.reset') }}
</el-button>
</el-form-item>
</el-form>
@ -158,10 +168,12 @@ onMounted(() => {
@refresh="onSearch"
>
<template #buttons>
<el-button :icon="useRenderIcon(AddFill)" type="primary" @click="onAdd('0')"> {{ $t('addNew') }}</el-button>
<el-button v-if="hasAuth(auth.add)" :icon="useRenderIcon(AddFill)" type="primary" @click="onAdd('0')">
{{ $t('addNew') }}
</el-button>
<!-- 批量删除按钮 -->
<el-button v-show="deleteIds.length > 0" :icon="useRenderIcon(Delete)" type="danger" @click="onDeleteBatch">
<el-button v-if="hasAuth(auth.deleted)" v-show="deleteIds.length > 0" :icon="useRenderIcon(Delete)" type="danger" @click="onDeleteBatch">
{{ $t('delete_batches') }}
</el-button>
</template>
@ -211,13 +223,21 @@ onMounted(() => {
</template>
<template #operation="{ row }">
<el-button :icon="useRenderIcon(EditPen)" :size="size" class="reset-margin" link type="primary" @click="onUpdate(row)">
<el-button
v-if="hasAuth(auth.update)"
:icon="useRenderIcon(EditPen)"
:size="size"
class="reset-margin"
link
type="primary"
@click="onUpdate(row)"
>
{{ $t('modify') }}
</el-button>
<el-button :icon="useRenderIcon(AddFill)" :size="size" class="reset-margin" link type="primary" @click="onAdd(row.id)">
<el-button v-if="hasAuth(auth.add)" :icon="useRenderIcon(AddFill)" :size="size" class="reset-margin" link type="primary" @click="onAdd(row.id)">
{{ $t('addNew') }}
</el-button>
<el-popconfirm :title="`${$t('delete')}${row.budgetName}?`" @confirm="onDelete(row)">
<el-popconfirm v-if="hasAuth(auth.deleted)" :title="`${$t('delete')}${row.budgetName}?`" @confirm="onDelete(row)">
<template #reference>
<el-button :icon="useRenderIcon(Delete)" :size="size" class="reset-margin" link type="primary">
{{ $t('delete') }}

View File

@ -0,0 +1,10 @@
export const auth = {
// 分页查询
search: ['budgetCategory::getBudgetCategoryList'],
// 添加操作
add: ['budgetCategory::addBudgetCategory'],
// 更新操作
update: ['budgetCategory::updateBudgetCategory'],
// 删除操作
deleted: ['budgetCategory::deleteBudgetCategory'],
};

View File

@ -17,6 +17,8 @@ import LoadingSvg from '@/assets/svg/loading.svg';
import { budget } from '@/enums/bill/budget';
import { selectUserinfo } from '@/components/Table/Userinfo/columns';
import { savingGoal } from '@/enums/bill/savingGoal';
import { hasAuth } from '@/router/utils';
import { auth } from '@/views/financial/budget-saving/saving-goal/utils/auth';
const tableRef = ref();
const formRef = ref();
@ -136,19 +138,29 @@ onMounted(() => {
<!-- 搜索和重置 -->
<el-form-item>
<el-button :icon="useRenderIcon('ri:search-line')" :loading="savingGoalStore.loading" type="primary" @click="onSearch">
<el-button
v-if="hasAuth(auth.search)"
:icon="useRenderIcon('ri:search-line')"
:loading="savingGoalStore.loading"
type="primary"
@click="onSearch"
>
{{ $t('search') }}
</el-button>
<el-button :icon="useRenderIcon(Refresh)" @click="resetForm(formRef)"> {{ $t('buttons.reset') }}</el-button>
<el-button v-if="hasAuth(auth.search)" :icon="useRenderIcon(Refresh)" @click="resetForm(formRef)">
{{ $t('buttons.reset') }}
</el-button>
</el-form-item>
</el-form>
<PureTableBar :columns="columns" :title="$t('savingGoal')" @fullscreen="tableRef.setAdaptive()" @refresh="onSearch">
<template #buttons>
<el-button :icon="useRenderIcon(AddFill)" type="primary" @click="onAdd"> {{ $t('addNew') }}</el-button>
<el-button v-if="hasAuth(auth.add)" :icon="useRenderIcon(AddFill)" type="primary" @click="onAdd">
{{ $t('addNew') }}
</el-button>
<!-- 批量删除按钮 -->
<el-button v-show="deleteIds.length > 0" :icon="useRenderIcon(Delete)" type="danger" @click="onDeleteBatch">
<el-button v-if="hasAuth(auth.deleted)" v-show="deleteIds.length > 0" :icon="useRenderIcon(Delete)" type="danger" @click="onDeleteBatch">
{{ $t('delete_batches') }}
</el-button>
</template>
@ -197,10 +209,18 @@ onMounted(() => {
</template>
<template #operation="{ row }">
<el-button :icon="useRenderIcon(EditPen)" :size="size" class="reset-margin" link type="primary" @click="onUpdate(row)">
<el-button
v-if="hasAuth(auth.update)"
:icon="useRenderIcon(EditPen)"
:size="size"
class="reset-margin"
link
type="primary"
@click="onUpdate(row)"
>
{{ $t('modify') }}
</el-button>
<el-popconfirm :title="`${$t('delete')}?`" @confirm="onDelete(row)">
<el-popconfirm v-if="hasAuth(auth.deleted)" :title="`${$t('delete')}?`" @confirm="onDelete(row)">
<template #reference>
<el-button :icon="useRenderIcon(Delete)" :size="size" class="reset-margin" link type="primary">
{{ $t('delete') }}

View File

@ -0,0 +1,10 @@
export const auth = {
// 分页查询
search: ['savingGoal::getSavingGoalList'],
// 添加操作
add: ['savingGoal::addSavingGoal'],
// 更新操作
update: ['savingGoal::updateSavingGoal'],
// 删除操作
deleted: ['savingGoal::deleteSavingGoal'],
};

View File

@ -16,6 +16,8 @@ import { selectUserinfo } from '@/components/Table/Userinfo/columns';
import LoadingSvg from '@/assets/svg/loading.svg';
import { useAdminUserStore } from '@/store/system/adminUser';
import { debtTracking } from '@/enums/bill/debtTracking';
import { hasAuth } from '@/router/utils';
import { auth } from '@/views/financial/debt/debt-repayment-plan/utils/auth';
const tableRef = ref();
const formRef = ref();
@ -89,12 +91,22 @@ onMounted(() => {
<!-- 债务金额 -->
<el-form-item :label="$t('installmentNumber')" prop="installmentNumber">
<el-input v-model="debtRepaymentPlanStore.form.installmentNumber" :placeholder="`${$t('input')}${$t('installmentNumber')}`" class="!w-[180px]" clearable />
<el-input
v-model="debtRepaymentPlanStore.form.installmentNumber"
:placeholder="`${$t('input')}${$t('installmentNumber')}`"
class="!w-[180px]"
clearable
/>
</el-form-item>
<!-- 每期应还金额 -->
<el-form-item :label="$t('installmentAmount')" prop="installmentAmount">
<el-input v-model="debtRepaymentPlanStore.form.installmentAmount" :placeholder="`${$t('input')}${$t('installmentAmount')}`" class="!w-[180px]" clearable />
<el-input
v-model="debtRepaymentPlanStore.form.installmentAmount"
:placeholder="`${$t('input')}${$t('installmentAmount')}`"
class="!w-[180px]"
clearable
/>
</el-form-item>
<!-- 已还金额 -->
@ -133,19 +145,29 @@ onMounted(() => {
<!-- 搜索和重置 -->
<el-form-item>
<el-button :icon="useRenderIcon('ri:search-line')" :loading="debtRepaymentPlanStore.loading" type="primary" @click="onSearch">
<el-button
v-if="hasAuth(auth.search)"
:icon="useRenderIcon('ri:search-line')"
:loading="debtRepaymentPlanStore.loading"
type="primary"
@click="onSearch"
>
{{ $t('search') }}
</el-button>
<el-button :icon="useRenderIcon(Refresh)" @click="resetForm(formRef)"> {{ $t('buttons.reset') }}</el-button>
<el-button v-if="hasAuth(auth.search)" :icon="useRenderIcon(Refresh)" @click="resetForm(formRef)">
{{ $t('buttons.reset') }}
</el-button>
</el-form-item>
</el-form>
<PureTableBar :columns="columns" :title="$t('debtRepaymentPlan')" @fullscreen="tableRef.setAdaptive()" @refresh="onSearch">
<template #buttons>
<el-button :icon="useRenderIcon(AddFill)" type="primary" @click="onAdd"> {{ $t('addNew') }}</el-button>
<el-button v-if="hasAuth(auth.add)" :icon="useRenderIcon(AddFill)" type="primary" @click="onAdd">
{{ $t('addNew') }}
</el-button>
<!-- 批量删除按钮 -->
<el-button v-show="deleteIds.length > 0" :icon="useRenderIcon(Delete)" type="danger" @click="onDeleteBatch">
<el-button v-if="hasAuth(auth.deleted)" v-show="deleteIds.length > 0" :icon="useRenderIcon(Delete)" type="danger" @click="onDeleteBatch">
{{ $t('delete_batches') }}
</el-button>
</template>
@ -194,8 +216,18 @@ onMounted(() => {
</template>
<template #operation="{ row }">
<el-button :icon="useRenderIcon(EditPen)" :size="size" class="reset-margin" link type="primary" @click="onUpdate(row)"> {{ $t('modify') }} </el-button>
<el-popconfirm :title="`${$t('delete')}?`" @confirm="onDelete(row)">
<el-button
v-if="hasAuth(auth.update)"
:icon="useRenderIcon(EditPen)"
:size="size"
class="reset-margin"
link
type="primary"
@click="onUpdate(row)"
>
{{ $t('modify') }}
</el-button>
<el-popconfirm v-if="hasAuth(auth.deleted)" :title="`${$t('delete')}?`" @confirm="onDelete(row)">
<template #reference>
<el-button :icon="useRenderIcon(Delete)" :size="size" class="reset-margin" link type="primary">
{{ $t('delete') }}

View File

@ -0,0 +1,10 @@
export const auth = {
// 分页查询
search: ['debtRepaymentPlan::getDebtRepaymentPlanList'],
// 添加操作
add: ['debtRepaymentPlan::addDebtRepaymentPlan'],
// 更新操作
update: ['debtRepaymentPlan::updateDebtRepaymentPlan'],
// 删除操作
deleted: ['debtRepaymentPlan::deleteDebtRepaymentPlan'],
};

View File

@ -16,6 +16,8 @@ import { selectUserinfo } from '@/components/Table/Userinfo/columns';
import LoadingSvg from '@/assets/svg/loading.svg';
import { useAdminUserStore } from '@/store/system/adminUser';
import { debtTracking, debtType } from '@/enums/bill/debtTracking';
import { hasAuth } from '@/router/utils';
import { auth } from '@/views/financial/debt/debt-tracking/utils/auth';
const tableRef = ref();
const formRef = ref();
@ -143,19 +145,29 @@ onMounted(() => {
<!-- 搜索和重置 -->
<el-form-item>
<el-button :icon="useRenderIcon('ri:search-line')" :loading="debtTrackingStore.loading" type="primary" @click="onSearch">
<el-button
v-if="hasAuth(auth.search)"
:icon="useRenderIcon('ri:search-line')"
:loading="debtTrackingStore.loading"
type="primary"
@click="onSearch"
>
{{ $t('search') }}
</el-button>
<el-button :icon="useRenderIcon(Refresh)" @click="resetForm(formRef)"> {{ $t('buttons.reset') }}</el-button>
<el-button v-if="hasAuth(auth.search)" :icon="useRenderIcon(Refresh)" @click="resetForm(formRef)">
{{ $t('buttons.reset') }}
</el-button>
</el-form-item>
</el-form>
<PureTableBar :columns="columns" :title="$t('debtTracking')" @fullscreen="tableRef.setAdaptive()" @refresh="onSearch">
<template #buttons>
<el-button :icon="useRenderIcon(AddFill)" type="primary" @click="onAdd"> {{ $t('addNew') }}</el-button>
<el-button v-if="hasAuth(auth.add)" :icon="useRenderIcon(AddFill)" type="primary" @click="onAdd">
{{ $t('addNew') }}
</el-button>
<!-- 批量删除按钮 -->
<el-button v-show="deleteIds.length > 0" :icon="useRenderIcon(Delete)" type="danger" @click="onDeleteBatch">
<el-button v-if="hasAuth(auth.deleted)" v-show="deleteIds.length > 0" :icon="useRenderIcon(Delete)" type="danger" @click="onDeleteBatch">
{{ $t('delete_batches') }}
</el-button>
</template>
@ -208,10 +220,18 @@ onMounted(() => {
</template>
<template #operation="{ row }">
<el-button :icon="useRenderIcon(EditPen)" :size="size" class="reset-margin" link type="primary" @click="onUpdate(row)">
<el-button
v-if="hasAuth(auth.update)"
:icon="useRenderIcon(EditPen)"
:size="size"
class="reset-margin"
link
type="primary"
@click="onUpdate(row)"
>
{{ $t('modify') }}
</el-button>
<el-popconfirm :title="`${$t('delete')}?`" @confirm="onDelete(row)">
<el-popconfirm v-if="hasAuth(auth.deleted)" :title="`${$t('delete')}?`" @confirm="onDelete(row)">
<template #reference>
<el-button :icon="useRenderIcon(Delete)" :size="size" class="reset-margin" link type="primary">
{{ $t('delete') }}

View File

@ -0,0 +1,10 @@
export const auth = {
// 分页查询
search: ['debtTracking::getDebtTrackingList'],
// 添加操作
add: ['debtTracking::addDebtTracking'],
// 更新操作
update: ['debtTracking::updateDebtTracking'],
// 删除操作
deleted: ['debtTracking::deleteDebtTracking'],
};

View File

@ -119,7 +119,17 @@ onMounted(() => {
</template>
<template #operation="{ row }">
<el-button v-if="hasAuth(auth.update)" :icon="useRenderIcon(EditPen)" :size="size" class="reset-margin" link type="primary" @click="onUpdate(row)"> {{ $t('modify') }} </el-button>
<el-button
v-if="hasAuth(auth.update)"
:icon="useRenderIcon(EditPen)"
:size="size"
class="reset-margin"
link
type="primary"
@click="onUpdate(row)"
>
{{ $t('modify') }}
</el-button>
<el-popconfirm v-if="hasAuth(auth.deleted)" :title="`${$t('confirmDelete')} ${row.translation}`" @confirm="onDelete(row)">
<template #reference>
<el-button :icon="useRenderIcon(Delete)" :size="size" class="reset-margin" link type="primary">