mirror of
https://github.com/Kuingsmile/PicList.git
synced 2026-05-22 08:47:06 +08:00
✨ Feature: add update progress bar and some optimization
ISSUES CLOSED: #83
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user