chore: scaffold mobile-oa-h5 with Vite, Vant and form-create

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
zlwuandCursor committed 2026-08-11 12:04:27 +08:00
1 parent 6f849cbb36
commit 507032aedf
11 files changed
+1562

No files matched your search

+4
View File
@@ -0,0 +1,4 @@
node_modules/
dist/
.DS_Store
.env.local
+15
View File
@@ -0,0 +1,15 @@
<!doctype html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8" />
<meta
name="viewport"
content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no, viewport-fit=cover"
/>
<title>中科兴皖 · OA 表单</title>
</head>
<body>
<div id="app"></div>
<script type="module" src="/src/main.js"></script>
</body>
</html>
+1444
View File
File diff suppressed because it is too large. Load diff
+21
View File
@@ -0,0 +1,21 @@
{
"name": "mobile-oa-h5",
"version": "0.1.0",
"private": true,
"type": "module",
"scripts": {
"dev": "vite",
"build": "vite build",
"preview": "vite preview"
},
"dependencies": {
"@form-create/vant": "^3.2.14",
"vant": "^4.9.21",
"vue": "^3.5.13",
"vue-router": "^4.5.0"
},
"devDependencies": {
"@vitejs/plugin-vue": "^5.2.1",
"vite": "^6.0.7"
}
}
+3
View File
@@ -0,0 +1,3 @@
<template>
<router-view />
</template>
+15
View File
@@ -0,0 +1,15 @@
import { createApp } from 'vue'
import Vant from 'vant'
import 'vant/lib/index.css'
import formCreateMobile from '@form-create/vant'
import App from './App.vue'
import router from './router'
import './styles/tokens.css'
import { registerOaComponents } from './oa/register-components'
const app = createApp(App)
app.use(router)
app.use(Vant)
app.use(formCreateMobile)
registerOaComponents(formCreateMobile)
app.mount('#app')
@@ -0,0 +1,3 @@
export function registerOaComponents(formCreate) {
// Task 3 will replace with real registrations
}
+16
View File
@@ -0,0 +1,16 @@
import { createRouter, createWebHistory } from 'vue-router'
import FormSink from './views/FormSink.vue'
export default createRouter({
history: createWebHistory(import.meta.env.BASE_URL),
routes: [
{ path: '/', redirect: '/oa-form-sink' },
{ path: '/oa-form-sink', component: FormSink },
{
path: '/oa-start',
component: {
template: '<div style="padding:16px">oa-start 占位(阶段二)</div>'
}
}
]
})
+15
View File
@@ -0,0 +1,15 @@
:root {
--brand-green: #0a9f6d;
--brand-green-dark: #087f57;
--brand-green-soft: #e9f9f2;
--bg-page: #f5f8f7;
--text-primary: #1f2a26;
--text-muted: #6b7b74;
--border: #dcebe4;
}
body {
margin: 0;
background: var(--bg-page);
color: var(--text-primary);
font-family: system-ui, -apple-system, 'PingFang SC', sans-serif;
}
+3
View File
@@ -0,0 +1,3 @@
<template>
<div style="padding:16px">FormSink 占位(Task 3 实现)</div>
</template>
+23
View File
@@ -0,0 +1,23 @@
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import { fileURLToPath, URL } from 'node:url'
export default defineConfig({
plugins: [vue()],
base: '/oa-h5/',
resolve: {
alias: {
'@': fileURLToPath(new URL('./src', import.meta.url))
}
},
server: {
host: '0.0.0.0',
port: 5178,
proxy: {
'/api': {
target: 'http://127.0.0.1:8000',
changeOrigin: true
}
}
}
})