fix: page-transition layout in app-shell

This commit is contained in:
Timi
2026-11-10 17:27:28 +08:00
parent a70a665883
commit 05a6cbc387
14 changed files with 1356 additions and 95 deletions
+6 -8
View File
@@ -13,19 +13,16 @@ import { timiWebSsrStub } from "./plugins/ssr-stub";
const docsDir = resolve(__dirname, "..");
/** 仓库根目录,组件源码位于它的 `src` 下。 */
const repoRoot = resolve(docsDir, "..");
/** timi-web 仓库目录,docs 通过 link 依赖它。 */
const timiWebRoot = resolve(repoRoot, "../timi-web");
/**
* 源码引用别名。
*
* demo 直接引用 `src` 源码而非构建产物,改组件即可热更新文档。
* 组件源码自身的传递依赖(tiptap、prismjs 等)由 timi-web 的 node_modules 解析,
* 组件源码自身的传递依赖(tiptap、prismjs 等)由 timi-web 包自身解析,
* docs 无需重复声明。
*/
const alias = {
"timi-tdesign-mobile": resolve(repoRoot, "src/index.ts"),
"timi-web/editor": resolve(timiWebRoot, "src/editor/index.ts")
"timi-tdesign-mobile": resolve(repoRoot, "src/index.ts")
};
/** 组件文档侧边栏,按 components.ts 的分类与顺序生成。 */
@@ -104,7 +101,8 @@ export default defineConfig({
vite: {
resolve: {
alias
alias,
dedupe: ["vue", "vue-router"]
},
plugins: [
@@ -123,8 +121,8 @@ export default defineConfig({
port: 3004,
host: true,
fs: {
// demo 需要读取 docs 之外的 src 与 timi-web 源码。
allow: [repoRoot, timiWebRoot]
// demo 需要读取 docs 之外的组件源码。
allow: [repoRoot]
}
}
}