- 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.
851 B
851 B
练习 4:条件渲染和列表渲染
目标
学会根据状态显示不同内容,并用 v-for 渲染一组数据。
你要练什么
v-ifv-elsev-showv-for:key
任务
请基于页面结构完成以下操作:
- 切换“是否展开课程列表”
- 根据是否付费显示不同文案
- 用
v-for渲染课程数组