Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
問題は、ディレクトリ内のコンポーネントをどのように構成するかです。どの設計パターンに従うのがよいでしょうか?
あなたはこれに間違った方法でアプローチしています。Vue は UI コンポーネントを作成するための lib であり、CRUD/REST MVC フレームワークではありません。
答えは、UI の設計によって、作成する必要があるコンポーネントの数と、横に並べる必要があるコンポーネント、互いにネストする必要があるコンポーネントなどが決まります。
React docs のこの画像は、どのように考えるかについてのアイデアを提供します (また、この例は少しきめが細かいかもしれませんが):
ソース: https://facebook.github.io/react/docs/thinking-in-react.html#step-1-break-the-ui-into-a-component-hierarchy