Files
certd/packages/ui/certd-client/src/views/sys/plugin/index.vue
T

59 lines
1.6 KiB
Vue
Raw Normal View History

2024-10-13 01:27:08 +08:00
<template>
<fs-page class="page-cert">
<template #header>
2025-04-11 14:00:28 +08:00
<div class="title">
插件管理
<span class="sub">自定义插件处于BETA测试版后续可能会有破坏性变更</span>
</div>
2024-10-13 01:27:08 +08:00
</template>
<fs-crud ref="crudRef" v-bind="crudBinding">
<!-- <template #pagination-left>-->
<!-- <a-tooltip title="批量删除">-->
<!-- <fs-button icon="DeleteOutlined" @click="handleBatchDelete"></fs-button>-->
<!-- </a-tooltip>-->
<!-- </template>-->
</fs-crud>
</fs-page>
</template>
<script lang="ts" setup>
2025-04-08 23:36:50 +08:00
import { onActivated, onMounted } from "vue";
2024-10-13 01:27:08 +08:00
import { useFs } from "@fast-crud/fast-crud";
import createCrudOptions from "./crud";
import { message, Modal } from "ant-design-vue";
import { DeleteBatch } from "./api";
defineOptions({
2025-04-08 22:56:38 +08:00
name: "SysPlugin",
2024-10-13 01:27:08 +08:00
});
const { crudBinding, crudRef, crudExpose, context } = useFs({ createCrudOptions });
2025-04-08 23:36:50 +08:00
onActivated(async () => {
await crudExpose.doRefresh();
});
2024-10-13 01:27:08 +08:00
const selectedRowKeys = context.selectedRowKeys;
const handleBatchDelete = () => {
if (selectedRowKeys.value?.length > 0) {
Modal.confirm({
title: "确认",
content: `确定要批量删除这${selectedRowKeys.value.length}条记录吗`,
async onOk() {
await DeleteBatch(selectedRowKeys.value);
message.info("删除成功");
crudExpose.doRefresh();
selectedRowKeys.value = [];
2025-04-08 22:56:38 +08:00
},
2024-10-13 01:27:08 +08:00
});
} else {
message.error("请先勾选记录");
}
};
// 页面打开后获取列表数据
onMounted(() => {
crudExpose.doRefresh();
});
</script>
<style lang="less"></style>