mirror of
https://github.com/continew-org/continew-admin-ui.git
synced 2025-09-09 20:57:17 +08:00
refactor: 更换 ESLint 配置为 @antfu/eslint-config
This commit is contained in:
@@ -8,8 +8,8 @@
|
||||
:loading="loading"
|
||||
:scroll="{ x: '100%', y: '100%', minWidth: 1300 }"
|
||||
:pagination="pagination"
|
||||
:disabledTools="['size']"
|
||||
:disabledColumnKeys="['name']"
|
||||
:disabled-tools="['size']"
|
||||
:disabled-column-keys="['name']"
|
||||
@refresh="search"
|
||||
>
|
||||
<template #custom-left>
|
||||
@@ -68,8 +68,8 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { listStorage, deleteStorage, type StorageResp, type StorageQuery } from '@/apis'
|
||||
import StorageAddModal from './StorageAddModal.vue'
|
||||
import { type StorageQuery, type StorageResp, deleteStorage, listStorage } from '@/apis'
|
||||
import type { TableInstanceColumns } from '@/components/GiTable/type'
|
||||
import { useTable } from '@/hooks'
|
||||
import { useDict } from '@/hooks/app'
|
||||
@@ -81,6 +81,25 @@ defineOptions({ name: 'SystemStorage' })
|
||||
|
||||
const { storage_type_enum } = useDict('storage_type_enum')
|
||||
|
||||
const queryForm = reactive<StorageQuery>({
|
||||
sort: ['createTime,desc']
|
||||
})
|
||||
|
||||
const {
|
||||
tableData: dataList,
|
||||
loading,
|
||||
pagination,
|
||||
search,
|
||||
handleDelete
|
||||
} = useTable((p) => listStorage({ ...queryForm, page: p.page, size: p.size }), { immediate: true })
|
||||
|
||||
// 重置
|
||||
const reset = () => {
|
||||
queryForm.description = undefined
|
||||
queryForm.status = undefined
|
||||
search()
|
||||
}
|
||||
|
||||
const columns: TableInstanceColumns[] = [
|
||||
{
|
||||
title: '序号',
|
||||
@@ -111,25 +130,6 @@ const columns: TableInstanceColumns[] = [
|
||||
}
|
||||
]
|
||||
|
||||
const queryForm = reactive<StorageQuery>({
|
||||
sort: ['createTime,desc']
|
||||
})
|
||||
|
||||
const {
|
||||
tableData: dataList,
|
||||
loading,
|
||||
pagination,
|
||||
search,
|
||||
handleDelete
|
||||
} = useTable((p) => listStorage({ ...queryForm, page: p.page, size: p.size }), { immediate: true })
|
||||
|
||||
// 重置
|
||||
const reset = () => {
|
||||
queryForm.description = undefined
|
||||
queryForm.status = undefined
|
||||
search()
|
||||
}
|
||||
|
||||
// 删除
|
||||
const onDelete = (item: StorageResp) => {
|
||||
return handleDelete(() => deleteStorage(item.id), { content: `是否确定删除存储 [${item.name}]?`, showModal: true })
|
||||
|
Reference in New Issue
Block a user