- 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.
802 B
802 B
练习 6:动态类名、样式和事件
目标
学会让组件状态直接影响样式和交互反馈。
你要练什么
:class:stylev-on- 点击切换状态
任务
请基于页面结构完成以下操作:
- 点击卡片切换激活状态
- 根据激活状态切换类名
- 根据进度值动态改变进度条宽度