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.
This commit is contained in:
26
08-vue3/02-reactive-and-computed/starter.js
Normal file
26
08-vue3/02-reactive-and-computed/starter.js
Normal file
@@ -0,0 +1,26 @@
|
||||
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");
|
||||
Reference in New Issue
Block a user