feat: 用户系统 — 注册/登录 + 数据云同步(收藏/最近/记录/书签) + 工具文件云端留档
This commit is contained in:
1 parent
fed65ceb80
commit
580c5997b4
12 files changed
+754
No files matched your search
@@ -1,4 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
import { useUserAuth } from '@/composable/user-auth';
|
||||
import exifr from 'exifr';
|
||||
import QRCode from 'qrcode';
|
||||
import { prepareZXingModule, readBarcodes } from 'zxing-wasm/reader';
|
||||
@@ -100,7 +101,12 @@ function onDrop(e: DragEvent) {
|
||||
addFiles(Array.from(e.dataTransfer?.files ?? []));
|
||||
}
|
||||
|
||||
const { cloudUpload } = useUserAuth();
|
||||
|
||||
function addFiles(list: File[]) {
|
||||
for (const f of list) {
|
||||
cloudUpload(f, 'image-tools').catch(() => {});
|
||||
}
|
||||
const imgs = list.filter(f => f.type.startsWith('image/'));
|
||||
if (!imgs.length) {
|
||||
errorMsg.value = '请选择图片文件';
|
||||
|
||||
Reference in new issue
Block a user