import { resolveComponent as t, openBlock as c, createBlock as s, withCtx as l, createCommentVNode as p, createVNode as r, defineAsyncComponent as a } from "vue"; import { n as g } from "./index2.js"; const b = { name: "DocsPage", components: { GuideDoc: a(() => import("./guide-doc.js")), ComponentsDoc: a(() => import("./components-doc.js")), ToolsDoc: a(() => import("./tools-doc.js")) }, data() { return { active: "guide", tabs: [ { label: this.$l("首页"), value: "/" }, { label: this.$l("说明文档"), value: "guide" }, { label: this.$l("内置组件"), value: "components" }, { label: this.$l("工具配置"), value: "tools" } ] }; }, computed: { view() { return this.tabs.find((n) => n.value === this.active).value; }, pageTitle() { return { guide: window.$l("sapit-ui 文档"), components: window.$l("sapit-ui 基座组件"), tools: window.$l("sapit-ui 工具与配置") }[this.view]; } }, methods: { onChange(e) { if (e === "/") { this.$push("/"); return; } this.active = e; } }, watch: { // 三个视图共用一个滚动容器,切页后必须归顶,否则会停在上一个页面的位置 view() { this.$nextTick(() => { const e = this.$el.querySelector(".s-panel-layout-content"); e && (e.scrollTop = 0); }); } } }; function f(e, n, y, k, i, o) { const u = t("s-tab"), d = t("guide-doc"), m = t("components-doc"), _ = t("tools-doc"), h = t("s-back-top"), v = t("s-panel-layout"); return c(), s(v, { title: o.pageTitle, width: "1200px", height: "100vh", headerSticky: !0 }, { extra: l(() => [ r(u, { activeKey: i.active, "onUpdate:activeKey": n[0] || (n[0] = (w) => i.active = w), tabs: i.tabs, onChange: o.onChange }, null, 8, ["activeKey", "tabs", "onChange"]) ]), default: l(() => [ o.view === "guide" ? (c(), s(d, { key: 0 })) : o.view === "components" ? (c(), s(m, { key: 1 })) : p("", !0), o.view === "tools" ? (c(), s(_, { key: 2 })) : p("", !0), r(h) ]), _: 1 }, 8, ["title"]); } const $ = /* @__PURE__ */ g(b, [["render", f], ["__scopeId", "data-v-0ed057d6"]]); export { $ as default };