- 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.
21 lines
368 B
JavaScript
21 lines
368 B
JavaScript
const { createApp, ref } = Vue;
|
|
|
|
createApp({
|
|
setup() {
|
|
const title = ref("Vue3 基础入门");
|
|
const learnerCount = ref(16);
|
|
|
|
function increaseLearner() {
|
|
// 任务:
|
|
// 1. learnerCount 加 1
|
|
// 2. 在控制台输出最新人数
|
|
}
|
|
|
|
return {
|
|
title,
|
|
learnerCount,
|
|
increaseLearner,
|
|
};
|
|
},
|
|
}).mount("#app");
|