<!DOCTYPE html>
<html>
<head>
<title>document.write() Example</title>
</head>
<body>
<script src="https://unpkg.com/vue@next"></script>
<script type="text/javascript">
const data = {
foo: 1, bar: 2 }
const obj = new Proxy(data, {
})
const sumRes = computed(() => obj.foo + obj.bar)
console.log(sumRes.value)
</script>
</body>
</html>
有没有<script src="https://unpkg.com/vue@next"></script>
都出现
为什么?
加上了computed的funchon,又出现了effect没有定义的bug
Uncaught ReferenceError: effect is not defined