chore: initialize application scaffold
This commit is contained in:
@@ -0,0 +1 @@
|
||||
<div id="app"></div><script type="module" src="/src/main.ts"></script>
|
||||
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"name": "@example/web",
|
||||
"version": "0.1.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "vite --port 5173",
|
||||
"build": "vue-tsc -b && vite build"
|
||||
},
|
||||
"dependencies": {
|
||||
"tdesign-vue-next": "^1.10.3",
|
||||
"vue": "^3.5.13"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@vitejs/plugin-vue": "^5.2.1",
|
||||
"typescript": "^5.7.2",
|
||||
"vite": "^6.0.5",
|
||||
"vue-tsc": "^2.2.0"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
<script setup lang="ts">
|
||||
import UserWelcome from './pages/UserWelcome.vue';
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<UserWelcome />
|
||||
</template>
|
||||
@@ -0,0 +1,7 @@
|
||||
import { createApp } from 'vue';
|
||||
import TDesign from 'tdesign-vue-next';
|
||||
import 'tdesign-vue-next/es/style/index.css';
|
||||
import App from './App.vue';
|
||||
|
||||
/** 创建用户端 Vue 应用实例。 */
|
||||
createApp(App).use(TDesign).mount('#app');
|
||||
@@ -0,0 +1,22 @@
|
||||
<script setup lang="ts">
|
||||
import { computed, ref } from 'vue';
|
||||
|
||||
/** 存储当前示例名称。 */
|
||||
const name = ref('开发者');
|
||||
|
||||
/** 生成页面问候语。 */
|
||||
const greeting = computed(() => `你好,${name.value}。示例用户端已准备就绪。`);
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<main class="welcome-page">
|
||||
<t-card title="用户端示例">
|
||||
<p>{{ greeting }}</p>
|
||||
<t-input v-model="name" clearable placeholder="请输入名称" />
|
||||
</t-card>
|
||||
</main>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.welcome-page { max-width: 720px; margin: 80px auto; padding: 0 24px; }
|
||||
</style>
|
||||
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"target": "ES2020",
|
||||
"module": "ESNext",
|
||||
"moduleResolution": "Bundler",
|
||||
"strict": true,
|
||||
"noEmit": true,
|
||||
"skipLibCheck": true
|
||||
},
|
||||
"include": ["src/**/*.ts", "src/**/*.vue"]
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{"root":["./src/main.ts","./src/app.vue","./src/pages/userwelcome.vue"],"version":"5.9.3"}
|
||||
@@ -0,0 +1,5 @@
|
||||
import { defineConfig } from 'vite';
|
||||
import vue from '@vitejs/plugin-vue';
|
||||
|
||||
/** 定义用户端开发与构建配置。 */
|
||||
export default defineConfig({ plugins: [vue()] });
|
||||
Reference in New Issue
Block a user