mirror of
https://github.com/continew-org/continew-admin-ui.git
synced 2025-09-13 14:57:14 +08:00
refactor: 更换 ESLint 配置为 @antfu/eslint-config
This commit is contained in:
@@ -9,8 +9,8 @@
|
||||
:loading="loading"
|
||||
:scroll="{ x: '100%', y: '100%', minWidth: 1000 }"
|
||||
:pagination="pagination"
|
||||
:disabledTools="['size']"
|
||||
:disabledColumnKeys="['title']"
|
||||
:disabled-tools="['size']"
|
||||
:disabled-column-keys="['title']"
|
||||
@refresh="search"
|
||||
>
|
||||
<template #custom-left>
|
||||
@@ -58,9 +58,9 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { listNotice, deleteNotice, type NoticeResp, type NoticeQuery } from '@/apis'
|
||||
import NoticeAddModal from './NoticeAddModal.vue'
|
||||
import NoticeDetailModal from './NoticeDetailModal.vue'
|
||||
import { type NoticeQuery, type NoticeResp, deleteNotice, listNotice } from '@/apis'
|
||||
import type { TableInstanceColumns } from '@/components/GiTable/type'
|
||||
import { useTable } from '@/hooks'
|
||||
import { useDict } from '@/hooks/app'
|
||||
@@ -71,6 +71,25 @@ defineOptions({ name: 'SystemNotice' })
|
||||
|
||||
const { notice_type, notice_status_enum } = useDict('notice_type', 'notice_status_enum')
|
||||
|
||||
const queryForm = reactive<NoticeQuery>({
|
||||
sort: ['createTime,desc']
|
||||
})
|
||||
|
||||
const {
|
||||
tableData: dataList,
|
||||
loading,
|
||||
pagination,
|
||||
search,
|
||||
handleDelete
|
||||
} = useTable((p) => listNotice({ ...queryForm, page: p.page, size: p.size }), { immediate: true })
|
||||
|
||||
// 重置
|
||||
const reset = () => {
|
||||
queryForm.title = undefined
|
||||
queryForm.type = undefined
|
||||
search()
|
||||
}
|
||||
|
||||
const columns: TableInstanceColumns[] = [
|
||||
{
|
||||
title: '序号',
|
||||
@@ -95,25 +114,6 @@ const columns: TableInstanceColumns[] = [
|
||||
}
|
||||
]
|
||||
|
||||
const queryForm = reactive<NoticeQuery>({
|
||||
sort: ['createTime,desc']
|
||||
})
|
||||
|
||||
const {
|
||||
tableData: dataList,
|
||||
loading,
|
||||
pagination,
|
||||
search,
|
||||
handleDelete
|
||||
} = useTable((p) => listNotice({ ...queryForm, page: p.page, size: p.size }), { immediate: true })
|
||||
|
||||
// 重置
|
||||
const reset = () => {
|
||||
queryForm.title = undefined
|
||||
queryForm.type = undefined
|
||||
search()
|
||||
}
|
||||
|
||||
// 删除
|
||||
const onDelete = (item: NoticeResp) => {
|
||||
return handleDelete(() => deleteNotice(item.id), {
|
||||
|
Reference in New Issue
Block a user