-
Notifications
You must be signed in to change notification settings - Fork 342
Closed
Description
https://codesandbox.io/s/wizardly-hermann-kumgx?file=/src/App.js
import { defineComponent, ref, h } from "@vue/composition-api";
const Field = defineComponent({
props: ["firstName", "lastName"],
setup(props, { attrs }) {
return () => {
return h("div", [props.firstName, props.lastName]);
};
}
});
const WrapperField = defineComponent({
setup(props, { attrs }) {
return () => {
return h(Field, {
attrs: {
...attrs
}
});
};
}
});
export default defineComponent({
setup(props, { attrs }) {
let person = ref({
firstName: "wang"
});
setTimeout(() => {
person.value = {
firstName: "wang",
lastName: "xiao"
};
}, 1000);
return () => {
return h("div", [
h(WrapperField, {
attrs: {
...person.value
}
})
]);
};
}
});
Metadata
Metadata
Assignees
Labels
No labels