mixed usage of composition-api and object-style render
wonderful-panda opened this issue · 0 comments
wonderful-panda commented
This code should work.
import * as vca from "vue-tsx-support/lib/vca";
export const MyDialog = vca.component({
setup() {
// I want expose `show` as a public method of component
// To expose `show`, I can't return render function from `setup` directly
// return () => (<div>...</div>);
const show = () => {
...
};
const render_ = () => (
<div>...</div>
);
return { show, render_ };
},
render() {
return this.render_();
}
})