- 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.
练习 1:Vue 实例和数据
目标
学会写一个最基础的 Vue2 实例,并让页面内容跟着数据变化。
你要练什么
new Vue()eldatamethods- 模板插值
{{ }}
任务
请基于页面结构完成以下操作:
- 显示课程标题和章节数量
- 点击按钮后让学习人数加 1
- 在控制台输出当前学习人数