提交 e2b85900 编写于 作者: kadycui's avatar kadycui 💻

ADD: 封装公告模块

上级 bb9acd61
......@@ -73,36 +73,22 @@ import {
} from "@/api/notice"
import FormDrawer from "@/components/FormDrawer.vue"
import { toast } from "@/composables/util"
import { useInitTable } from "@/composables/useCommon.js"
// 加载动画
const loading = ref(false)
const {
tableData,
loading,
currentPage,
total,
limit,
getData
// 分页
const currentPage = ref(1)
const total = ref(0)
const limit = ref(10)
const tableData = ref([])
// 获取数据
function getData(p = null) {
if (typeof p == "number") {
currentPage.value = p
}
loading.value = true
getNoticeList(currentPage.value)
.then(res => {
tableData.value = res.list
total.value = res.totalCount
})
.finally(() => {
loading.value = false
})
} = useInitTable({
getList: getNoticeList
})
}
getData()
// 删除公告
const handleDelete=(id)=>{
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册