import { resolveComponent as t, openBlock as c, createBlock as a, withCtx as l, createCommentVNode as p, createVNode as r, defineAsyncComponent as i } from "vue"; import { n as g } from "./index2.js"; const b = { name: "DocsPage", components: { GuideDoc: i(() => import("./guide-doc.js")), ComponentsDoc: i(() => import("./components-doc.js")), ToolsDoc: i(() => import("./tools-doc.js")) }, data() { return { active: "guide", tabs: [ { label: "首页", value: "/" }, { label: "说明文档", value: "guide" }, { label: "内置组件", value: "components" }, { label: "工具配置", 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, s, o) { const u = t("s-tab"), d = t("guide-doc"), m = t("components-doc"), _ = t("tools-doc"), v = t("s-back-top"), h = t("s-panel-layout"); return c(), a(h, { title: o.pageTitle, width: "1200px", height: "100vh", headerSticky: !0 }, { extra: l(() => [ r(u, { activeKey: s.active, "onUpdate:activeKey": n[0] || (n[0] = (w) => s.active = w), tabs: s.tabs, onChange: o.onChange }, null, 8, ["activeKey", "tabs", "onChange"]) ]), default: l(() => [ o.view === "guide" ? (c(), a(d, { key: 0 })) : o.view === "components" ? (c(), a(m, { key: 1 })) : p("", !0), o.view === "tools" ? (c(), a(_, { key: 2 })) : p("", !0), r(v) ]), _: 1 }, 8, ["title"]); } const T = /* @__PURE__ */ g(b, [["render", f], ["__scopeId", "data-v-50277d6e"]]); export { T as default };