perf: 优化代码

This commit is contained in:
xingyu
2023-01-04 16:33:51 +08:00
parent e63e5ffe4c
commit ed7e3338f8
30 changed files with 44 additions and 224 deletions

View File

@@ -17,7 +17,7 @@
preIcon="ep:download"
:title="t('action.export')"
v-hasPermi="['pay:app:export']"
@click="handleExport()"
@click="exportList('应用信息.xls')"
/>
</template>
<template #actionbtns_default="{ row }">
@@ -40,7 +40,7 @@
preIcon="ep:delete"
:title="t('action.del')"
v-hasPermi="['pay:app:delete']"
@click="handleDelete(row.id)"
@click="deleteData(row.id)"
/>
</template>
</XTable>
@@ -115,11 +115,6 @@ const handleCreate = () => {
setDialogTile('create')
}
// 导出操作
const handleExport = async () => {
await exportList('应用信息.xls')
}
// 修改操作
const handleUpdate = async (rowId: number) => {
setDialogTile('update')
@@ -135,11 +130,6 @@ const handleDetail = async (rowId: number) => {
detailData.value = res
}
// 删除操作
const handleDelete = async (rowId: number) => {
await deleteData(rowId)
}
// 提交按钮
const submitForm = async () => {
const elForm = unref(formRef)?.getElFormRef()

View File

@@ -17,7 +17,7 @@
preIcon="ep:download"
:title="t('action.export')"
v-hasPermi="['pay:merchant:export']"
@click="handleExport()"
@click="exportList('商户列表.xls')"
/>
</template>
<template #actionbtns_default="{ row }">
@@ -40,7 +40,7 @@
preIcon="ep:delete"
:title="t('action.del')"
v-hasPermi="['pay:merchant:delete']"
@click="handleDelete(row.id)"
@click="deleteData(row.id)"
/>
</template>
</XTable>
@@ -113,11 +113,6 @@ const handleCreate = () => {
setDialogTile('create')
}
// 导出操作
const handleExport = async () => {
await exportList('商户列表.xls')
}
// 修改操作
const handleUpdate = async (rowId: number) => {
setDialogTile('update')
@@ -133,11 +128,6 @@ const handleDetail = async (rowId: number) => {
detailData.value = res
}
// 删除操作
const handleDelete = async (rowId: number) => {
await deleteData(rowId)
}
// 提交按钮
const submitForm = async () => {
const elForm = unref(formRef)?.getElFormRef()

View File

@@ -17,7 +17,7 @@
preIcon="ep:download"
:title="t('action.export')"
v-hasPermi="['pay:order:export']"
@click="handleExport()"
@click="exportList('订单数据.xls')"
/>
</template>
<template #actionbtns_default="{ row }">
@@ -72,10 +72,6 @@ const setDialogTile = (type: string) => {
const handleCreate = () => {
setDialogTile('create')
}
// 导出操作
const handleExport = async () => {
await exportList('订单数据.xls')
}
// 详情操作
const handleDetail = async (rowId: number) => {

View File

@@ -9,7 +9,7 @@
preIcon="ep:download"
:title="t('action.export')"
v-hasPermi="['pay:refund:export']"
@click="handleExport()"
@click="exportList('退款订单.xls')"
/>
</template>
<template #actionbtns_default="{ row }">
@@ -49,11 +49,6 @@ const [registerTable, { exportList }] = useXTable({
exportListApi: RefundApi.exportRefundApi
})
// 导出操作
const handleExport = async () => {
await exportList('退款订单.xls')
}
// ========== CRUD 相关 ==========
const dialogVisible = ref(false) // 是否显示弹出层
const detailData = ref() // 详情 Ref