- Introduced Vue3 exercises covering composable API, reactivity, lifecycle hooks, and built-in components. - Added structured interview plan for frontend candidates focusing on HTML, CSS, JavaScript, TypeScript, and Vue. - Included starter files for each exercise and detailed README documentation for guidance.
23 lines
547 B
Markdown
23 lines
547 B
Markdown
# 练习 6:slot 与 provide / inject
|
||
|
||
## 目标
|
||
|
||
学会更灵活地组织组件树中的内容和共享信息。
|
||
|
||
## 你要练什么
|
||
|
||
- `slot`
|
||
- `provide`
|
||
- `inject`
|
||
|
||
## 任务
|
||
|
||
- 用插槽自定义卡片按钮文案
|
||
- 父组件通过 `provide` 提供主题色
|
||
- 子组件通过 `inject` 使用主题信息
|
||
|
||
## 文件
|
||
|
||
- [starter.html](/Users/lijiaqing/home/wwwroot/front-end-example/08-vue3/06-slots-and-provide-inject/starter.html)
|
||
- [starter.js](/Users/lijiaqing/home/wwwroot/front-end-example/08-vue3/06-slots-and-provide-inject/starter.js)
|