For example, I used ueditor to make an Editor component Then there is a form on another page, which introduces the Editor. Of course, it is necessary to register in components! I click submit on the page, then the editor’s getContent() method will be used. So the question is, how to define the object where the getContent method is located? Or there are several components on a page, all of which have the getContent method. What should I do? The editor is given a ref attribute here, which I understand to be similar to the id in HTML. Then, using $refs in components or instances is to find all components with ref attributes! Then put it in an object. The key of the object is the attribute value of ref.
For example, I used ueditor to make an Editor component
Then there is a form on another page, which introduces the Editor. Of course, it is necessary to register in components!
I click submit on the page, then the editor’s getContent() method will be used. So the question is, how to define the object where the getContent method is located? Or there are several components on a page, all of which have the getContent method. What should I do?
The editor is given a ref attribute here, which I understand to be similar to the id in HTML.
Then, using $refs in components or instances is to find all components with ref attributes! Then put it in an object.
The key of the object is the attribute value of ref.