- 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.
25 lines
428 B
JavaScript
25 lines
428 B
JavaScript
const { createApp, ref } = Vue;
|
|
|
|
createApp({
|
|
components: {
|
|
AsyncInfo: {
|
|
async setup() {
|
|
// 任务:
|
|
// 1. 模拟等待
|
|
// 2. 返回需要在模板中展示的数据
|
|
return {};
|
|
},
|
|
template: `
|
|
<p>这里会展示异步组件内容。</p>
|
|
`,
|
|
},
|
|
},
|
|
setup() {
|
|
const showModal = ref(false);
|
|
|
|
return {
|
|
showModal,
|
|
};
|
|
},
|
|
}).mount("#app");
|