feat: add Vue2 exercises for dynamic styles, lifecycle methods, component communication, and course management dashboard
- Implement dynamic styles and event handling in Vue2 with a card component. - Create lifecycle methods exercise to simulate async data loading and instance destruction. - Develop a component communication exercise with props, events, and slots. - Build a comprehensive course management dashboard with filtering, statistics, and component interactions.
This commit is contained in:
27
07-vue2/06-class-style-and-event/README.md
Normal file
27
07-vue2/06-class-style-and-event/README.md
Normal file
@@ -0,0 +1,27 @@
|
||||
# 练习 6:动态类名、样式和事件
|
||||
|
||||
## 目标
|
||||
|
||||
学会让组件状态直接影响样式和交互反馈。
|
||||
|
||||
## 你要练什么
|
||||
|
||||
- `:class`
|
||||
- `:style`
|
||||
- `v-on`
|
||||
- 点击切换状态
|
||||
|
||||
## 任务
|
||||
|
||||
请基于页面结构完成以下操作:
|
||||
|
||||
- 点击卡片切换激活状态
|
||||
- 根据激活状态切换类名
|
||||
- 根据进度值动态改变进度条宽度
|
||||
|
||||
## 文件
|
||||
|
||||
- [starter.html](/Users/lijiaqing/home/wwwroot/front-end-example/07-vue2/06-class-style-and-event/starter.html)
|
||||
- [starter.js](/Users/lijiaqing/home/wwwroot/front-end-example/07-vue2/06-class-style-and-event/starter.js)
|
||||
- [answer.html](/Users/lijiaqing/home/wwwroot/front-end-example/07-vue2/06-class-style-and-event/answer.html)
|
||||
- [answer.js](/Users/lijiaqing/home/wwwroot/front-end-example/07-vue2/06-class-style-and-event/answer.js)
|
||||
Reference in New Issue
Block a user