Skip to content

Vue 组件封装 ​

原则 ​

组件先划清输入输出,再考虑通用能力抽取。

做法 ​

把展示和业务逻辑分层,避免一个组件过重。

结论 ​

封装不是堆 props,而是稳定职责边界。

Built with VitePress