Files
front-end-example/07-vue2/01-vue-instance-and-data/answer.js
charlie 3435848495 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.
2026-03-23 10:09:29 +08:00

15 lines
259 B
JavaScript

new Vue({
el: "#app",
data: {
title: "Vue2 基础入门",
lessonCount: 8,
learnerCount: 12,
},
methods: {
increaseLearner() {
this.learnerCount += 1;
console.log("当前学习人数:", this.learnerCount);
},
},
});