Closed
Description
Vue version
3.5.3
Link to minimal reproduction
no
Steps to reproduce
no
What is expected?
Give me an example
For example, the method of exposing the ref component of the elementplus framework's el input component should be implemented using this principle for external exposure.
code
const input= ref();
const expose = {};
onMounted(() => {
const entries = Object.entries(input.value);
for (const [method, fn] of entries) {
expose[method] = fn;
}
});
defineExpose(expose);
Is there a more perfect way?
What is actually happening?
no
System Info
Any additional comments?
No response
Metadata
Metadata
Assignees
Labels
No labels