search

Home  >  Q&A  >  body text

javascript - What is the best combination of vue components and work efficiency

Scenario
: Use three pieces of content (tab switching) in one page, using route. The three pieces of content are very important, and each has its own differences.

Question
: How to make components? How to strike a balance between components and work efficiency?

my thoughts:

1. Put three components into a function, and then pass different things in to build different components.

2. Or just use a component to pass different data sources. By separating the data sources, I feel like there are more things I need to judge this way.

Is there any good solution?

阿神阿神2820 days ago604

reply all(1)I'll reply

  • phpcn_u1582

    phpcn_u15822017-05-19 10:48:21

    Extract the public part.
    Use slots to pass in different places, or configure them through props.

    reply
    0
  • Cancelreply