|
@@ -1,6 +1,42 @@
|
|
|
-import { resolveComponent as v, createElementBlock as i, openBlock as d, createElementVNode as e, createTextVNode as n, createVNode as m, withCtx as u, Fragment as p, renderList as y, normalizeClass as h, toDisplayString as o, withDirectives as g, vShow as k } from "vue";
|
|
|
|
|
-import { k as f } from "./index2.js";
|
|
|
|
|
-const C = {
|
|
|
|
|
|
|
+var L = Object.defineProperty, D = Object.defineProperties;
|
|
|
|
|
+var I = Object.getOwnPropertyDescriptors;
|
|
|
|
|
+var h = Object.getOwnPropertySymbols;
|
|
|
|
|
+var x = Object.prototype.hasOwnProperty, E = Object.prototype.propertyIsEnumerable;
|
|
|
|
|
+var k = (t, e, s) => e in t ? L(t, e, { enumerable: !0, configurable: !0, writable: !0, value: s }) : t[e] = s, g = (t, e) => {
|
|
|
|
|
+ for (var s in e || (e = {}))
|
|
|
|
|
+ x.call(e, s) && k(t, s, e[s]);
|
|
|
|
|
+ if (h)
|
|
|
|
|
+ for (var s of h(e))
|
|
|
|
|
+ E.call(e, s) && k(t, s, e[s]);
|
|
|
|
|
+ return t;
|
|
|
|
|
+}, f = (t, e) => D(t, I(e));
|
|
|
|
|
+import { resolveComponent as m, createElementBlock as n, openBlock as d, createElementVNode as l, createTextVNode as p, createVNode as S, withCtx as b, Fragment as C, renderList as _, normalizeClass as V, toDisplayString as c, createCommentVNode as F, withDirectives as N, createBlock as U, resolveDynamicComponent as z, vShow as B, h as a } from "vue";
|
|
|
|
|
+import { k as O } from "./index2.js";
|
|
|
|
|
+const r = (t, e = {}, s) => ({
|
|
|
|
|
+ name: "Demo" + t,
|
|
|
|
|
+ render() {
|
|
|
|
|
+ const u = m(t);
|
|
|
|
|
+ return a("div", { class: "demo-render" }, [
|
|
|
|
|
+ a(u, e, s ? { default: () => s } : void 0)
|
|
|
|
|
+ ]);
|
|
|
|
|
+ }
|
|
|
|
|
+}), w = (t, e, s) => ({
|
|
|
|
|
+ name: "Demo" + t,
|
|
|
|
|
+ data() {
|
|
|
|
|
+ return { visible: !1 };
|
|
|
|
|
+ },
|
|
|
|
|
+ render() {
|
|
|
|
|
+ const u = m(t);
|
|
|
|
|
+ return a("div", { class: "demo-render" }, [
|
|
|
|
|
+ a("button", { class: "demo-btn", onClick: () => this.visible = !0 }, e),
|
|
|
|
|
+ a(
|
|
|
|
|
+ u,
|
|
|
|
|
+ f(g({}, s), { value: this.visible, "onUpdate:value": (i) => this.visible = i }),
|
|
|
|
|
+ { default: () => a("div", "内容") }
|
|
|
|
|
+ )
|
|
|
|
|
+ ]);
|
|
|
|
|
+ }
|
|
|
|
|
+}), j = {
|
|
|
name: "ComponentsDoc",
|
|
name: "ComponentsDoc",
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
@@ -10,29 +46,148 @@ const C = {
|
|
|
{
|
|
{
|
|
|
key: "s-modal",
|
|
key: "s-modal",
|
|
|
name: "SModal",
|
|
name: "SModal",
|
|
|
- title: "SModal 弹窗",
|
|
|
|
|
|
|
+ title: "弹窗",
|
|
|
desc: "通用模态框,支持全屏、自定义底部等。",
|
|
desc: "通用模态框,支持全屏、自定义底部等。",
|
|
|
|
|
+ demo: w("SModal", "打开弹窗", { title: "标题", width: "600px" }),
|
|
|
code: `<s-modal v-model:value="visible" title="标题" width="800px" @handCancel="onCancel">
|
|
code: `<s-modal v-model:value="visible" title="标题" width="800px" @handCancel="onCancel">
|
|
|
<div>弹窗内容</div>
|
|
<div>弹窗内容</div>
|
|
|
</s-modal>`
|
|
</s-modal>`
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
- key: "s-modal-template",
|
|
|
|
|
- name: "SModalTemplate",
|
|
|
|
|
- title: "SModalTemplate 列表弹窗",
|
|
|
|
|
- desc: "带列表/分页的弹窗模板,常用于选择类弹窗。",
|
|
|
|
|
- code: `<s-modal-template
|
|
|
|
|
- v-model:value="visible"
|
|
|
|
|
- title="选择"
|
|
|
|
|
- :columns="columns"
|
|
|
|
|
- :loadData="page"
|
|
|
|
|
- @select="onSelect"
|
|
|
|
|
|
|
+ key: "s-drawer",
|
|
|
|
|
+ name: "SDrawer",
|
|
|
|
|
+ title: "抽屉",
|
|
|
|
|
+ desc: "侧边抽屉。",
|
|
|
|
|
+ demo: w("SDrawer", "打开抽屉", { title: "抽屉标题" }),
|
|
|
|
|
+ code: `<s-drawer v-model:value="visible" title="抽屉标题">
|
|
|
|
|
+ <div>内容</div>
|
|
|
|
|
+</s-drawer>`
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ key: "s-collapses",
|
|
|
|
|
+ name: "SCollapses",
|
|
|
|
|
+ title: "折叠面板",
|
|
|
|
|
+ desc: "折叠分组容器与分组项。",
|
|
|
|
|
+ demo: {
|
|
|
|
|
+ render() {
|
|
|
|
|
+ const t = m("SCollapses"), e = m("SCollapsesItem");
|
|
|
|
|
+ return a("div", { class: "demo-render" }, [
|
|
|
|
|
+ a(t, null, {
|
|
|
|
|
+ default: () => [a(e, { title: "分组一" }, { default: () => a("div", "内容") })]
|
|
|
|
|
+ })
|
|
|
|
|
+ ]);
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ code: `<s-collapses>
|
|
|
|
|
+ <s-collapses-item title="分组一">
|
|
|
|
|
+ <div>内容</div>
|
|
|
|
|
+ </s-collapses-item>
|
|
|
|
|
+</s-collapses>`
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ key: "s-panel-layout",
|
|
|
|
|
+ name: "SPanelLayout",
|
|
|
|
|
+ title: "面板",
|
|
|
|
|
+ desc: "内容面板容器。",
|
|
|
|
|
+ demo: r("SPanelLayout", { title: "面板标题" }, a("div", "内容")),
|
|
|
|
|
+ code: `<s-panel-layout title="面板标题">
|
|
|
|
|
+ <div>内容</div>
|
|
|
|
|
+</s-panel-layout>`
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ key: "s-file-upload",
|
|
|
|
|
+ name: "SFileUpload",
|
|
|
|
|
+ title: "文件上传",
|
|
|
|
|
+ desc: "文件上传,支持图片墙与列表两种形态。",
|
|
|
|
|
+ demo: r("SFileUpload", { listType: "picture", label: "附件", list: [] }),
|
|
|
|
|
+ code: `<s-file-upload
|
|
|
|
|
+ listType="picture-card"
|
|
|
|
|
+ label="附件"
|
|
|
|
|
+ :list="fileList"
|
|
|
|
|
+ :sizeLimit="50"
|
|
|
|
|
+ @handChange="onChange"
|
|
|
|
|
+/>`
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ key: "s-dragger-upload",
|
|
|
|
|
+ name: "SDraggerUpload",
|
|
|
|
|
+ title: "拖拽上传",
|
|
|
|
|
+ desc: "拖拽上传区域。",
|
|
|
|
|
+ demo: r("SDraggerUpload", { list: [] }),
|
|
|
|
|
+ code: '<s-dragger-upload :list="fileList" @handChange="onChange" />'
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ key: "s-icon",
|
|
|
|
|
+ name: "SIcon",
|
|
|
|
|
+ title: "图标",
|
|
|
|
|
+ desc: "antd 图标封装,支持 size/color。",
|
|
|
|
|
+ demo: r("SIcon", { name: "SearchOutlined", size: 22 }),
|
|
|
|
|
+ code: '<s-icon name="SearchOutlined" :size="16" />'
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ key: "s-empty",
|
|
|
|
|
+ name: "SEmpty",
|
|
|
|
|
+ title: "空状态",
|
|
|
|
|
+ desc: "空数据占位。",
|
|
|
|
|
+ demo: r("SEmpty", { description: "暂无数据" }),
|
|
|
|
|
+ code: '<s-empty description="暂无数据" />'
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ key: "s-toggle-language",
|
|
|
|
|
+ name: "SToggleLanguage",
|
|
|
|
|
+ title: "语言切换",
|
|
|
|
|
+ desc: "中英文切换(需 VITE_APP_LANG_ENABLE=true 才显示)。",
|
|
|
|
|
+ demo: r("SToggleLanguage", { blockType: "button" }),
|
|
|
|
|
+ code: '<s-toggle-language blockType="dropdown" />'
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ key: "s-user-select",
|
|
|
|
|
+ name: "SUserSelect",
|
|
|
|
|
+ title: "人员选择",
|
|
|
|
|
+ desc: "人员选择弹窗,返回选中人员。",
|
|
|
|
|
+ code: '<s-user-select v-model:value="ids" @change="onChange" />'
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ key: "s-office-select",
|
|
|
|
|
+ name: "SOfficeSelect",
|
|
|
|
|
+ title: "岗位/组织选择",
|
|
|
|
|
+ desc: "岗位/组织选择弹窗。",
|
|
|
|
|
+ code: '<s-office-select v-model:value="ids" @change="onChange" />'
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ key: "s-tree-select",
|
|
|
|
|
+ name: "STreeSelect",
|
|
|
|
|
+ title: "树选择",
|
|
|
|
|
+ desc: "树形下拉选择,支持搜索高亮、多选。",
|
|
|
|
|
+ code: `<s-tree-select
|
|
|
|
|
+ v-model:value="value"
|
|
|
|
|
+ :recursionChildren="loadChildren"
|
|
|
|
|
+ :multiple="false"
|
|
|
|
|
+/>`
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ key: "s-cascader",
|
|
|
|
|
+ name: "SCascader",
|
|
|
|
|
+ title: "级联选择",
|
|
|
|
|
+ desc: "级联选择器。",
|
|
|
|
|
+ code: '<s-cascader v-model:value="value" :options="options" />'
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ key: "s-tree",
|
|
|
|
|
+ name: "STree",
|
|
|
|
|
+ title: "树",
|
|
|
|
|
+ desc: "左侧树,支持一/二级异步加载。",
|
|
|
|
|
+ code: `<s-tree
|
|
|
|
|
+ v-model:select="treeValue"
|
|
|
|
|
+ :levelOneChildren="levelOneChildren"
|
|
|
|
|
+ :levelTwoChildren="levelTwoChildren"
|
|
|
|
|
+ @select:modelValue="handSelect"
|
|
|
/>`
|
|
/>`
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
key: "s-list-layout",
|
|
key: "s-list-layout",
|
|
|
name: "SListLayout",
|
|
name: "SListLayout",
|
|
|
- title: "SListLayout 列表布局",
|
|
|
|
|
|
|
+ title: "列表布局",
|
|
|
desc: "列表页标准布局:标题、按钮、筛选区、表格、分页。",
|
|
desc: "列表页标准布局:标题、按钮、筛选区、表格、分页。",
|
|
|
code: `<s-list-layout
|
|
code: `<s-list-layout
|
|
|
title="基础列表"
|
|
title="基础列表"
|
|
@@ -53,110 +208,48 @@ const C = {
|
|
|
{
|
|
{
|
|
|
key: "s-list-card-layout",
|
|
key: "s-list-card-layout",
|
|
|
name: "SListCardLayout",
|
|
name: "SListCardLayout",
|
|
|
- title: "SListCardLayout 卡片列表",
|
|
|
|
|
|
|
+ title: "卡片列表",
|
|
|
desc: "卡片形式的列表布局。",
|
|
desc: "卡片形式的列表布局。",
|
|
|
code: '<s-list-card-layout :columns="columns" :loadData="page" title="卡片列表" />'
|
|
code: '<s-list-card-layout :columns="columns" :loadData="page" title="卡片列表" />'
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
key: "s-list-table-tree-layout",
|
|
key: "s-list-table-tree-layout",
|
|
|
name: "SListTableTreeLayout",
|
|
name: "SListTableTreeLayout",
|
|
|
- title: "SListTableTreeLayout 树表布局",
|
|
|
|
|
|
|
+ title: "树表布局",
|
|
|
desc: "左树右表的列表布局。",
|
|
desc: "左树右表的列表布局。",
|
|
|
- code: `<s-list-table-tree-layout :columns="columns" :loadData="page" title="树表">
|
|
|
|
|
- <template #tree>
|
|
|
|
|
- <s-tree v-model:select="treeValue" :levelOneChildren="load" />
|
|
|
|
|
- </template>
|
|
|
|
|
-</s-list-table-tree-layout>`
|
|
|
|
|
|
|
+ code: '<s-list-table-tree-layout :columns="columns" :loadData="page" title="树表" />'
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
key: "s-super-list-layout",
|
|
key: "s-super-list-layout",
|
|
|
name: "SSuperListLayout",
|
|
name: "SSuperListLayout",
|
|
|
- title: "SSuperListLayout 高级列表",
|
|
|
|
|
|
|
+ title: "高级列表",
|
|
|
desc: "支持高级搜索、列设置的高级列表布局。",
|
|
desc: "支持高级搜索、列设置的高级列表布局。",
|
|
|
code: '<s-super-list-layout :columns="columns" :loadData="page" />'
|
|
code: '<s-super-list-layout :columns="columns" :loadData="page" />'
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
- key: "s-tree",
|
|
|
|
|
- name: "STree",
|
|
|
|
|
- title: "STree 树",
|
|
|
|
|
- desc: "左侧树,支持一/二级异步加载。",
|
|
|
|
|
- code: `<s-tree
|
|
|
|
|
- v-model:select="treeValue"
|
|
|
|
|
- :levelOneChildren="levelOneChildren"
|
|
|
|
|
- :levelTwoChildren="levelTwoChildren"
|
|
|
|
|
- @select:modelValue="handSelect"
|
|
|
|
|
-/>`
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- key: "s-tree-select",
|
|
|
|
|
- name: "STreeSelect",
|
|
|
|
|
- title: "STreeSelect 树选择",
|
|
|
|
|
- desc: "树形下拉选择,支持搜索高亮、多选。",
|
|
|
|
|
- code: `<s-tree-select
|
|
|
|
|
- v-model:value="value"
|
|
|
|
|
- :recursionChildren="loadChildren"
|
|
|
|
|
- :multiple="false"
|
|
|
|
|
-/>`
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- key: "s-cascader",
|
|
|
|
|
- name: "SCascader",
|
|
|
|
|
- title: "SCascader 级联选择",
|
|
|
|
|
- desc: "级联选择器。",
|
|
|
|
|
- code: '<s-cascader v-model:value="value" :options="options" />'
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- key: "s-user-select",
|
|
|
|
|
- name: "SUserSelect",
|
|
|
|
|
- title: "SUserSelect 人员选择",
|
|
|
|
|
- desc: "人员选择弹窗,返回选中人员。",
|
|
|
|
|
- code: '<s-user-select v-model:value="ids" @change="onChange" />'
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- key: "s-office-select",
|
|
|
|
|
- name: "SOfficeSelect",
|
|
|
|
|
- title: "SOfficeSelect 岗位/组织选择",
|
|
|
|
|
- desc: "岗位/组织选择弹窗。",
|
|
|
|
|
- code: '<s-office-select v-model:value="ids" @change="onChange" />'
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- key: "s-file-upload",
|
|
|
|
|
- name: "SFileUpload",
|
|
|
|
|
- title: "SFileUpload 文件上传",
|
|
|
|
|
- desc: "文件上传,支持图片墙与列表两种形态。",
|
|
|
|
|
- code: `<s-file-upload
|
|
|
|
|
- listType="picture-card"
|
|
|
|
|
- label="附件"
|
|
|
|
|
- :list="fileList"
|
|
|
|
|
- :sizeLimit="50"
|
|
|
|
|
- @handChange="onChange"
|
|
|
|
|
|
|
+ key: "s-modal-template",
|
|
|
|
|
+ name: "SModalTemplate",
|
|
|
|
|
+ title: "列表弹窗",
|
|
|
|
|
+ desc: "带列表/分页的弹窗模板,常用于选择类弹窗。",
|
|
|
|
|
+ code: `<s-modal-template
|
|
|
|
|
+ v-model:value="visible"
|
|
|
|
|
+ title="选择"
|
|
|
|
|
+ :columns="columns"
|
|
|
|
|
+ :loadData="page"
|
|
|
|
|
+ @select="onSelect"
|
|
|
/>`
|
|
/>`
|
|
|
},
|
|
},
|
|
|
- {
|
|
|
|
|
- key: "s-dragger-upload",
|
|
|
|
|
- name: "SDraggerUpload",
|
|
|
|
|
- title: "SDraggerUpload 拖拽上传",
|
|
|
|
|
- desc: "拖拽上传区域。",
|
|
|
|
|
- code: '<s-dragger-upload :list="fileList" @handChange="onChange" />'
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- key: "s-copper-upload",
|
|
|
|
|
- name: "SCopperUpload",
|
|
|
|
|
- title: "SCopperUpload 头像裁剪上传",
|
|
|
|
|
- desc: "图片裁剪后上传。",
|
|
|
|
|
- code: '<s-copper-upload @handChange="onChange" />'
|
|
|
|
|
- },
|
|
|
|
|
{
|
|
{
|
|
|
key: "s-editor",
|
|
key: "s-editor",
|
|
|
name: "SEditor",
|
|
name: "SEditor",
|
|
|
- title: "SEditor 富文本",
|
|
|
|
|
|
|
+ title: "富文本",
|
|
|
desc: "基于 jodit 的富文本编辑器。",
|
|
desc: "基于 jodit 的富文本编辑器。",
|
|
|
code: '<s-editor v-model:value="html" />'
|
|
code: '<s-editor v-model:value="html" />'
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
key: "s-filter-wrap",
|
|
key: "s-filter-wrap",
|
|
|
- name: "SFilterWrap / SFilterItem",
|
|
|
|
|
- title: "SFilterWrap 筛选区",
|
|
|
|
|
|
|
+ name: "SFilterWrap",
|
|
|
|
|
+ title: "筛选区",
|
|
|
desc: "列表筛选条件布局容器与表单项。",
|
|
desc: "列表筛选条件布局容器与表单项。",
|
|
|
code: `<s-filter-wrap>
|
|
code: `<s-filter-wrap>
|
|
|
<s-filter-item label="名称">
|
|
<s-filter-item label="名称">
|
|
@@ -167,7 +260,7 @@ const C = {
|
|
|
{
|
|
{
|
|
|
key: "s-form-layout",
|
|
key: "s-form-layout",
|
|
|
name: "SFormLayout",
|
|
name: "SFormLayout",
|
|
|
- title: "SFormLayout 表单布局",
|
|
|
|
|
|
|
+ title: "表单布局",
|
|
|
desc: "表单页布局,配合 SForm / SFormItem。",
|
|
desc: "表单页布局,配合 SForm / SFormItem。",
|
|
|
code: `<s-form-layout :model="form" :rules="rules" @submit="submit">
|
|
code: `<s-form-layout :model="form" :rules="rules" @submit="submit">
|
|
|
<s-form-item label="名称" name="name">
|
|
<s-form-item label="名称" name="name">
|
|
@@ -175,74 +268,17 @@ const C = {
|
|
|
</s-form-item>
|
|
</s-form-item>
|
|
|
</s-form-layout>`
|
|
</s-form-layout>`
|
|
|
},
|
|
},
|
|
|
- {
|
|
|
|
|
- key: "s-panel-layout",
|
|
|
|
|
- name: "SPanelLayout",
|
|
|
|
|
- title: "SPanelLayout 面板",
|
|
|
|
|
- desc: "内容面板容器。",
|
|
|
|
|
- code: `<s-panel-layout title="面板标题">
|
|
|
|
|
- <div>内容</div>
|
|
|
|
|
-</s-panel-layout>`
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- key: "s-collapses",
|
|
|
|
|
- name: "SCollapses / SCollapsesItem",
|
|
|
|
|
- title: "SCollapses 折叠面板",
|
|
|
|
|
- desc: "折叠分组容器与分组项。",
|
|
|
|
|
- code: `<s-collapses>
|
|
|
|
|
- <s-collapses-item title="分组一">
|
|
|
|
|
- <div>内容</div>
|
|
|
|
|
- </s-collapses-item>
|
|
|
|
|
-</s-collapses>`
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- key: "s-drawer",
|
|
|
|
|
- name: "SDrawer",
|
|
|
|
|
- title: "SDrawer 抽屉",
|
|
|
|
|
- desc: "侧边抽屉。",
|
|
|
|
|
- code: `<s-drawer v-model:value="visible" title="抽屉标题">
|
|
|
|
|
- <div>内容</div>
|
|
|
|
|
-</s-drawer>`
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- key: "s-anchor",
|
|
|
|
|
- name: "SAnchor",
|
|
|
|
|
- title: "SAnchor 锚点",
|
|
|
|
|
- desc: "页面锚点导航。",
|
|
|
|
|
- code: '<s-anchor :items="items" />'
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- key: "s-icon",
|
|
|
|
|
- name: "SIcon",
|
|
|
|
|
- title: "SIcon 图标",
|
|
|
|
|
- desc: "antd 图标封装,支持 size/color。",
|
|
|
|
|
- code: '<s-icon name="SearchOutlined" :size="16" />'
|
|
|
|
|
- },
|
|
|
|
|
{
|
|
{
|
|
|
key: "s-icon-select",
|
|
key: "s-icon-select",
|
|
|
name: "SIconSelect",
|
|
name: "SIconSelect",
|
|
|
- title: "SIconSelect 图标选择",
|
|
|
|
|
|
|
+ title: "图标选择",
|
|
|
desc: "图标选择器。",
|
|
desc: "图标选择器。",
|
|
|
code: '<s-icon-select v-model:value="icon" />'
|
|
code: '<s-icon-select v-model:value="icon" />'
|
|
|
},
|
|
},
|
|
|
- {
|
|
|
|
|
- key: "s-empty",
|
|
|
|
|
- name: "SEmpty",
|
|
|
|
|
- title: "SEmpty 空状态",
|
|
|
|
|
- desc: "空数据占位。",
|
|
|
|
|
- code: '<s-empty description="暂无数据" />'
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- key: "s-toggle-language",
|
|
|
|
|
- name: "SToggleLanguage",
|
|
|
|
|
- title: "SToggleLanguage 语言切换",
|
|
|
|
|
- desc: "中英文切换(需 VITE_APP_LANG_ENABLE=true)。",
|
|
|
|
|
- code: '<s-toggle-language blockType="dropdown" />'
|
|
|
|
|
- },
|
|
|
|
|
{
|
|
{
|
|
|
key: "table",
|
|
key: "table",
|
|
|
name: "Table",
|
|
name: "Table",
|
|
|
- title: "Table 表格",
|
|
|
|
|
|
|
+ title: "表格",
|
|
|
desc: "增强表格(.jsx,未全局注册,需手动引入)。",
|
|
desc: "增强表格(.jsx,未全局注册,需手动引入)。",
|
|
|
code: `import Table from 'sapit-ui-plus/lib/js/Table.js'
|
|
code: `import Table from 'sapit-ui-plus/lib/js/Table.js'
|
|
|
// 或按项目实际路径引入后局部注册`
|
|
// 或按项目实际路径引入后局部注册`
|
|
@@ -251,89 +287,95 @@ const C = {
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
- toggle(s) {
|
|
|
|
|
- this.$set ? this.$set(this.shown, s, !this.shown[s]) : this.shown[s] = !this.shown[s];
|
|
|
|
|
|
|
+ toggle(t) {
|
|
|
|
|
+ this.shown[t] = !this.shown[t];
|
|
|
},
|
|
},
|
|
|
- scrollTo(s) {
|
|
|
|
|
- this.activeKey = s;
|
|
|
|
|
- const t = document.getElementById("c-" + s);
|
|
|
|
|
- t && t.scrollIntoView({ behavior: "smooth", block: "start" });
|
|
|
|
|
|
|
+ scrollTo(t) {
|
|
|
|
|
+ this.activeKey = t;
|
|
|
|
|
+ const e = document.getElementById("c-" + t);
|
|
|
|
|
+ e && e.scrollIntoView({ behavior: "smooth", block: "start" });
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
mounted() {
|
|
mounted() {
|
|
|
this.list.length && (this.activeKey = this.list[0].key);
|
|
this.list.length && (this.activeKey = this.list[0].key);
|
|
|
}
|
|
}
|
|
|
-}, b = { class: "cd-page" }, _ = { class: "cd-header" }, L = { class: "nav" }, w = { class: "cd-main" }, T = { class: "cd-side" }, D = ["onClick"], I = { class: "cd-content" }, E = ["id"], F = { class: "en" }, U = { class: "desc" }, V = { class: "code-bar" }, x = ["onClick"], O = { class: "code" };
|
|
|
|
|
-function A(s, t, N, j, a, c) {
|
|
|
|
|
- const r = v("router-link");
|
|
|
|
|
- return d(), i("div", b, [
|
|
|
|
|
- e("header", _, [
|
|
|
|
|
- t[2] || (t[2] = e("div", { class: "brand" }, [
|
|
|
|
|
- e("span", { class: "logo" }, "S"),
|
|
|
|
|
- n(" sapit-ui 组件 ")
|
|
|
|
|
|
|
+}, K = { class: "cd-page" }, P = { class: "cd-header" }, A = { class: "nav" }, M = { class: "cd-main" }, G = { class: "cd-side" }, W = ["onClick"], q = { class: "cd-content" }, H = ["id"], J = { class: "en" }, Q = { class: "desc" }, R = {
|
|
|
|
|
+ key: 0,
|
|
|
|
|
+ class: "demo-box"
|
|
|
|
|
+}, X = { class: "code-bar" }, Y = ["onClick"], Z = { class: "code" };
|
|
|
|
|
+function $(t, e, s, u, i, v) {
|
|
|
|
|
+ const y = m("router-link");
|
|
|
|
|
+ return d(), n("div", K, [
|
|
|
|
|
+ l("header", P, [
|
|
|
|
|
+ e[2] || (e[2] = l("div", { class: "brand" }, [
|
|
|
|
|
+ l("span", { class: "logo" }, "S"),
|
|
|
|
|
+ p(" sapit-ui 组件 ")
|
|
|
], -1)),
|
|
], -1)),
|
|
|
- e("nav", L, [
|
|
|
|
|
- m(r, {
|
|
|
|
|
|
|
+ l("nav", A, [
|
|
|
|
|
+ S(y, {
|
|
|
class: "nav-item",
|
|
class: "nav-item",
|
|
|
to: "/docs"
|
|
to: "/docs"
|
|
|
}, {
|
|
}, {
|
|
|
- default: u(() => t[0] || (t[0] = [
|
|
|
|
|
- n("使用文档")
|
|
|
|
|
|
|
+ default: b(() => e[0] || (e[0] = [
|
|
|
|
|
+ p("使用文档")
|
|
|
])),
|
|
])),
|
|
|
_: 1
|
|
_: 1
|
|
|
}),
|
|
}),
|
|
|
- m(r, {
|
|
|
|
|
|
|
+ S(y, {
|
|
|
class: "nav-item active",
|
|
class: "nav-item active",
|
|
|
to: "/components"
|
|
to: "/components"
|
|
|
}, {
|
|
}, {
|
|
|
- default: u(() => t[1] || (t[1] = [
|
|
|
|
|
- n("组件")
|
|
|
|
|
|
|
+ default: b(() => e[1] || (e[1] = [
|
|
|
|
|
+ p("组件")
|
|
|
])),
|
|
])),
|
|
|
_: 1
|
|
_: 1
|
|
|
})
|
|
})
|
|
|
])
|
|
])
|
|
|
]),
|
|
]),
|
|
|
- e("div", w, [
|
|
|
|
|
- e("aside", T, [
|
|
|
|
|
- t[3] || (t[3] = e("div", { class: "side-title" }, "组件", -1)),
|
|
|
|
|
- e("ul", null, [
|
|
|
|
|
- (d(!0), i(p, null, y(a.list, (l) => (d(), i("li", {
|
|
|
|
|
- key: l.key,
|
|
|
|
|
- class: h({ active: a.activeKey === l.key }),
|
|
|
|
|
- onClick: (S) => c.scrollTo(l.key)
|
|
|
|
|
- }, o(l.title), 11, D))), 128))
|
|
|
|
|
|
|
+ l("div", M, [
|
|
|
|
|
+ l("aside", G, [
|
|
|
|
|
+ e[3] || (e[3] = l("div", { class: "side-title" }, "组件", -1)),
|
|
|
|
|
+ l("ul", null, [
|
|
|
|
|
+ (d(!0), n(C, null, _(i.list, (o) => (d(), n("li", {
|
|
|
|
|
+ key: o.key,
|
|
|
|
|
+ class: V({ active: i.activeKey === o.key }),
|
|
|
|
|
+ onClick: (T) => v.scrollTo(o.key)
|
|
|
|
|
+ }, c(o.title), 11, W))), 128))
|
|
|
])
|
|
])
|
|
|
]),
|
|
]),
|
|
|
- e("section", I, [
|
|
|
|
|
- t[4] || (t[4] = e("h1", { class: "doc-title" }, "组件", -1)),
|
|
|
|
|
- t[5] || (t[5] = e("p", { class: "lead" }, " 基座内置组件使用文档。示例为用法示意,具体 props 以组件实现为准;组件已全局注册,模板中直接以文件名标签使用。 ", -1)),
|
|
|
|
|
- (d(!0), i(p, null, y(a.list, (l) => (d(), i("div", {
|
|
|
|
|
- key: l.key,
|
|
|
|
|
- id: "c-" + l.key,
|
|
|
|
|
|
|
+ l("section", q, [
|
|
|
|
|
+ e[4] || (e[4] = l("h1", { class: "doc-title" }, "组件", -1)),
|
|
|
|
|
+ e[5] || (e[5] = l("p", { class: "lead" }, " 基座内置组件使用文档。带“预览”的为实际渲染效果,示例代码仅供参照,具体 props 以组件实现为准。 ", -1)),
|
|
|
|
|
+ (d(!0), n(C, null, _(i.list, (o) => (d(), n("div", {
|
|
|
|
|
+ key: o.key,
|
|
|
|
|
+ id: "c-" + o.key,
|
|
|
class: "cd-item"
|
|
class: "cd-item"
|
|
|
}, [
|
|
}, [
|
|
|
- e("h2", null, [
|
|
|
|
|
- n(o(l.title) + " ", 1),
|
|
|
|
|
- e("span", F, o(l.name), 1)
|
|
|
|
|
|
|
+ l("h2", null, [
|
|
|
|
|
+ p(c(o.title) + " ", 1),
|
|
|
|
|
+ l("span", J, c(o.name), 1)
|
|
|
]),
|
|
]),
|
|
|
- e("p", U, o(l.desc), 1),
|
|
|
|
|
- e("div", V, [
|
|
|
|
|
- e("button", {
|
|
|
|
|
|
|
+ l("p", Q, c(o.desc), 1),
|
|
|
|
|
+ o.demo ? (d(), n("div", R, [
|
|
|
|
|
+ (d(), U(z(o.demo)))
|
|
|
|
|
+ ])) : F("", !0),
|
|
|
|
|
+ l("div", X, [
|
|
|
|
|
+ l("button", {
|
|
|
class: "code-btn",
|
|
class: "code-btn",
|
|
|
- onClick: (S) => c.toggle(l.key)
|
|
|
|
|
- }, o(a.shown[l.key] ? "收起代码" : "查看代码"), 9, x)
|
|
|
|
|
|
|
+ onClick: (T) => v.toggle(o.key)
|
|
|
|
|
+ }, c(i.shown[o.key] ? "收起代码" : "查看代码"), 9, Y)
|
|
|
]),
|
|
]),
|
|
|
- g(e("pre", O, [
|
|
|
|
|
- e("code", null, o(l.code), 1)
|
|
|
|
|
|
|
+ N(l("pre", Z, [
|
|
|
|
|
+ l("code", null, c(o.code), 1)
|
|
|
], 512), [
|
|
], 512), [
|
|
|
- [k, a.shown[l.key]]
|
|
|
|
|
|
|
+ [B, i.shown[o.key]]
|
|
|
])
|
|
])
|
|
|
- ], 8, E))), 128))
|
|
|
|
|
|
|
+ ], 8, H))), 128))
|
|
|
])
|
|
])
|
|
|
])
|
|
])
|
|
|
]);
|
|
]);
|
|
|
}
|
|
}
|
|
|
-const K = /* @__PURE__ */ f(C, [["render", A], ["__scopeId", "data-v-1c73fae1"]]);
|
|
|
|
|
|
|
+const se = /* @__PURE__ */ O(j, [["render", $], ["__scopeId", "data-v-1f9430ea"]]);
|
|
|
export {
|
|
export {
|
|
|
- K as default
|
|
|
|
|
|
|
+ se as default
|
|
|
};
|
|
};
|