Closed Javey closed 6 months ago
问题依然存在,因为vue会将files转成proxy对象,导致isEqualArray判断失效,可以采用vue的toRaw方法还原在比较
export function isProxy(value: any): boolean {
return value ? !!value[ReactiveFlags.RAW] : false
}
export function toRaw<T>(observed: T): T {
const raw = observed && (observed as Target)[ReactiveFlags.RAW]
return raw ? toRaw(raw) : observed
}
ReactiveFlags.RAW = '__v_raw'
CodeSandbox
Description