import { D as T } from "./docs-back-top.js";
import { resolveComponent as v, openBlock as P, createElementBlock as S, Fragment as A, createVNode as c, withCtx as p, createElementVNode as _, createTextVNode as m, toDisplayString as f } from "vue";
import { n as I } from "./index2.js";
import { _ as L } from "./index16.js";
const y = (n = "") => String(n).replace(/&/g, "&").replace(//g, ">"), x = (n = "") => String(n).replace(/[^\w\u4e00-\u9fa5-]/g, ""), u = (n = "") => {
const t = [], r = [];
let e = String(n);
return e = e.replace(/`([^`]+)`/g, (o, i) => (t.push(`${y(i)}`), `\0C${t.length - 1}\0`)), e = e.replace(/<\/?span[^>]*>/g, (o) => (r.push(o), `\0S${r.length - 1}\0`)), e = y(e), e = e.replace(/\[([^\]]+)\]\(([^)]+)\)/g, '$1'), e = e.replace(/\*\*([^*]+)\*\*/g, "$1"), e = e.replace(/\u0000C(\d+)\u0000/g, (o, i) => t[+i]), e = e.replace(/\u0000S(\d+)\u0000/g, (o, i) => r[+i]), e;
}, w = (n = "") => n.trim().replace(/^\|/, "").replace(/\|$/, "").split("|").map((t) => t.trim()), j = (n = "") => /^\s*\|?[\s:|-]+\|?\s*$/.test(n) && n.includes("-"), E = (n = "") => {
const t = String(n).replace(/\r\n/g, `
`).split(`
`), r = t.length;
let e = 0, o = "", i = null;
const a = () => {
i && (o += `${i}>
`, i = null);
};
for (; e < r; ) {
const s = t[e], h = s.match(/^```(\w*)\s*$/);
if (h) {
a();
const l = h[1];
e++;
const d = [];
for (; e < r && !/^```\s*$/.test(t[e]); )
d.push(t[e]), e++;
e++, o += `
${y(d.join(`
`))}
`;
continue;
}
if (/^\s*$/.test(s)) {
a(), e++;
continue;
}
if (/^-{3,}\s*$/.test(s)) {
a(), o += `
`, e++;
continue;
}
const g = s.match(/^(#{1,6})\s+(.*)$/);
if (g) {
a();
const l = g[1].length, d = g[2].trim();
o += `${u(d)}
`, e++;
continue;
}
if (/^>\s?/.test(s)) {
a();
const l = [];
for (; e < r && /^>\s?/.test(t[e]); )
l.push(t[e].replace(/^>\s?/, "")), e++;
o += `${E(l.join(`
`))}
`;
continue;
}
if (/^\s*\|/.test(s) && e + 1 < r && j(t[e + 1])) {
a();
const l = w(s);
e += 2;
const d = [];
for (; e < r && /^\s*\|/.test(t[e]); )
d.push(w(t[e])), e++;
o += "" + l.map((b) => `| ${u(b)} | `).join("") + "
" + d.map((b) => "" + b.map((k) => `| ${u(k)} | `).join("") + "
").join("") + `
`;
continue;
}
if (/^\s*[-*]\s+/.test(s)) {
i !== "ul" && (a(), o += `
`, i = "ul"), o += `- ${u(s.replace(/^\s*[-*]\s+/, ""))}
`, e++;
continue;
}
if (/^\s*\d+\.\s+/.test(s)) {
i !== "ol" && (a(), o += `
`, i = "ol"), o += `- ${u(s.replace(/^\s*\d+\.\s+/, ""))}
`, e++;
continue;
}
a(), o += `${u(s.trim())}
`, e++;
}
return a(), o;
}, C = "# sapit-ui 基座说明与业务使用文档\n\n> 适用工程:sapit-ui-framework(基座/源码)、sapit-ui-plus(发布产物)、sapit-base-template(业务示例)\n>\n> 本文档也是基座内置文档页 `/docs` 与组件页 `/components` 的数据源。\n\n---\n\n## 目录\n\n- [一、总览](#docs-一总览)\n- [二、基座提供的内容](#docs-二基座提供的内容)\n- [三、构建与配置](#docs-三构建与配置)\n- [四、业务项目接入](#docs-四业务项目接入)\n- [五、注意事项](#docs-五注意事项)\n- [六、在线文档入口](#docs-六在线文档入口)\n\n---\n\n## 一、总览\n\n### 1.1 五者关系\n\n| 工程 | 角色 | 说明 |\n| --------------------- | ----------------------------------------------- | ----------------------------------------------------------------- |\n| `sapit-ui-framework` | 基座(源码) | 内置组件与常用依赖的库工程,Vite lib 模式打包 |\n| `sapit-ui-plus` | 发布产物 | 基座 `dist` 推送后的 git 仓库(`lib/`、`docs/`、`vite-plugins/`) |\n| `sapit-base-template` | 业务使用者 | 以 `sapit-ui-plus` git 依赖为底层,编写业务页面/配置 |\n\n```text\nsapit-ui-framework --(npm run build)--> dist/lib --(git push)--> sapit-ui-plus(git) --> sapit-base-template\n```\n\n### 1.2 依赖包结构\n\n业务装的 `sapit-ui-plus` 只有运行时需要的内容(不是基座源码工程):\n\n```text\nnode_modules/sapit-ui-plus/\n├─ lib/ # 编译产物:js / css / 图片,业务 import 的就是它\n├─ docs/ # 本文档,由内置 /docs 页渲染\n├─ vite-plugins/ # 业务 vite.config.js 里按需引入的插件(如 sso-plugin)\n├─ static/ # 静态资源(登录页图片等)\n└─ package.json\n```\n\n业务只需要引三处:入口 `sapit-ui-plus`、样式 `sapit-ui-plus/lib/css/style.css`、按需的 `vite-plugins/*`。\n\n---\n\n## 二、基座提供的内容\n\n### 2.1 全局组件\n\n组件全部由基座**全局注册**,业务页面直接写标签即可,不需要 `import`、也不需要局部注册(如 ``、``、``)。\n\n| 分类 | 组件 |\n| --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| 布局类 | `SSkeletonLayout`(骨架布局:标题 + 按钮组 + 内容区)、`SListLayout`、`SListCardLayout`(卡片列表)、`SListTableTreeLayout`、`SSuperListLayout`(高级列表:列设置 + 高级筛选)、`SFormLayout`、`SPanelLayout`、`SCollapses`/`SCollapsesItem`、`SDrawer` |\n| 弹层类 | `SModal`、`SModalTemplate`、`ModalHeader`、`SIconModal`、`SImportModal`(批量导入) |\n| 表单/筛选 | `SForm`、`SFormItem`(多列 + `full` 独占整行)、`SExtendFieldsForm`/`SExtendFieldsFormItem`(动态扩展字段)、`SFilterWrap`、`SFilterItem`(`full` 独占整行)、`SFilterToolbar`(查询区外壳:主区 + 更多筛选折叠 + 条件重置)、`STableToolbar`(表格区外壳:表体高度自动贴合内容区,与 `SFilterToolbar` 成对使用)、`SFilterTableToolbar`(查询区 + 表格区组合件)、`SCascader`、`STree`、`STreeSelect`、`SDataRangeTreeSelect`(数据权限范围树)、`SUserSelect`、`SUserSelectButton`、`SChooseUser`(带数据权限选人弹窗)、`SBelowChoosePosition`(选岗位弹窗)、`SOfficeSelect`、`SIconSelect`(图标下拉,可搜索/多选)、`SIconSelectPopover`(图标网格面板)、`SIconModal`(图标浏览弹窗) |\n| 上传类 | `SFileUpload`、`SDraggerUpload`、`SCopperUpload`、`CropperModal` |\n| 展示/其它 | `STab`/`STabItem`(标签栏,超出宽度自动出左右箭头)、`SEditor`、`SEmpty`、`SIcon`、`SSvg`、`SAnchor`、`SColorPicker`、`SToggleLanguage`、`SettingFilter`、`SettingColumns`、`SSideMenu`/`STopMenu` |\n\n> **每个组件的 props / 事件 / 方法 / 插槽、可运行预览与示例代码,统一看内置组件页 `/components`**(另有「工具/配置」标签页,列出 web-config 全部配置项与 `$utils` 全部方法)。\n>\n> 几条使用口径:\n>\n> - 组件注册名是 **PascalCase**(`SForm` / `STable`),模板里写 `` 或 `` 都能解析,保持一致即可。\n> - `@ant-design/icons-vue` 图标已全部全局注册,并把图标集合挂在 `$icons`。\n> - 基座内部有几个不对外使用的辅助组件(如 `ModalHeader`、`CropperModal`、`SettingColumns` / `SettingFilter`),业务不要直接引用。\n\n### 2.2 全局属性 / 方法\n\n`$registerGlobalConfig` 执行后可用(`this.$xxx` / 模板 `$xxx` / `window.$xxx`):\n\n| 名称 | 说明 |\n| ---------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `$registerGlobalConfig(config, pages)` | 初始化入口(见 4.2) |\n| `$utils` | 工具类集合:`$utils.env` / `$utils.ls` / `$utils.http` 及通用方法 |\n| `env` | 合并后的环境配置(= `$utils.env`) |\n| `$i18n` / `$l(name)` | 国际化(见 2.7)。挂在 `globalProperties` 上:**模板里直接用** `$l('xx')`;`