How to reuse global components in one component in vue-li

description: in a page, there are many similar content, but the text content is different, the others are all the same. I defined a global component in main.js
what"s a good way to reuse a global component multiple times, and the text content is different.
Mar.22,2021

component of the reusable component:
props passes data.
events trigger event.
slot content distribution.
when designing components, we need to design a default slot for future expansion, even if we don't need slot in the current business.
to sum up, I think the best way to solve this problem is to add a default slot.


Thank you for the invitation.
if your global component is sure that the text is only different, set a props, to accept the incoming parameters to display the different text.
reuse multiple times within the same component and transfer different props.

Menu