feat: 新增 node-frontend-vue2 示例(Vue 2.7 + Element UI 2,Tengine 托管)

This commit is contained in:
2026-11-15 11:49:00 +08:00
parent a11fb1bb74
commit 793bcf10a1
19 changed files with 521 additions and 0 deletions
+18
View File
@@ -0,0 +1,18 @@
import Vue from 'vue';
import VueRouter from 'vue-router';
import Home from './views/Home.vue';
Vue.use(VueRouter);
const routes = [
{ path: '/', name: 'home', component: Home },
{ path: '/form', name: 'form', component: () => import('./views/Form.vue') },
{ path: '/about', name: 'about', component: () => import('./views/About.vue') },
// 前端路由兜底:放在 Tengine 上时,需要 location / 里 try_files $uri $uri/ /index.html
{ path: '*', redirect: '/' },
];
export default new VueRouter({
mode: 'hash',
routes,
});