import { openBlock as v, createElementBlock as y } from "vue";
import { n as _ } from "./index2.js";
const g = (o = "") => String(o).replace(/&/g, "&").replace(//g, ">"), w = (o = "") => String(o).replace(/[^\w\u4e00-\u9fa5-]/g, ""), d = (o = "") => {
const n = [], i = [];
let e = String(o);
return e = e.replace(/`([^`]+)`/g, (t, s) => (n.push(`${g(s)}`), `\0C${n.length - 1}\0`)), e = e.replace(/<\/?span[^>]*>/g, (t) => (i.push(t), `\0S${i.length - 1}\0`)), e = g(e), e = e.replace(/\[([^\]]+)\]\(([^)]+)\)/g, '$1'), e = e.replace(/\*\*([^*]+)\*\*/g, "$1"), e = e.replace(/\u0000C(\d+)\u0000/g, (t, s) => n[+s]), e = e.replace(/\u0000S(\d+)\u0000/g, (t, s) => i[+s]), e;
}, m = (o = "") => o.trim().replace(/^\|/, "").replace(/\|$/, "").split("|").map((n) => n.trim()), E = (o = "") => /^\s*\|?[\s:|-]+\|?\s*$/.test(o) && o.includes("-"), f = (o = "") => {
const n = String(o).replace(/\r\n/g, `
`).split(`
`), i = n.length;
let e = 0, t = "", s = null;
const r = () => {
s && (t += `${s}>
`, s = null);
};
for (; e < i; ) {
const a = n[e], h = a.match(/^```(\w*)\s*$/);
if (h) {
r();
const l = h[1];
e++;
const c = [];
for (; e < i && !/^```\s*$/.test(n[e]); )
c.push(n[e]), e++;
e++, t += `
${g(c.join(`
`))}
`;
continue;
}
if (/^\s*$/.test(a)) {
r(), e++;
continue;
}
if (/^-{3,}\s*$/.test(a)) {
r(), t += `
`, e++;
continue;
}
const p = a.match(/^(#{1,6})\s+(.*)$/);
if (p) {
r();
const l = p[1].length, c = p[2].trim();
t += `${d(c)}
`, e++;
continue;
}
if (/^>\s?/.test(a)) {
r();
const l = [];
for (; e < i && /^>\s?/.test(n[e]); )
l.push(n[e].replace(/^>\s?/, "")), e++;
t += `${f(l.join(`
`))}
`;
continue;
}
if (/^\s*\|/.test(a) && e + 1 < i && E(n[e + 1])) {
r();
const l = m(a);
e += 2;
const c = [];
for (; e < i && /^\s*\|/.test(n[e]); )
c.push(m(n[e])), e++;
t += "" + l.map((u) => `| ${d(u)} | `).join("") + "
" + c.map((u) => "" + u.map((b) => `| ${d(b)} | `).join("") + "
").join("") + `
`;
continue;
}
if (/^\s*[-*]\s+/.test(a)) {
s !== "ul" && (r(), t += `
`, s = "ul"), t += `- ${d(a.replace(/^\s*[-*]\s+/, ""))}
`, e++;
continue;
}
if (/^\s*\d+\.\s+/.test(a)) {
s !== "ol" && (r(), t += `
`, s = "ol"), t += `- ${d(a.replace(/^\s*\d+\.\s+/, ""))}
`, e++;
continue;
}
r(), t += `${d(a.trim())}
`, e++;
}
return r(), t;
}, k = "# sapit-ui 基座说明与业务使用文档\n\n> 适用工程:sapit-ui-framework(基座/源码)、sapit-ui-plus(发布产物)、sapit-base-template(业务示例)\n>\n> 本文档也是基座内置文档页 `/docs`、组件页 `/components`、工具与配置页 `/tools` 的数据源。\n\n---\n\n## 目录\n\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`**(另有「工具/配置」页 `/tools`,列出 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')`;`