Feature: add update progress bar and some optimization

ISSUES CLOSED: #83
This commit is contained in:
萌萌哒赫萝
2023-08-10 00:11:57 -07:00
parent 13852a5c1b
commit 517348886c
13 changed files with 1029 additions and 1056 deletions

View File

@@ -4,15 +4,9 @@ import { isReactive, isRef, toRaw, unref } from 'vue'
* get raw data from reactive or ref
*/
export const getRawData = (args: any): any => {
if (isRef(args)) {
return unref(args)
}
if (isReactive(args)) {
return toRaw(args)
}
if (Array.isArray(args)) {
return args.map(getRawData)
}
if (isRef(args)) return unref(args)
if (isReactive(args)) return toRaw(args)
if (Array.isArray(args)) return args.map(getRawData)
if (typeof args === 'object' && args !== null) {
const data = {} as Record<string, any>
for (const key in args) {