├── .editorconfig
├── .eslintrc.js
├── .github
└── workflows
│ └── deploy.yml
├── .gitignore
├── .prettierrc
├── .stylelintrc
├── LICENSE
├── README.md
├── alias.js
├── babel.config.js
├── components.d.ts
├── docs
├── .vuepress
│ ├── .DS_Store
│ ├── client.js
│ ├── config.js
│ ├── dist
│ │ ├── 404.html
│ │ ├── assets
│ │ │ ├── 404.e222bc2a.js
│ │ │ ├── 404.html.4f8e6760.js
│ │ │ ├── 404.html.c3886853.js
│ │ │ ├── Layout.e6bb4246.js
│ │ │ ├── app.67122b30.js
│ │ │ ├── back-to-top.8efcbe56.svg
│ │ │ ├── element-icons.9c88a535.woff
│ │ │ ├── element-icons.de5eb258.ttf
│ │ │ ├── iconfont.5b2375f1.svg
│ │ │ ├── index.html.1089cbd5.js
│ │ │ ├── index.html.ae40c818.js
│ │ │ ├── install.html.6986468a.js
│ │ │ ├── install.html.e44d4a3a.js
│ │ │ ├── layout.html.1dce1f5f.js
│ │ │ ├── layout.html.6fd5e2b4.js
│ │ │ ├── start.html.26ce266d.js
│ │ │ ├── start.html.592580ad.js
│ │ │ ├── style.ebc8fdd8.css
│ │ │ ├── table.html.01d9d730.js
│ │ │ └── table.html.74858bb0.js
│ │ ├── components
│ │ │ ├── layout.html
│ │ │ └── table.html
│ │ ├── guide
│ │ │ ├── install.html
│ │ │ └── start.html
│ │ └── index.html
│ └── theme
│ │ └── styles
│ │ └── index.styl
├── components
│ ├── layout.md
│ └── table.md
├── guide
│ ├── install.md
│ └── start.md
└── index.md
├── jest.config.js
├── lerna.json
├── main.css
├── package.json
├── packages
├── layout
│ ├── .gitignore
│ ├── README.md
│ ├── __tests__
│ │ └── layout.spec.ts
│ ├── package.json
│ ├── src
│ │ ├── Index.vue
│ │ ├── components
│ │ │ └── Render.vue
│ │ └── main.ts
│ └── typings
│ │ └── sum-ui.d.ts
└── table
│ ├── .gitignore
│ ├── README.md
│ ├── __tests__
│ └── table.spec.ts
│ ├── package.json
│ ├── src
│ ├── Index.vue
│ ├── components
│ │ └── Render.vue
│ └── main.ts
│ └── typings
│ └── sum-ui.d.ts
├── plopfile.js
├── rollup.config.js
├── tailwind.config.js
├── templates
├── .gitignore
├── README.hbs
├── __tests__
│ └── index.spec.hbs
├── package.hbs
├── src
│ ├── Index.vue
│ └── main.hbs
└── typings
│ └── sum-ui.d.ts
├── tsconfig.json
├── typings
├── vue-shim.d.ts
└── vue-test-utils.d.ts
└── yarn.lock
/.editorconfig:
--------------------------------------------------------------------------------
1 | root = true
2 |
3 | [*]
4 | charset = utf-8
5 | indent_style = space
6 | indent_size = 2
7 | end_of_line = lf
8 | insert_final_newline = true
9 | trim_trailing_whitespace = true
10 | quote_type = single
--------------------------------------------------------------------------------
/.eslintrc.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | root: true,
3 | env: {
4 | node: true,
5 | browser: true,
6 | es6: true
7 | },
8 | extends: [
9 | 'plugin:vue/vue3-essential',
10 | 'eslint:recommended',
11 | '@vue/typescript/recommended',
12 | '@vue/prettier',
13 | '@vue/prettier/@typescript-eslint'
14 | ],
15 | parserOptions: {
16 | ecmaVersion: 2020
17 | },
18 | rules: {
19 | 'prettier/prettier': 'error',
20 | 'no-console': process.env.NODE_ENV === 'prod' ? 'warn' : 'off',
21 | 'no-debugger': process.env.NODE_ENV === 'prod' ? 'warn' : 'off',
22 | '@typescript-eslint/no-var-requires': 'off'
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/.github/workflows/deploy.yml:
--------------------------------------------------------------------------------
1 | name: Build and Deploy
2 | on:
3 | push:
4 | branches:
5 | - master
6 | jobs:
7 | build-and-deploy:
8 | runs-on: ubuntu-latest
9 | steps:
10 | - name: Checkout 🛎️
11 | uses: actions/checkout@v2.3.1 # If you're using actions/checkout@v2 you must set persist-credentials to false in most cases for the deployment to work correctly.
12 | with:
13 | persist-credentials: false
14 |
15 | - name: Install and Build 🔧 # This example project is built using npm and outputs the result to the 'build' folder. Replace with the commands required to build your project, or remove this step entirely if your site is pre-built.
16 | run: |
17 | npm install
18 | npm run docs:build
19 | - name: Deploy 🚀
20 | uses: JamesIves/github-pages-deploy-action@3.6.2
21 | with:
22 | GITHUB_TOKEN: ${{ secrets.ACTION_TOKEN }}
23 | BRANCH: gh-pages # The branch the action should deploy to.
24 | FOLDER: docs/.vuepress/dist # The folder the action should deploy.
25 | CLEAN: true # Automatically remove deleted files from the deploy branch
26 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 |
2 | # packages
3 | .temp
4 | .cache
5 | .DS_Store
6 | ./**/.DS_Store
7 | node_modules
8 | /dist
9 | /deploy
10 |
11 | # test coverage
12 | coverage
13 |
14 | # local env files
15 | .env.local
16 | .env.*.local
17 |
18 | # Log files
19 | npm-debug.log*
20 | yarn-debug.log*
21 | yarn-error.log*
22 | pnpm-debug.log*
23 |
24 | # Editor directories and files
25 | .idea
26 | .vscode
27 | *.suo
28 | *.ntvs*
29 | *.njsproj
30 | *.sln
31 | *.sw?
--------------------------------------------------------------------------------
/.prettierrc:
--------------------------------------------------------------------------------
1 | {
2 | "printWidth": 120,
3 | "semi": false,
4 | "singleQuote": true,
5 | "trailingComma": "none",
6 | "jsxBracketSameLine": true,
7 | "arrowParens": "avoid",
8 | "insertPragma": false,
9 | "tabWidth": 4,
10 | "useTabs": false,
11 | "bracketSpacing": true
12 | }
13 |
--------------------------------------------------------------------------------
/.stylelintrc:
--------------------------------------------------------------------------------
1 | {
2 | "extends": ["stylelint-config-standard", "stylelint-config-recess-order"],
3 | "plugins": ["stylelint-order"],
4 | "rules": {
5 | "font-family-no-missing-generic-family-keyword": null
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2020 Summer
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # sum-ui
2 |
3 | vue3.0 UI
4 |
5 | 基于 Vue3.x + element-plus + Scss 封装的基础组件库
6 |
7 | 添加了 tailwindcss 支持
8 | ## install
9 |
10 | ```bash
11 | npm install
12 | # OR
13 | yarn install
14 | ```
15 |
16 | ## dev
17 |
18 | ```bash
19 | npm run docs:dev
20 | # OR
21 | yarn docs:dev
22 | ```
23 |
24 | ## build docs
25 |
26 | ```bash
27 | npm run docs:build
28 | # OR
29 | yarn docs:build
30 | ```
31 |
32 | ## build components
33 |
34 | ```bash
35 | npm run build
36 | # OR
37 | yarn build
38 | ```
39 |
40 | [组件库交互文档](https://leitingting08.github.io/sum-ui/)
41 |
42 | TODO:
43 |
44 | - [x] @sum-ui/layout 布局组件
45 | - [x] @sum-ui/table 表格组件
46 | - [ ] @sum-ui/upload 文件上传组件
47 | - [ ] @sum-ui/form 表单组件
48 |
--------------------------------------------------------------------------------
/alias.js:
--------------------------------------------------------------------------------
1 | const { readdirSync } = require('fs')
2 | const { join } = require('path')
3 | const chalk = require('chalk')
4 | const headPkgList = [] // 非 @sum-ui/开头的组件
5 |
6 | const pkgList = readdirSync(join(__dirname, './packages')).filter(
7 | pkg => pkg.charAt(0) !== '.' && !headPkgList.includes(pkg)
8 | )
9 | const alias = pkgList.reduce((pre, pkg) => {
10 | pre[`@sum-ui/${pkg}`] = join(__dirname, './packages', pkg, 'src/main.ts')
11 | return {
12 | ...pre
13 | }
14 | }, {})
15 |
16 | console.log(`🌼 alias list \n${chalk.blue(Object.keys(alias).join('\n'))}`)
17 |
18 | module.exports = alias
19 |
--------------------------------------------------------------------------------
/babel.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | // ATTENTION!!
3 | // Preset ordering is reversed, so `@babel/typescript` will called first
4 | // Do not put `@babel/typescript` before `@babel/env`, otherwise will cause a compile error
5 | // See https://github.com/babel/babel/issues/12066
6 | presets: [
7 | '@vue/cli-plugin-babel/preset',
8 | [
9 | '@babel/typescript',
10 | {
11 | isTSX: true,
12 | allExtensions: true
13 | }
14 | ]
15 | ],
16 | plugins: ['@babel/transform-runtime'],
17 | env: {
18 | utils: {
19 | ignore: ['**/*.test.ts', '**/*.spec.ts'],
20 | presets: [
21 | [
22 | '@babel/env',
23 | {
24 | loose: true,
25 | modules: false
26 | }
27 | ]
28 | ]
29 | }
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/components.d.ts:
--------------------------------------------------------------------------------
1 | // generated by unplugin-vue-components
2 | // We suggest you to commit this file into source control
3 | // Read more: https://github.com/vuejs/vue-next/pull/3399
4 |
5 | declare module 'vue' {
6 | export interface GlobalComponents {
7 | ElConfigProvider: typeof import('element-plus/es')['ElConfigProvider']
8 | ElPagination: typeof import('element-plus/es')['ElPagination']
9 | ElTable: typeof import('element-plus/es')['ElTable']
10 | ElTableColumn: typeof import('element-plus/es')['ElTableColumn']
11 | }
12 | }
13 |
14 | export { }
15 |
--------------------------------------------------------------------------------
/docs/.vuepress/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leitingting08/sum-ui/2830dd3be4f3096eac054f72d472ea1ffdcf1802/docs/.vuepress/.DS_Store
--------------------------------------------------------------------------------
/docs/.vuepress/client.js:
--------------------------------------------------------------------------------
1 | /**
2 | * 全局注册组件 下文注释:重要、勿删,plop在自动新增组件的时候注入,不需要手动添加
3 | */
4 | import { defineClientConfig } from '@vuepress/client'
5 | import 'element-plus/theme-chalk/src/index.scss'
6 | // -- APPSTART ITEMS HERE --
7 | import SumTable from '@sum-ui/table'
8 | import SumLayout from '@sum-ui/layout'
9 | export default defineClientConfig({
10 | enhance({ app, router, siteData }) {
11 | // -- APPEND ITEMS HERE --
12 | app.component(SumTable.name, SumTable)
13 | app.component(SumLayout.name, SumLayout)
14 | },
15 | setup() {},
16 | rootComponents: []
17 | })
18 |
--------------------------------------------------------------------------------
/docs/.vuepress/config.js:
--------------------------------------------------------------------------------
1 | const alias = require('../../alias')
2 | const { viteBundler } = require('@vuepress/bundler-vite')
3 | const { defaultTheme } = require('@vuepress/theme-default')
4 | const demoblockPlugin = require('vuepress-plugin-demoblock-plus')
5 |
6 | module.exports = {
7 | title: 'sum-ui', // 顶部左侧标题
8 | description: 'Vue3 + ElementPlus 组件库',
9 | base: '/sum-ui/',
10 | bundler: viteBundler({
11 | viteOptions: {
12 | css: {
13 | postcss: {
14 | plugins: [require('tailwindcss'), require('autoprefixer')]
15 | }
16 | }
17 | }
18 | }),
19 | alias,
20 | head: [
21 | // 设置 描述 和 关键词
22 | ['meta', { name: 'keywords', content: 'Vue3 UI 组件库' }],
23 | [
24 | 'meta',
25 | {
26 | name: 'description',
27 | content:
28 | '此框架使用与二次开发,前端框架使用 Vue3,UI 框架使用 element-plus,全局数据状态管理使用 vuex,ajax 使用库为 axios。用于快速搭建中后台页面。'
29 | }
30 | ],
31 | // 添加百度统计
32 | [
33 | 'script',
34 | {},
35 | `
36 | var _hmt = _hmt || [];
37 | (function() {
38 | var hm = document.createElement("script");
39 | hm.src = "https://hm.baidu.com/hm.js?09606fe130f768bfb1c3be82fdf56339";
40 | var s = document.getElementsByTagName("script")[0];
41 | s.parentNode.insertBefore(hm, s);
42 | })();
43 | `
44 | ]
45 | ],
46 | theme: defaultTheme({
47 | sidebar: {
48 | // 侧边栏
49 | '/': [
50 | {
51 | text: '介绍',
52 | children: [
53 | { text: '安装', link: '/guide/install' },
54 | { text: '快速上手', link: '/guide/start' }
55 | ]
56 | },
57 | {
58 | text: '组件',
59 | children: [
60 | { text: 'Layout 布局', link: '/components/layout' },
61 | { text: 'Table 表格', link: '/components/table' }
62 | ]
63 | }
64 | ]
65 | },
66 | navbar: [
67 | // 顶部右侧导航栏
68 | { text: '介绍', link: '/', activeMatch: '^/$|^/guide/' },
69 | {
70 | text: '组件',
71 | link: '/components/layout.html',
72 | activeMatch: '^/$|^/components/'
73 | }
74 | ],
75 | // page meta
76 | editLinkText: '在 GitHub 上编辑此页',
77 | lastUpdatedText: '上次更新',
78 | contributorsText: '贡献者'
79 | }),
80 | plugins: [
81 | demoblockPlugin({
82 | customClass: 'demoblock-custom',
83 | theme: 'github-light',
84 | cssPreprocessor: 'scss',
85 | scriptReplaces: [
86 | {
87 | searchValue: /const ({ defineComponent as _defineComponent }) = Vue/g,
88 | replaceValue: 'const { defineComponent: _defineComponent } = Vue'
89 | }
90 | ]
91 | })
92 | ]
93 | }
94 |
--------------------------------------------------------------------------------
/docs/.vuepress/dist/404.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | sum-ui
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/docs/.vuepress/dist/assets/404.e222bc2a.js:
--------------------------------------------------------------------------------
1 | import{f as a,u as t,g as o,r as e,c as l,a as s,t as n,b as u,w as r,h as c,o as d,d as h}from"./app.67122b30.js";const m={class:"theme-container"},v={class:"theme-default-content"},f=s("h1",null,"404",-1);var i=a({setup(a){var i,p,b;const k=t(),g=o(),F=null!=(i=g.value.notFound)?i:["Not Found"],M=null!=(p=g.value.home)?p:k.value,j=null!=(b=g.value.backToHome)?b:"Back to home";return(a,t)=>{const o=e("RouterLink");return d(),l("div",m,[s("div",v,[f,s("blockquote",null,n(F[Math.floor(Math.random()*F.length)]),1),u(o,{to:c(M)},{default:r((()=>[h(n(c(j)),1)])),_:1},8,["to"])])])}}});export{i as default};
2 |
--------------------------------------------------------------------------------
/docs/.vuepress/dist/assets/404.html.4f8e6760.js:
--------------------------------------------------------------------------------
1 | const t={key:"v-3706649a",path:"/404.html",title:"",lang:"en-US",frontmatter:{layout:"404"},excerpt:"",headers:[],filePathRelative:null,git:{}};export{t as data};
2 |
--------------------------------------------------------------------------------
/docs/.vuepress/dist/assets/404.html.c3886853.js:
--------------------------------------------------------------------------------
1 | const n={};n.render=function(n,e){return null};export{n as default};
2 |
--------------------------------------------------------------------------------
/docs/.vuepress/dist/assets/Layout.e6bb4246.js:
--------------------------------------------------------------------------------
1 | var e=Object.defineProperty,t=Object.defineProperties,l=Object.getOwnPropertyDescriptors,a=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,s=Object.prototype.propertyIsEnumerable,r=(t,l,a)=>l in t?e(t,l,{enumerable:!0,configurable:!0,writable:!0,value:a}):t[l]=a,o=(e,t)=>{for(var l in t||(t={}))n.call(t,l)&&r(e,l,t[l]);if(a)for(var l of a(t))s.call(t,l)&&r(e,l,t[l]);return e},u=(e,a)=>t(e,l(a));"undefined"!=typeof require&&require;import{f as i,i as c,j as v,k as d,l as p,m as h,n as b,r as m,h as f,o as g,p as k,w as y,q as x,d as w,t as L,s as $,c as C,v as M,x as T,y as O,z as R,A as B,B as P,a as j,F as z,C as E,D,b as _,E as H,G as N,T as S,H as q,I as A,J as F,K as G,L as I,u as W,g as U,M as X,N as Y,O as V,e as J,P as K,Q,R as Z,S as ee,U as te,W as le,X as ae,Y as ne}from"./app.67122b30.js";const se=["href","rel","target","aria-label"],re=i({inheritAttrs:!1});var oe=i(u(o({},re),{props:{item:{type:Object,required:!0}},setup:function(e){const t=e,l=c(),a=T(),{item:n}=v(t),s=d((()=>p(n.value.link))),r=d((()=>h(n.value.link)||b(n.value.link))),o=d((()=>{if(!r.value)return n.value.target?n.value.target:s.value?"_blank":void 0})),u=d((()=>"_blank"===o.value)),i=d((()=>!s.value&&!r.value&&!u.value)),O=d((()=>{if(!r.value)return n.value.rel?n.value.rel:u.value?"noopener noreferrer":void 0})),R=d((()=>n.value.ariaLabel||n.value.text)),B=d((()=>{const e=Object.keys(a.value.locales);return e.length?!e.some((e=>e===n.value.link)):"/"!==n.value.link})),P=d((()=>!!B.value&&l.path.startsWith(n.value.link))),j=d((()=>!!i.value&&(n.value.activeMatch?new RegExp(n.value.activeMatch).test(l.path):P.value)));return(e,t)=>{const l=m("RouterLink"),a=m("OutboundLink");return f(i)?(g(),k(l,$({key:0,class:["nav-link",{"router-link-active":f(j)}],to:f(n).link,"aria-label":f(R)},e.$attrs),{default:y((()=>[x(e.$slots,"before"),w(" "+L(f(n).text)+" ",1),x(e.$slots,"after")])),_:3},16,["class","to","aria-label"])):(g(),C("a",$({key:1,class:"nav-link external",href:f(n).link,rel:f(O),target:f(o),"aria-label":f(R)},e.$attrs),[x(e.$slots,"before"),w(" "+L(f(n).text)+" ",1),f(u)?(g(),k(a,{key:0})):M("",!0),x(e.$slots,"after")],16,se))}}}));const ue=["aria-labelledby"],ie={class:"hero"},ce=["src","alt"],ve={key:1,id:"main-title"},de={key:2,class:"description"},pe={key:3,class:"actions"},he={key:0,class:"features"},be={class:"theme-default-content custom"},me=["innerHTML"],fe=["textContent"];var ge=i({setup(e){const t=O(),l=R(),a=d((()=>t.value.heroImage?B(t.value.heroImage):null)),n=d((()=>null===t.value.heroText?null:t.value.heroText||l.value.title||"Hello")),s=d((()=>t.value.heroAlt||n.value||"hero")),r=d((()=>null===t.value.tagline?null:t.value.tagline||l.value.description||"Welcome to your VuePress site")),o=d((()=>P(t.value.actions)?t.value.actions.map((({text:e,link:t,type:l="primary"})=>({text:e,link:t,type:l}))):[])),u=d((()=>P(t.value.features)?t.value.features:[])),i=d((()=>t.value.footer)),c=d((()=>t.value.footerHtml));return(e,t)=>{const l=m("Content");return g(),C("main",{class:"home","aria-labelledby":f(n)?"main-title":void 0},[j("header",ie,[f(a)?(g(),C("img",{key:0,src:f(a),alt:f(s)},null,8,ce)):M("",!0),f(n)?(g(),C("h1",ve,L(f(n)),1)):M("",!0),f(r)?(g(),C("p",de,L(f(r)),1)):M("",!0),f(o).length?(g(),C("p",pe,[(g(!0),C(z,null,E(f(o),(e=>(g(),k(oe,{key:e.text,class:D(["action-button",[e.type]]),item:e},null,8,["class","item"])))),128))])):M("",!0)]),f(u).length?(g(),C("div",he,[(g(!0),C(z,null,E(f(u),(e=>(g(),C("div",{key:e.title,class:"feature"},[j("h2",null,L(e.title),1),j("p",null,L(e.details),1)])))),128))])):M("",!0),j("div",be,[_(l)]),f(i)?(g(),C(z,{key:1},[f(c)?(g(),C("div",{key:0,class:"footer",innerHTML:f(i)},null,8,me)):(g(),C("div",{key:1,class:"footer",textContent:L(f(i))},null,8,fe))],64)):M("",!0)],8,ue)}}});const ke=e=>!p(e)||/github\.com/.test(e)?"GitHub":/bitbucket\.org/.test(e)?"Bitbucket":/gitlab\.com/.test(e)?"GitLab":/gitee\.com/.test(e)?"Gitee":null,ye={GitHub:":repo/edit/:branch/:path",GitLab:":repo/-/edit/:branch/:path",Gitee:":repo/edit/:branch/:path",Bitbucket:":repo/src/:branch/:path?mode=edit&spa=0&at=:branch&fileviewer=file-view-default"};var xe=i({setup(e){const t=e=>{e.style.height=e.scrollHeight+"px"},l=e=>{e.style.height=""};return(e,a)=>(g(),k(S,{name:"dropdown",onEnter:t,onAfterEnter:l,onBeforeLeave:t},{default:y((()=>[x(e.$slots,"default")])),_:3}))}});const we=["aria-label"],Le={class:"title"},$e=j("span",{class:"arrow down"},null,-1),Ce=["aria-label"],Me={class:"title"},Te={class:"nav-dropdown"},Oe={class:"dropdown-subtitle"},Re={key:1},Be={class:"dropdown-subitem-wrapper"};var Pe=i({props:{item:{type:Object,required:!0}},setup(e){const t=e,{item:l}=v(t),a=d((()=>l.value.ariaLabel||l.value.text)),n=q(!1),s=c();A((()=>s.path),(()=>{n.value=!1}));const r=e=>{const t=0===e.detail;n.value=!!t&&!n.value},o=(e,t)=>t[t.length-1]===e;return(e,t)=>(g(),C("div",{class:D(["dropdown-wrapper",{open:n.value}])},[j("button",{class:"dropdown-title",type:"button","aria-label":f(a),onClick:r},[j("span",Le,L(f(l).text),1),$e],8,we),j("button",{class:"mobile-dropdown-title",type:"button","aria-label":f(a),onClick:t[0]||(t[0]=e=>n.value=!n.value)},[j("span",Me,L(f(l).text),1),j("span",{class:D(["arrow",n.value?"down":"right"])},null,2)],8,Ce),_(xe,null,{default:y((()=>[F(j("ul",Te,[(g(!0),C(z,null,E(f(l).children,((e,t)=>(g(),C("li",{key:e.link||t,class:"dropdown-item"},[e.children?(g(),C(z,{key:0},[j("h4",Oe,[e.link?(g(),k(oe,{key:0,item:e,onFocusout:t=>o(e,f(l).children)&&0===e.children.length&&(n.value=!1)},null,8,["item","onFocusout"])):(g(),C("span",Re,L(e.text),1))]),j("ul",Be,[(g(!0),C(z,null,E(e.children,(t=>(g(),C("li",{key:t.link,class:"dropdown-subitem"},[_(oe,{item:t,onFocusout:a=>o(t,e.children)&&o(e,f(l).children)&&(n.value=!1)},null,8,["item","onFocusout"])])))),128))])],64)):(g(),k(oe,{key:1,item:e,onFocusout:t=>o(e,f(l).children)&&(n.value=!1)},null,8,["item","onFocusout"]))])))),128))],512),[[G,n.value]])])),_:1})],2))}});const je={key:0,class:"navbar-links"};var ze=i({setup(e){const t=e=>X(e)?Y(e):e.children?u(o({},e),{children:e.children.map(t)}):e,l=(()=>{const e=U();return d((()=>(e.value.navbar||[]).map(t)))})(),a=(()=>{const e=I(),t=W(),l=R(),a=U();return d((()=>{var n,s;const r=Object.keys(l.value.locales);if(r.length<2)return[];const o=e.currentRoute.value.path,u=e.currentRoute.value.fullPath;return[{text:null!=(n=a.value.selectLanguageText)?n:"unkown language",ariaLabel:null!=(s=a.value.selectLanguageAriaLabel)?s:"unkown language",children:r.map((n=>{var s,r,i,c,v,d;const p=null!=(r=null==(s=l.value.locales)?void 0:s[n])?r:{},h=null!=(c=null==(i=a.value.locales)?void 0:i[n])?c:{},b=`${p.lang}`,m=null!=(v=h.selectLanguageName)?v:b;let f;if(b===l.value.lang)f=u;else{const l=o.replace(t.value,n);f=e.getRoutes().some((e=>e.path===l))?l:null!=(d=h.home)?d:n}return{text:m,link:f}}))}]}))})(),n=(()=>{const e=U(),t=d((()=>e.value.repo)),l=d((()=>t.value?ke(t.value):null)),a=d((()=>t.value&&!p(t.value)?`https://github.com/${t.value}`:t.value)),n=d((()=>a.value?e.value.repoLabel?e.value.repoLabel:null===l.value?"Source":l.value:null));return d((()=>a.value&&n.value?[{text:n.value,link:a.value}]:[]))})(),s=d((()=>[...l.value,...a.value,...n.value]));return(e,t)=>f(s).length?(g(),C("nav",je,[(g(!0),C(z,null,E(f(s),(e=>(g(),C("div",{key:e.text,class:"navbar-links-item"},[e.children?(g(),k(Pe,{key:0,item:e},null,8,["item"])):(g(),k(oe,{key:1,item:e},null,8,["item"]))])))),128))])):M("",!0)}});const Ee=["title"],De={class:"icon",focusable:"false",viewBox:"0 0 32 32"},_e=[J('',9)],He={class:"icon",focusable:"false",viewBox:"0 0 32 32"},Ne=[j("path",{d:"M13.502 5.414a15.075 15.075 0 0 0 11.594 18.194a11.113 11.113 0 0 1-7.975 3.39c-.138 0-.278.005-.418 0a11.094 11.094 0 0 1-3.2-21.584M14.98 3a1.002 1.002 0 0 0-.175.016a13.096 13.096 0 0 0 1.825 25.981c.164.006.328 0 .49 0a13.072 13.072 0 0 0 10.703-5.555a1.01 1.01 0 0 0-.783-1.565A13.08 13.08 0 0 1 15.89 4.38A1.015 1.015 0 0 0 14.98 3z",fill:"currentColor"},null,-1)];var Se=i({setup(e){const t=U(),l=V(),a=()=>{l.value=!l.value};return(e,n)=>(g(),C("button",{class:"toggle-dark-button",title:f(t).toggleDarkMode,onClick:a},[F((g(),C("svg",De,_e,512)),[[G,!f(l)]]),F((g(),C("svg",He,Ne,512)),[[G,f(l)]])],8,Ee))}});const qe=["title"],Ae=[j("div",{class:"icon","aria-hidden":"true"},[j("span"),j("span"),j("span")],-1)];var Fe=i({emits:["toggle"],setup(e){const t=U();return(e,l)=>(g(),C("div",{class:"toggle-sidebar-button",title:f(t).toggleSidebar,"aria-expanded":"false",role:"button",tabindex:"0",onClick:l[0]||(l[0]=t=>e.$emit("toggle"))},Ae,8,qe))}});const Ge=["src","alt"];var Ie=i({emits:["toggle-sidebar"],setup(e){const t=W(),l=R(),a=U(),n=V(),s=q(null),r=q(null),o=d((()=>a.value.home||t.value)),u=d((()=>n.value&&void 0!==a.value.logoDark?a.value.logoDark:a.value.logo)),i=d((()=>l.value.title)),c=q(0),v=d((()=>c.value?{maxWidth:c.value+"px"}:{})),p=d((()=>a.value.darkMode));function h(e,t){var l,a,n;const s=null==(n=null==(a=null==(l=null==e?void 0:e.ownerDocument)?void 0:l.defaultView)?void 0:a.getComputedStyle(e,null))?void 0:n[t],r=Number.parseInt(s,10);return Number.isNaN(r)?0:r}return K((()=>{const e=h(s.value,"paddingLeft")+h(s.value,"paddingRight"),t=()=>{var t;window.innerWidth<=719?c.value=0:c.value=s.value.offsetWidth-e-((null==(t=r.value)?void 0:t.offsetWidth)||0)};t(),window.addEventListener("resize",t,!1),window.addEventListener("orientationchange",t,!1)})),(e,t)=>{const l=m("RouterLink"),a=m("NavbarSearch");return g(),C("header",{ref:(e,t)=>{t.navbar=e,s.value=e},class:"navbar"},[_(Fe,{onToggle:t[0]||(t[0]=t=>e.$emit("toggle-sidebar"))}),j("span",{ref:(e,t)=>{t.siteBrand=e,r.value=e}},[_(l,{to:f(o)},{default:y((()=>[f(u)?(g(),C("img",{key:0,class:"logo",src:f(B)(f(u)),alt:f(i)},null,8,Ge)):M("",!0),f(i)?(g(),C("span",{key:1,class:D(["site-name",{"can-hide":f(u)}])},L(f(i)),3)):M("",!0)])),_:1},8,["to"])],512),j("div",{class:"navbar-links-wrapper",style:Q(f(v))},[x(e.$slots,"before"),_(ze,{class:"can-hide"}),x(e.$slots,"after"),f(p)?(g(),k(Se,{key:0})):M("",!0),_(a)],4)],512)}}});const We={class:"page-meta"},Ue={key:0,class:"meta-item edit-link"},Xe={key:1,class:"meta-item last-updated"},Ye={class:"meta-item-label"},Ve={class:"meta-item-info"},Je={key:2,class:"meta-item contributors"},Ke={class:"meta-item-label"},Qe={class:"meta-item-info"},Ze=["title"],et=w(", ");var tt=i({setup(e){const t=U(),l=(()=>{const e=U(),t=Z(),l=O();return d((()=>{var a,n;if(!(null==(n=null!=(a=l.value.editLink)?a:e.value.editLink)||n))return null;const{repo:s,docsRepo:r=s,docsBranch:o="main",docsDir:u="",editLinkText:i}=e.value;if(!r)return null;const c=(({docsRepo:e,docsBranch:t,docsDir:l,filePathRelative:a,editLinkPattern:n})=>{const s=ke(e);let r;return n?r=n:null!==s&&(r=ye[s]),r?r.replace(/:repo/,p(e)?e:`https://github.com/${e}`).replace(/:branch/,t).replace(/:path/,H(`${N(l)}/${a}`)):null})({docsRepo:r,docsBranch:o,docsDir:u,filePathRelative:t.value.filePathRelative,editLinkPattern:e.value.editLinkPattern});return c?{text:null!=i?i:"Edit this page",link:c}:null}))})(),a=(()=>{const e=R(),t=U(),l=Z(),a=O();return d((()=>{var n,s,r,o;if(!(null==(s=null!=(n=a.value.lastUpdated)?n:t.value.lastUpdated)||s))return null;if(!(null==(r=l.value.git)?void 0:r.updatedTime))return null;return new Date(null==(o=l.value.git)?void 0:o.updatedTime).toLocaleString(e.value.lang)}))})(),n=(()=>{const e=U(),t=Z(),l=O();return d((()=>{var a,n,s,r;return(null==(n=null!=(a=l.value.contributors)?a:e.value.contributors)||n)&&null!=(r=null==(s=t.value.git)?void 0:s.contributors)?r:null}))})();return(e,s)=>(g(),C("footer",We,[f(l)?(g(),C("div",Ue,[_(oe,{class:"meta-item-label",item:f(l)},null,8,["item"])])):M("",!0),f(a)?(g(),C("div",Xe,[j("span",Ye,L(f(t).lastUpdatedText)+": ",1),j("span",Ve,L(f(a)),1)])):M("",!0),f(n)&&f(n).length?(g(),C("div",Je,[j("span",Ke,L(f(t).contributorsText)+": ",1),j("span",Qe,[(g(!0),C(z,null,E(f(n),((e,t)=>(g(),C(z,{key:t},[j("span",{class:"contributor",title:`email: ${e.email}`},L(e.name),9,Ze),t!==f(n).length-1?(g(),C(z,{key:0},[et],64)):M("",!0)],64)))),128))])])):M("",!0)]))}});const lt={key:0,class:"page-nav"},at={class:"inner"},nt={key:0,class:"prev"},st=w(" ← "),rt={key:1,class:"next"},ot=w(" → ");var ut=i({setup(e){const t=e=>!1===e?null:X(e)?Y(e):!!te(e)&&e,l=(e,t,a)=>{const n=e.findIndex((e=>e.link===t));if(-1!==n){const t=e[n+a];return(null==t?void 0:t.link)?t:null}for(const s of e)if(s.children){const e=l(s.children,t,a);if(e)return e}return null},a=O(),n=ee(),s=c(),r=d((()=>{const e=t(a.value.prev);return!1!==e?e:l(n.value,s.path,-1)})),o=d((()=>{const e=t(a.value.next);return!1!==e?e:l(n.value,s.path,1)}));return(e,t)=>f(r)||f(o)?(g(),C("nav",lt,[j("p",at,[f(r)?(g(),C("span",nt,[st,_(oe,{item:f(r)},null,8,["item"])])):M("",!0),f(o)?(g(),C("span",rt,[_(oe,{item:f(o)},null,8,["item"]),ot])):M("",!0)])])):M("",!0)}});const it={class:"page"},ct={class:"theme-default-content"};var vt=i({setup:e=>(e,t)=>{const l=m("Content");return g(),C("main",it,[x(e.$slots,"top"),j("div",ct,[_(l)]),_(tt),_(ut),x(e.$slots,"bottom")])}});const dt=e=>decodeURI(e).replace(/#.*$/,"").replace(/(index)?\.(md|html)$/,""),pt=(e,t)=>!!((e,t)=>void 0!==t&&(e.hash===t||dt(e.path)===dt(t)))(e,t.link)||!!t.children&&t.children.some((t=>pt(e,t))),ht=(e,t)=>e.link?le(oe,u(o({},t),{item:e})):le("p",t,e.text),bt=(e,t)=>{var l;return(null===(l=e.children)||void 0===l?void 0:l.length)?le("ul",{class:{"sidebar-sub-items":t>0}},e.children.map((e=>le("li",le(mt,{item:e,depth:t+1}))))):null},mt=({item:e,depth:t=0})=>{const l=c(),a=pt(l,e);return[ht(e,{class:{"sidebar-heading":0===t,"sidebar-item":!0,active:a}}),bt(e,t)]};mt.displayName="SidebarChild",mt.props={item:{type:Object,required:!0},depth:{type:Number,required:!1}};const ft={class:"sidebar"},gt={class:"sidebar-links"};var kt=i({setup(e){const t=ee();return(e,l)=>(g(),C("aside",ft,[_(ze),x(e.$slots,"top"),j("ul",gt,[(g(!0),C(z,null,E(f(t),(e=>(g(),k(f(mt),{key:e.link||e.text,item:e},null,8,["item"])))),128))]),x(e.$slots,"bottom")]))}}),yt=i({setup(e){const t=Z(),l=O(),a=U(),n=d((()=>!1!==l.value.navbar&&!1!==a.value.navbar)),s=ee(),r=q(!1),o=e=>{r.value="boolean"==typeof e?e:!r.value},u={x:0,y:0},i=e=>{u.x=e.changedTouches[0].clientX,u.y=e.changedTouches[0].clientY},c=e=>{const t=e.changedTouches[0].clientX-u.x,l=e.changedTouches[0].clientY-u.y;Math.abs(t)>Math.abs(l)&&Math.abs(t)>40&&(t>0&&u.x<=80?o(!0):o(!1))},v=d((()=>[{"no-navbar":!n.value,"no-sidebar":!s.value.length,"sidebar-open":r.value},l.value.pageClass]));let p;K((()=>{const e=I();p=e.afterEach((()=>{o(!1)}))})),ae((()=>{p()}));const h=ne(),b=h.resolve,m=h.pending;return(e,a)=>(g(),C("div",{class:D(["theme-container",f(v)]),onTouchstart:i,onTouchend:c},[x(e.$slots,"navbar",{},(()=>[f(n)?(g(),k(Ie,{key:0,onToggleSidebar:o},{before:y((()=>[x(e.$slots,"navbar-before")])),after:y((()=>[x(e.$slots,"navbar-after")])),_:3})):M("",!0)])),j("div",{class:"sidebar-mask",onClick:a[0]||(a[0]=e=>o(!1))}),x(e.$slots,"sidebar",{},(()=>[_(kt,null,{top:y((()=>[x(e.$slots,"sidebar-top")])),bottom:y((()=>[x(e.$slots,"sidebar-bottom")])),_:3})])),x(e.$slots,"page",{},(()=>[f(l).home?(g(),k(ge,{key:0})):(g(),k(S,{key:1,name:"fade-slide-y",mode:"out-in",onBeforeEnter:f(b),onBeforeLeave:f(m)},{default:y((()=>[_(vt,{key:f(t).path},{top:y((()=>[x(e.$slots,"page-top")])),bottom:y((()=>[x(e.$slots,"page-bottom")])),_:3})])),_:3},8,["onBeforeEnter","onBeforeLeave"]))]))],34))}});export{yt as default};
2 |
--------------------------------------------------------------------------------
/docs/.vuepress/dist/assets/back-to-top.8efcbe56.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/docs/.vuepress/dist/assets/element-icons.9c88a535.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leitingting08/sum-ui/2830dd3be4f3096eac054f72d472ea1ffdcf1802/docs/.vuepress/dist/assets/element-icons.9c88a535.woff
--------------------------------------------------------------------------------
/docs/.vuepress/dist/assets/element-icons.de5eb258.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leitingting08/sum-ui/2830dd3be4f3096eac054f72d472ea1ffdcf1802/docs/.vuepress/dist/assets/element-icons.de5eb258.ttf
--------------------------------------------------------------------------------
/docs/.vuepress/dist/assets/iconfont.5b2375f1.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
6 |
33 |
--------------------------------------------------------------------------------
/docs/.vuepress/dist/assets/index.html.1089cbd5.js:
--------------------------------------------------------------------------------
1 | import{r as l,o as e,c as t,a,b as s,F as r,d as u}from"./app.67122b30.js";const n={},m=a("h2",{id:"组件看板",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#组件看板","aria-hidden":"true"},"#"),u(" 组件看板")],-1),o=a("thead",null,[a("tr",null,[a("th",null,"组件"),a("th",null,"下载量"),a("th",null,"版本")])],-1),p=a("td",null,"@sum-ui/layout",-1),i={href:"https://www.npmjs.com/package/@sum-ui/layout",target:"_blank",rel:"noopener noreferrer"},g=a("img",{src:"https://img.shields.io/npm/dw/@sum-ui/layout.svg",alt:"layout"},null,-1),d={href:"https://www.npmjs.com/package/@sum-ui/layout",target:"_blank",rel:"noopener noreferrer"},h=a("img",{src:"https://img.shields.io/npm/v/@sum-ui/layout.svg?style=flat-square?style=flat-square",alt:"npm package"},null,-1),c=a("td",null,"@sum-ui/table",-1),f={href:"https://www.npmjs.com/package/@sum-ui/table",target:"_blank",rel:"noopener noreferrer"},w=a("img",{src:"https://img.shields.io/npm/dw/@sum-ui/table.svg",alt:"table"},null,-1),k={href:"https://www.npmjs.com/package/@sum-ui/table",target:"_blank",rel:"noopener noreferrer"},b=a("img",{src:"https://img.shields.io/npm/v/@sum-ui/table.svg?style=flat-square?style=flat-square",alt:"npm package"},null,-1),y=a("td",null,"@sum-ui/upload",-1),v={href:"https://www.npmjs.com/package/@sum-ui/upload",target:"_blank",rel:"noopener noreferrer"},j=a("img",{src:"https://img.shields.io/npm/dw/@sum-ui/upload.svg",alt:"upload"},null,-1),q={href:"https://www.npmjs.com/package/@sum-ui/upload",target:"_blank",rel:"noopener noreferrer"},_=a("img",{src:"https://img.shields.io/npm/v/@sum-ui/upload.svg?style=flat-square?style=flat-square",alt:"npm package"},null,-1),x=a("td",null,"@sum-ui/form",-1),F={href:"https://www.npmjs.com/package/@sum-ui/form",target:"_blank",rel:"noopener noreferrer"},L=a("img",{src:"https://img.shields.io/npm/dw/@sum-ui/form.svg",alt:"form"},null,-1),O={href:"https://www.npmjs.com/package/@sum-ui/form",target:"_blank",rel:"noopener noreferrer"},z=a("img",{src:"https://img.shields.io/npm/v/@sum-ui/layout.svg?style=flat-square?style=flat-square",alt:"npm package"},null,-1);n.render=function(u,n){const A=l("OutboundLink");return e(),t(r,null,[m,a("table",null,[o,a("tbody",null,[a("tr",null,[p,a("td",null,[a("a",i,[g,s(A)])]),a("td",null,[a("a",d,[h,s(A)])])]),a("tr",null,[c,a("td",null,[a("a",f,[w,s(A)])]),a("td",null,[a("a",k,[b,s(A)])])]),a("tr",null,[y,a("td",null,[a("a",v,[j,s(A)])]),a("td",null,[a("a",q,[_,s(A)])])]),a("tr",null,[x,a("td",null,[a("a",F,[L,s(A)])]),a("td",null,[a("a",O,[z,s(A)])])])])])],64)};export{n as default};
2 |
--------------------------------------------------------------------------------
/docs/.vuepress/dist/assets/index.html.ae40c818.js:
--------------------------------------------------------------------------------
1 | const e={key:"v-8daa1a0e",path:"/",title:"",lang:"en-US",frontmatter:{home:!0,actions:[{text:"Get Started",link:"/guide/install.html",type:"primary"},{text:"Components",link:"/components/layout.html",type:"secondary"}],features:[{title:"💡 Instant Server Start",details:"On demand file serving over native ESM, no bundling required!"},{title:"⚡️ Lightning Fast HMR",details:"Hot Module Replacement (HMR) that stays fast regardless of app size."},{title:"🛠️ Rich Features",details:"Out-of-the-box support for TypeScript, JSX, CSS and more."},{title:"📦 Optimized Build",details:"Pre-configured Rollup build with multi-page and library mode support."},{title:"🔩 Universal Plugins",details:"Rollup-superset plugin interface shared between dev and build."},{title:"🔑 Fully Typed APIs",details:"Flexible programmatic APIs with full TypeScript typing."}],footer:"MIT Licensed | Copyright © 2021-present Summer"},excerpt:"",headers:[{level:2,title:"组件看板",slug:"组件看板",children:[]}],filePathRelative:"index.md",git:{updatedTime:1630573967e3,contributors:[{name:"ltt",email:"leitingting08@gmail.com",commits:2}]}};export{e as data};
2 |
--------------------------------------------------------------------------------
/docs/.vuepress/dist/assets/install.html.6986468a.js:
--------------------------------------------------------------------------------
1 | const e={key:"v-e45cc9ec",path:"/guide/install.html",title:"安装",lang:"en-US",frontmatter:{title:"安装"},excerpt:"",headers:[{level:2,title:"sum-ui 简介",slug:"sum-ui-简介",children:[]},{level:2,title:"@sum-ui/layout",slug:"sum-ui-layout",children:[]},{level:2,title:"@sum-ui/table",slug:"sum-ui-table",children:[]}],filePathRelative:"guide/install.md",git:{updatedTime:1630573967e3,contributors:[{name:"ltt",email:"leitingting08@gmail.com",commits:2}]}};export{e as data};
2 |
--------------------------------------------------------------------------------
/docs/.vuepress/dist/assets/install.html.e44d4a3a.js:
--------------------------------------------------------------------------------
1 | import{e as s}from"./app.67122b30.js";const a={},n=s(' sum-ui 简介
sum-ui 是基于 Vue3 + ElementPlus 二次开发的组合组件库集合,包含通用场景,如 layout 布局,table 表格等等
@sum-ui/layout
npm i @sum-ui/layout\n# or\nyarn add @sum-ui/layout\n
1
2
3
@sum-ui/table
npm i @sum-ui/table\n# or\nyarn add @sum-ui/table\n
1
2
3
',6);a.render=function(s,a){return n};export{a as default};
2 |
--------------------------------------------------------------------------------
/docs/.vuepress/dist/assets/layout.html.1dce1f5f.js:
--------------------------------------------------------------------------------
1 | var s=Object.defineProperty,t=Object.getOwnPropertySymbols,l=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable,e=(t,l,n)=>l in t?s(t,l,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[l]=n,o=(s,o)=>{for(var a in o||(o={}))l.call(o,a)&&e(s,a,o[a]);if(t)for(var a of t(o))n.call(o,a)&&e(s,a,o[a]);return s};"undefined"!=typeof require&&require;import{V as a,r,o as c,c as p,b as y,w as i,F as d,a as L,d as M,e as E}from"./app.67122b30.js";var u={name:"component-doc",components:{"render-demo-0":function(){const{createElementVNode:s,resolveComponent:t,withCtx:l,openBlock:n,createBlock:e}=a,r=s("div",{class:"title"},[s("img",{style:{height:"50px","margin-right":"10px"},src:"data:image/svg+xml;base64,PHN2ZyBpZD0i5Zu+5bGCXzEiIGRhdGEtbmFtZT0i5Zu+5bGCIDEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgdmlld0JveD0iMCAwIDQ0IDQ0Ij48ZGVmcz48c3R5bGU+LmNscy0xe2ZpbGw6IzQwOWVmZjtmaWxsLXJ1bGU6ZXZlbm9kZDt9PC9zdHlsZT48L2RlZnM+PHRpdGxlPmVsZW1lbnQgcGx1cy1sb2dvLXNtYWxsIOWJr+acrDwvdGl0bGU+PHBhdGggaWQ9ImVsZW1lbnRfcGx1cy1sb2dvLXNtYWxsIiBkYXRhLW5hbWU9ImVsZW1lbnQgcGx1cy1sb2dvLXNtYWxsIiBjbGFzcz0iY2xzLTEiIGQ9Ik0zNy40MSwzMi4zN2MwLDEuNTctLjgzLDEuOTMtLjgzLDEuOTNMMjEuNTEsNDNBMS42OSwxLjY5LDAsMCwxLDIwLDQzUzUuMiwzNC40LDQuNjYsMzRhMS4yOSwxLjI5LDAsMCwxLS41NS0xVjE1LjI0YzAtLjc4LDEtMS4zMywxLTEuMzNMMTkuODYsNS4zNmEyLDIsMCwwLDEsMS43OSwwbDE0LjQ2LDguNDFhMi4wNiwyLjA2LDAsMCwxLDEuMjUsMi4wNlYzMi4zN1ptLTUuOS0xN0wyMS4zNSw5LjVhMS41OSwxLjU5LDAsMCwwLTEuNDEsMEw4LjMzLDE2LjE1cy0uNzcuNDYtLjc2LDEuMDgsMCwxMy45MiwwLDEzLjkyQTEsMSwwLDAsMCw4LDMxLjljLjQzLjMsMTIsNywxMiw3YTEuMzEsMS4zMSwwLDAsMCwxLjE5LDBDMjEuOTEsMzguNSwzMywzMi4xMSwzMywzMi4xMXMuNjUtLjI4LjY1LTEuNTFWMjcuMTNsLTEzLDcuOVYzMmEzLjA1LDMuMDUsMCwwLDEsMS0yLjA3TDMzLjIsMjNhMi40NCwyLjQ0LDAsMCwwLC41NS0xLjQ2VjE4LjQzTDIwLjY0LDI2LjM1di0zLjJhMi4yMiwyLjIyLDAsMCwxLC44My0xLjc5Wk00MS4wNyw0LjIyYS4zOS4zOSwwLDAsMC0uMzctLjQySDM4VjEuMDZjMC0uMTYtLjI2LS4yMi0uNTMtLjIyTDM2LDEuMDhjLS4xOCwwLS4zMS4xMi0uMzEuMjNWMy44SDMzYS40LjQsMCwwLDAtLjM2LjM3djJoM1Y5YzAsLjE2LjI2LjI3LjU0LjIzbDEuNTEtLjI1Yy4xOCwwLC4yOS0uMTMuMjktLjIzVjYuMTRoM1oiLz48L3N2Zz4="}),s("div",null,"测试标题")],-1),c=s("div",null,"admin",-1),p=s("div",null,"container",-1);const{defineComponent:y,reactive:i,toRefs:d}=a,L=y({setup(){const s=i({headerTitle:{slot:"title"},headerRight:{slot:"right"},menuData:[{title:"菜单列表",icon:"el-icon-s-goods",auth:"menu",path:"/menu",children:[{title:"数据",auth:"menu/data"},{title:"分析",auth:"menu/analysis"}]}],headerStyles:{backgroundColor:"#545c64",padding:"10px",color:"#fff"},menuProps:{backgroundColor:"#f7f6f2",textColor:"#333",activeTextColor:"#409eff",defaultActive:"0-0",defaultOpeneds:[0]},triggerCollapse:!0,footer:"@copyRight by footer"});return o({settings:s},d(s))}});return o({render:function(s,o){const a=t("sum-layout");return n(),e(a,{settings:s.settings,class:"sum-layout"},{title:l((()=>[r])),right:l((()=>[c])),default:l((()=>[p])),_:1},8,["settings"])}},L)}()}};const j=L("h3",{id:"sum-ui-layout",tabindex:"-1"},[L("a",{class:"header-anchor",href:"#sum-ui-layout","aria-hidden":"true"},"#"),M(" @sum-ui/layout")],-1),D=L("div",{class:"language-vue"},[L("pre",{class:"shiki",style:{"background-color":"#ffffff"}},[L("code",null,[L("span",{class:"line"},[L("span",{style:{color:"#24292E"}},"<"),L("span",{style:{color:"#22863A"}},"template"),L("span",{style:{color:"#24292E"}},">")]),M("\n"),L("span",{class:"line"},[L("span",{style:{color:"#24292E"}}," <"),L("span",{style:{color:"#22863A"}},"sum-layout"),L("span",{style:{color:"#24292E"}}," :"),L("span",{style:{color:"#005CC5"}},"settings"),L("span",{style:{color:"#24292E"}},"="),L("span",{style:{color:"#032F62"}},'"'),L("span",{style:{color:"#24292E"}},"settings"),L("span",{style:{color:"#032F62"}},'"'),L("span",{style:{color:"#24292E"}}," "),L("span",{style:{color:"#005CC5"}},"class"),L("span",{style:{color:"#24292E"}},"="),L("span",{style:{color:"#032F62"}},'"sum-layout"'),L("span",{style:{color:"#24292E"}},">")]),M("\n"),L("span",{class:"line"},[L("span",{style:{color:"#24292E"}}," <"),L("span",{style:{color:"#22863A"}},"template"),L("span",{style:{color:"#24292E"}}," #"),L("span",{style:{color:"#005CC5"}},"title"),L("span",{style:{color:"#24292E"}},">")]),M("\n"),L("span",{class:"line"},[L("span",{style:{color:"#24292E"}}," <"),L("span",{style:{color:"#22863A"}},"div"),L("span",{style:{color:"#24292E"}}," "),L("span",{style:{color:"#005CC5"}},"class"),L("span",{style:{color:"#24292E"}},"="),L("span",{style:{color:"#032F62"}},'"title"'),L("span",{style:{color:"#24292E"}},">")]),M("\n"),L("span",{class:"line"},[L("span",{style:{color:"#24292E"}}," <"),L("span",{style:{color:"#22863A"}},"img"),L("span",{style:{color:"#24292E"}}," "),L("span",{style:{color:"#005CC5"}},"style"),L("span",{style:{color:"#24292E"}},"="),L("span",{style:{color:"#032F62"}},'"height: 50px;margin-right: 10px;"'),L("span",{style:{color:"#24292E"}}," "),L("span",{style:{color:"#005CC5"}},"src"),L("span",{style:{color:"#24292E"}},"="),L("span",{style:{color:"#032F62"}},'"data:image/svg+xml;base64,PHN2ZyBpZD0i5Zu+5bGCXzEiIGRhdGEtbmFtZT0i5Zu+5bGCIDEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgdmlld0JveD0iMCAwIDQ0IDQ0Ij48ZGVmcz48c3R5bGU+LmNscy0xe2ZpbGw6IzQwOWVmZjtmaWxsLXJ1bGU6ZXZlbm9kZDt9PC9zdHlsZT48L2RlZnM+PHRpdGxlPmVsZW1lbnQgcGx1cy1sb2dvLXNtYWxsIOWJr+acrDwvdGl0bGU+PHBhdGggaWQ9ImVsZW1lbnRfcGx1cy1sb2dvLXNtYWxsIiBkYXRhLW5hbWU9ImVsZW1lbnQgcGx1cy1sb2dvLXNtYWxsIiBjbGFzcz0iY2xzLTEiIGQ9Ik0zNy40MSwzMi4zN2MwLDEuNTctLjgzLDEuOTMtLjgzLDEuOTNMMjEuNTEsNDNBMS42OSwxLjY5LDAsMCwxLDIwLDQzUzUuMiwzNC40LDQuNjYsMzRhMS4yOSwxLjI5LDAsMCwxLS41NS0xVjE1LjI0YzAtLjc4LDEtMS4zMywxLTEuMzNMMTkuODYsNS4zNmEyLDIsMCwwLDEsMS43OSwwbDE0LjQ2LDguNDFhMi4wNiwyLjA2LDAsMCwxLDEuMjUsMi4wNlYzMi4zN1ptLTUuOS0xN0wyMS4zNSw5LjVhMS41OSwxLjU5LDAsMCwwLTEuNDEsMEw4LjMzLDE2LjE1cy0uNzcuNDYtLjc2LDEuMDgsMCwxMy45MiwwLDEzLjkyQTEsMSwwLDAsMCw4LDMxLjljLjQzLjMsMTIsNywxMiw3YTEuMzEsMS4zMSwwLDAsMCwxLjE5LDBDMjEuOTEsMzguNSwzMywzMi4xMSwzMywzMi4xMXMuNjUtLjI4LjY1LTEuNTFWMjcuMTNsLTEzLDcuOVYzMmEzLjA1LDMuMDUsMCwwLDEsMS0yLjA3TDMzLjIsMjNhMi40NCwyLjQ0LDAsMCwwLC41NS0xLjQ2VjE4LjQzTDIwLjY0LDI2LjM1di0zLjJhMi4yMiwyLjIyLDAsMCwxLC44My0xLjc5Wk00MS4wNyw0LjIyYS4zOS4zOSwwLDAsMC0uMzctLjQySDM4VjEuMDZjMC0uMTYtLjI2LS4yMi0uNTMtLjIyTDM2LDEuMDhjLS4xOCwwLS4zMS4xMi0uMzEuMjNWMy44SDMzYS40LjQsMCwwLDAtLjM2LjM3djJoM1Y5YzAsLjE2LjI2LjI3LjU0LjIzbDEuNTEtLjI1Yy4xOCwwLC4yOS0uMTMuMjktLjIzVjYuMTRoM1oiLz48L3N2Zz4="'),L("span",{style:{color:"#24292E"}},">")]),M("\n"),L("span",{class:"line"},[L("span",{style:{color:"#24292E"}}," <"),L("span",{style:{color:"#22863A"}},"div"),L("span",{style:{color:"#24292E"}},">测试标题"),L("span",{style:{color:"#22863A"}},"div"),L("span",{style:{color:"#24292E"}},">")]),M("\n"),L("span",{class:"line"},[L("span",{style:{color:"#24292E"}}," "),L("span",{style:{color:"#22863A"}},"div"),L("span",{style:{color:"#24292E"}},">")]),M("\n"),L("span",{class:"line"},[L("span",{style:{color:"#24292E"}}," "),L("span",{style:{color:"#22863A"}},"template"),L("span",{style:{color:"#24292E"}},">")]),M("\n"),L("span",{class:"line"},[L("span",{style:{color:"#24292E"}}," <"),L("span",{style:{color:"#22863A"}},"template"),L("span",{style:{color:"#24292E"}}," #"),L("span",{style:{color:"#005CC5"}},"right"),L("span",{style:{color:"#24292E"}},">")]),M("\n"),L("span",{class:"line"},[L("span",{style:{color:"#24292E"}}," <"),L("span",{style:{color:"#22863A"}},"div"),L("span",{style:{color:"#24292E"}},">admin"),L("span",{style:{color:"#22863A"}},"div"),L("span",{style:{color:"#24292E"}},">")]),M("\n"),L("span",{class:"line"},[L("span",{style:{color:"#24292E"}}," "),L("span",{style:{color:"#22863A"}},"template"),L("span",{style:{color:"#24292E"}},">")]),M("\n"),L("span",{class:"line"},[L("span",{style:{color:"#24292E"}}," <"),L("span",{style:{color:"#22863A"}},"template"),L("span",{style:{color:"#24292E"}}," #"),L("span",{style:{color:"#005CC5"}},"default"),L("span",{style:{color:"#24292E"}},">")]),M("\n"),L("span",{class:"line"},[L("span",{style:{color:"#24292E"}}," <"),L("span",{style:{color:"#22863A"}},"div"),L("span",{style:{color:"#24292E"}},">container"),L("span",{style:{color:"#22863A"}},"div"),L("span",{style:{color:"#24292E"}},">")]),M("\n"),L("span",{class:"line"},[L("span",{style:{color:"#24292E"}}," "),L("span",{style:{color:"#22863A"}},"template"),L("span",{style:{color:"#24292E"}},">")]),M("\n"),L("span",{class:"line"},[L("span",{style:{color:"#24292E"}}," "),L("span",{style:{color:"#22863A"}},"sum-layout"),L("span",{style:{color:"#24292E"}},">")]),M("\n"),L("span",{class:"line"},[L("span",{style:{color:"#24292E"}},""),L("span",{style:{color:"#22863A"}},"template"),L("span",{style:{color:"#24292E"}},">")]),M("\n"),L("span",{class:"line"}),M("\n"),L("span",{class:"line"},[L("span",{style:{color:"#24292E"}},"<"),L("span",{style:{color:"#22863A"}},"script"),L("span",{style:{color:"#24292E"}}," "),L("span",{style:{color:"#005CC5"}},"lang"),L("span",{style:{color:"#24292E"}},"="),L("span",{style:{color:"#032F62"}},'"ts"'),L("span",{style:{color:"#24292E"}},">")]),M("\n"),L("span",{class:"line"},[L("span",{style:{color:"#D73A49"}},"import"),L("span",{style:{color:"#24292E"}}," { defineComponent, reactive, toRefs } "),L("span",{style:{color:"#D73A49"}},"from"),L("span",{style:{color:"#24292E"}}," "),L("span",{style:{color:"#032F62"}},"'vue'")]),M("\n"),L("span",{class:"line"}),M("\n"),L("span",{class:"line"},[L("span",{style:{color:"#D73A49"}},"export"),L("span",{style:{color:"#E36209"}}," "),L("span",{style:{color:"#D73A49"}},"default"),L("span",{style:{color:"#E36209"}}," "),L("span",{style:{color:"#6F42C1"}},"defineComponent"),L("span",{style:{color:"#E36209"}},"({")]),M("\n"),L("span",{class:"line"},[L("span",{style:{color:"#E36209"}}," "),L("span",{style:{color:"#6F42C1"}},"setup"),L("span",{style:{color:"#E36209"}},"() "),L("span",{style:{color:"#24292E"}},"{")]),M("\n"),L("span",{class:"line"},[L("span",{style:{color:"#24292E"}}," "),L("span",{style:{color:"#D73A49"}},"const"),L("span",{style:{color:"#24292E"}}," "),L("span",{style:{color:"#005CC5"}},"settings"),L("span",{style:{color:"#24292E"}}," "),L("span",{style:{color:"#D73A49"}},"="),L("span",{style:{color:"#24292E"}}," "),L("span",{style:{color:"#6F42C1"}},"reactive"),L("span",{style:{color:"#24292E"}},"({")]),M("\n"),L("span",{class:"line"},[L("span",{style:{color:"#24292E"}}," "),L("span",{style:{color:"#6A737D"}},'// 可以用slot插槽或者render渲染函数两种方式,当使用render的时候需要改成 Layout | sum-ui
16 |
17 |
18 |
19 |
20 | @sum-ui/layout

测试标题
admin
SumLayout Attributes
参数 | 说明 | 类型 | 可选值 | 默认值 |
---|
settings | 布局参数 | object | — | {} |
Settings Attributes
参数 | 说明 | 类型 | 可选值 | 默认值 |
---|
headerTitle | 头栏左边内容 | string/object/function(如果有rener函数则展示render函数内容,如果是object,{slot: 'title'}则可以使用插槽,否则展示字符串) | — | {} |
headerRight | 头栏右边内容 | string/object/function(如果有rener函数则展示render函数内容,如果是object,{slot: 'title'}则可以使用插槽,否则展示字符串) | — | {} |
headerStyles | 头栏样式 | object | — | {} |
menuProps | 侧栏属性传递(继承 el-menu 属性) | object | — | {} |
triggerCollapse | 是否显示 collapse 图标 | boolean | — | false |
menuData | 菜单数据 | array | — | [] |
footer | 底部footer | string/object/function(如果有rener函数则展示render函数内容,如果是object,{slot: 'title'}则可以使用插槽,否则展示字符串) | — | {} |
参数 | 说明 | 类型 | 可选值 | 默认值 |
---|
mode | 模式 | string | horizontal / vertical | vertical |
collapse | 是否水平折叠收起菜单(仅在 mode 为 vertical 时可用) | boolean | — | false |
background-color | 菜单的背景色(仅支持 hex 格式) | string | — | #ffffff |
text-color | 菜单的文字颜色(仅支持 hex 格式) | string | — | #303133 |
active-text-color | 当前激活菜单的文字颜色(仅支持 hex 格式) | string | — | #409EFF |
default-active | 当前激活菜单的 index | string | — | — |
default-openeds | 当前打开的 sub-menu 的 index 的数组 | Array | — | — |
unique-opened | 是否只保持一个子菜单的展开 | boolean | — | false |
menu-trigger | 子菜单打开的触发方式(只在 mode 为 horizontal 时有效) | string | hover / click | hover |
router | 是否使用 vue-router 的模式,启用该模式会在激活导航时以 index 作为 path 进行路由跳转 | boolean | — | false |
collapse-transition | 是否开启折叠动画 | boolean | — | true |
115 |
116 |
117 |