- 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.
27 lines
957 B
HTML
27 lines
957 B
HTML
<!DOCTYPE html>
|
|
<html lang="zh-CN">
|
|
<head>
|
|
<meta charset="UTF-8" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
<title>composable 和异步状态</title>
|
|
<style>
|
|
body { margin: 0; padding: 32px; font-family: "PingFang SC", sans-serif; background: #f5f8fc; }
|
|
.panel { max-width: 760px; margin: 0 auto; padding: 24px; border-radius: 18px; background: #fff; border: 1px solid #dbe4f2; }
|
|
.error { color: #b42318; }
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<section id="app" class="panel">
|
|
<h1>课程请求练习</h1>
|
|
<p v-if="loading">数据加载中...</p>
|
|
<p v-if="error" class="error">{{ error }}</p>
|
|
<ul v-if="!loading && !error">
|
|
<li v-for="item in courses" :key="item.id">{{ item.title }}</li>
|
|
</ul>
|
|
</section>
|
|
|
|
<script src="https://cdn.jsdelivr.net/npm/vue@3/dist/vue.global.js"></script>
|
|
<script src="./starter.js"></script>
|
|
</body>
|
|
</html>
|