新增SPC Vue控制图项目

This commit is contained in:
zhangshun
2026-06-29 09:18:24 +08:00
parent 856a7250f2
commit 37517d5279
27 changed files with 3864 additions and 0 deletions

39
spc-vue/src/App.vue Normal file
View File

@@ -0,0 +1,39 @@
<script setup lang="ts">
import { computed, onMounted } from "vue";
import { RouterLink, RouterView } from "vue-router";
import SpcInputPanel from "./components/SpcInputPanel.vue";
import { useSpc } from "./composables/useSpc";
import { routes } from "./router";
const { result, runSpc } = useSpc();
const navRoutes = computed(() => routes.filter((route) => route.path !== "/" && route.meta?.title));
onMounted(() => {
if (!result.value) {
void runSpc();
}
});
</script>
<template>
<div class="app-shell">
<header class="topbar">
<div>
<p class="eyebrow">SPC Vue</p>
<h1>SPC 控制图验证</h1>
</div>
<nav class="nav-tabs" aria-label="控制图页面">
<RouterLink v-for="route in navRoutes" :key="route.path" :to="route.path">
{{ route.meta?.title }}
</RouterLink>
</nav>
</header>
<main class="workspace">
<SpcInputPanel />
<section class="content-pane">
<RouterView />
</section>
</main>
</div>
</template>