Skip to content

Commit a4d5979

Browse files
authored
refactor: use utils proxy (#740)
1 parent d5f33bb commit a4d5979

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/utils/instance.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,14 @@ export function asVmProperty(
2020
},
2121
})
2222
} else {
23-
Object.defineProperty(vm, propName, {
24-
enumerable: true,
25-
configurable: true,
23+
proxy(vm, propName, {
2624
get: () => {
2725
if (isReactive(propValue)) {
2826
;(propValue as any).__ob__.dep.depend()
2927
}
3028
return propValue
3129
},
32-
set: (val) => {
30+
set: (val: any) => {
3331
propValue = val
3432
},
3533
})

0 commit comments

Comments
 (0)