how to pass down all things(props, slots, listeners ...) to child component ? 怎样把所有的props、slots、listeners 传给子组件? #7001
-
I want to pass down everything to child component. I don't know if it's appropriate to do this, is there some problem: <script lang="ts">
import { h } from "vue";
import { XCheckbox } from "xxx";
export default {
setup(props, { slots }) {
return () => h(XCheckbox, props, slots);
},
};
</script> |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
I have read this article , but i did not get a perfect example to do that. |
Beta Was this translation helpful? Give feedback.
-
And, if I want to make some small changes to the props passed in externally, such as renaming, what would I do better |
Beta Was this translation helpful? Give feedback.
-
see https://discord.com/channels/325477692906536972/1036902991451656253 |
Beta Was this translation helpful? Give feedback.
see https://discord.com/channels/325477692906536972/1036902991451656253