feat: Add Vue3 exercises and interview plan

- 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.
This commit is contained in:
charlie
2026-03-24 23:02:58 +08:00
parent 3435848495
commit d0d8be443b
41 changed files with 1551 additions and 5 deletions

View File

@@ -0,0 +1,24 @@
# 练习 11before 系列生命周期和 expose
## 目标
学会在组合式 API 中使用 before 系列生命周期,并理解子组件如何有选择地暴露能力给父组件。
## 你要练什么
- `onBeforeMount`
- `onBeforeUpdate`
- `onBeforeUnmount`
- `expose`
## 任务
- 在不同生命周期里输出日志
- 父组件通过模板 `ref` 获取子组件实例
- 子组件通过 `expose` 暴露一个 `focusInput` 方法
- 父组件点击按钮后调用这个暴露出来的方法
## 文件
- [starter.html](/Users/lijiaqing/home/wwwroot/front-end-example/08-vue3/11-before-hooks-and-expose/starter.html)
- [starter.js](/Users/lijiaqing/home/wwwroot/front-end-example/08-vue3/11-before-hooks-and-expose/starter.js)