mirror of
https://github.com/fastapiadmin/FastapiAdmin.git
synced 2026-10-04 17:14:21 +00:00
refactor: 清理冗余代码与初始化数据,优化配置与调度器
本次提交包含多项优化和清理工作: 1. 新增订单类型枚举BUY,调整定时任务状态显示逻辑 2. 优化Redis连接配置,重构认证逻辑减少重复代码 3. 移除大量初始化演示数据、过期的租户与角色配置 4. 简化调度器状态存储,不再写入配置表而是内存缓存 5. 修复插件开关状态存储逻辑,调整字典数据标签与值 6. 优化WebSocket聊天处理,完善错误处理流程 7. 清理冗余导入与废弃的操作日志过滤逻辑
This commit is contained in:
@@ -121,10 +121,10 @@
|
||||
inline-prompt
|
||||
active-text="启用"
|
||||
inactive-text="禁用"
|
||||
:model-value="item?.config_value === 'true'"
|
||||
:model-value="item?.config_value === 'on'"
|
||||
@update:model-value="
|
||||
(value) => {
|
||||
item!.config_value = value ? 'true' : 'false';
|
||||
item!.config_value = value ? 'on' : 'off';
|
||||
markModified(key);
|
||||
}
|
||||
"
|
||||
|
||||
@@ -354,3 +354,66 @@ function downloadImg() {
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
<!--
|
||||
案例
|
||||
<template>
|
||||
<div class="page-content">
|
||||
<ArtCutterImg
|
||||
v-model:imgUrl="imageUrl"
|
||||
:boxWidth="530"
|
||||
:boxHeight="300"
|
||||
:cutWidth="360"
|
||||
:cutHeight="200"
|
||||
:quality="1"
|
||||
:tool="true"
|
||||
:watermarkText="'My Watermark'"
|
||||
watermarkColor="#ff0000"
|
||||
:showPreview="true"
|
||||
:originalGraph="false"
|
||||
:title="'图片裁剪'"
|
||||
:previewTitle="'预览效果'"
|
||||
@error="handleError"
|
||||
@imageLoadComplete="handleLoadComplete"
|
||||
@imageLoadError="handleLoadError"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import lockImg from '@imgs/lock/bg_dark.webp'
|
||||
|
||||
defineOptions({ name: 'WidgetsImageCrop' })
|
||||
|
||||
/**
|
||||
* 图片 URL
|
||||
*/
|
||||
const imageUrl = ref(lockImg)
|
||||
|
||||
/**
|
||||
* 处理裁剪错误
|
||||
* @param error 错误对象
|
||||
*/
|
||||
const handleError = (error: Error) => {
|
||||
console.error('裁剪错误:', error)
|
||||
ElMessage.error('图片裁剪失败')
|
||||
}
|
||||
|
||||
/**
|
||||
* 处理图片加载完成
|
||||
* @param result 加载结果
|
||||
*/
|
||||
const handleLoadComplete = (result: { url: string; width: number; height: number }) => {
|
||||
console.log('图片加载完成:', result)
|
||||
}
|
||||
|
||||
/**
|
||||
* 处理图片加载错误
|
||||
* @param error 错误对象
|
||||
*/
|
||||
const handleLoadError = (error: Error) => {
|
||||
console.error('图片加载失败:', error)
|
||||
ElMessage.error('图片加载失败')
|
||||
}
|
||||
</script>
|
||||
-->
|
||||
Reference in New Issue
Block a user