删除 tipsPreference.

This commit is contained in:
lijiahang
2023-10-08 17:51:30 +08:00
parent fbd815a10e
commit 66b2539630
13 changed files with 68 additions and 86 deletions

View File

@@ -4,6 +4,7 @@ import { FavoriteType, addFavorite, cancelFavorite } from '@/api/meta/favorite';
export default function useFavorite(type: FavoriteType) {
const toggle = async (record: any, id: number, cancelField = 'favorite') => {
const request = { relId: id, type };
Message.clear();
const loading = Message.loading(record[cancelField] ? '取消中' : '收藏中');
try {
if (record[cancelField]) {