-
Notifications
You must be signed in to change notification settings - Fork 342
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Minimal (non-)working example:
<template>
<div>
{{ $attrs['hello-world'] }}
{{ myComputed }}
</div>
</template>
<script>
import { defineComponent, computed } from "@vue/composition-api";
export default defineComponent({
inheritAttrs: false,
setup(props, { attrs }) {
const myComputed = computed(() => attrs['hello-world']);
return {
myComputed
}
}
});
</script>
<template>
<Example :hello-world="test"/>
<button @click="change">Change me</button>
</template>
<script>
import { defineComponent, ref } from "@vue/composition-api";
import Example from "@/components/Example.vue";
export default defineComponent({
components: { Example },
setup() {
const test = ref("Hey");
return {
change() {
test.value = "What?";
},
test
}
}
});
</script>
The value in the template, $attrs
changes accordingly, but the computed value doesn't.
HusamElbashir, Bumppoman and masterinfoalberghi
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working