You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
svelte/test/runtime/samples/bindings-coalesced/Foo.html

20 lines
268 B

<p>bar in Foo: {bar}</p>
<p>baz in Foo: {baz}</p>
<script>
export default {
data() {
return {
bar: 1,
baz: 2
};
},
methods: {
double() {
const { bar, baz } = this.get();
this.set({ bar: bar * 2, baz: baz * 2 });
}
}
};
</script>