Files
front-end-example/08-vue3/02-reactive-and-computed/starter.js
charlie d0d8be443b feat: Add Vue3 exercises and interview plan
- Introduced Vue3 exercises covering composable API, reactivity, lifecycle hooks, and built-in components.
- Added structured interview plan for frontend candidates focusing on HTML, CSS, JavaScript, TypeScript, and Vue.
- Included starter files for each exercise and detailed README documentation for guidance.
2026-03-24 23:02:58 +08:00

27 lines
546 B
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

const { createApp, reactive, computed } = Vue;
createApp({
setup() {
const course = reactive({
title: "Vue3 响应式基础",
totalLessons: 10,
finishedLessons: 3,
});
const progressText = computed(() => {
// 任务:返回类似 “当前已完成 3 / 10 节”
return "";
});
function finishOneLesson() {
// 任务在不超过总课时的前提下finishedLessons 加 1
}
return {
course,
progressText,
finishOneLesson,
};
},
}).mount("#app");