45 | */
46 | enabled?: boolean;
47 | }
48 | interface FormProps {
49 | formInline: FormItemProps;
50 | }
51 |
52 | export type { FormItemProps, FormProps };
53 |
--------------------------------------------------------------------------------
/src/views/login/utils/motion.ts:
--------------------------------------------------------------------------------
1 | import { h, defineComponent, withDirectives, resolveDirective } from "vue";
2 |
3 | /** 封装@vueuse/motion动画库中的自定义指令v-motion */
4 | export default defineComponent({
5 | name: "Motion",
6 | props: {
7 | delay: {
8 | type: Number,
9 | default: 50
10 | }
11 | },
12 | render() {
13 | const { delay } = this;
14 | const motion = resolveDirective("motion");
15 | return withDirectives(
16 | h(
17 | "div",
18 | {},
19 | {
20 | default: () => [this.$slots.default()]
21 | }
22 | ),
23 | [
24 | [
25 | motion,
26 | {
27 | initial: { opacity: 0, y: 100 },
28 | enter: {
29 | opacity: 1,
30 | y: 0,
31 | transition: {
32 | delay
33 | }
34 | }
35 | }
36 | ]
37 | ]
38 | );
39 | }
40 | });
41 |
--------------------------------------------------------------------------------
/.vscode/settings.json:
--------------------------------------------------------------------------------
1 | {
2 | "editor.formatOnType": true,
3 | "editor.formatOnSave": true,
4 | "[vue]": {
5 | "editor.defaultFormatter": "esbenp.prettier-vscode"
6 | },
7 | "editor.tabSize": 2,
8 | "editor.formatOnPaste": true,
9 | "editor.guides.bracketPairs": "active",
10 | "files.autoSave": "afterDelay",
11 | "git.confirmSync": false,
12 | "workbench.startupEditor": "newUntitledFile",
13 | "editor.suggestSelection": "first",
14 | "editor.acceptSuggestionOnCommitCharacter": false,
15 | "css.lint.propertyIgnoredDueToDisplay": "ignore",
16 | "editor.quickSuggestions": {
17 | "other": true,
18 | "comments": true,
19 | "strings": true
20 | },
21 | "files.associations": {
22 | "editor.snippetSuggestions": "top"
23 | },
24 | "[css]": {
25 | "editor.defaultFormatter": "esbenp.prettier-vscode"
26 | },
27 | "editor.codeActionsOnSave": {
28 | "source.fixAll.eslint": "explicit"
29 | },
30 | "iconify.excludes": ["el"]
31 | }
32 |
--------------------------------------------------------------------------------
/src/api/basic/org.ts:
--------------------------------------------------------------------------------
1 | import * as http from "../base";
2 |
3 | /**
4 | * 机构树
5 | *
6 | * @param query
7 | * @returns
8 | */
9 | export function treeOrg(query?: any) {
10 | return http.get ;
42 | get ;
47 | }
48 |
--------------------------------------------------------------------------------
/mock/login.ts:
--------------------------------------------------------------------------------
1 | // 根据角色动态生成路由
2 | import { defineFakeRoute } from "vite-plugin-fake-server/client";
3 |
4 | export default defineFakeRoute([
5 | {
6 | url: "/login",
7 | method: "post",
8 | response: ({ body }) => {
9 | if (body.username === "admin") {
10 | return {
11 | success: true,
12 | data: {
13 | avatar: "https://avatars.githubusercontent.com/u/44761321",
14 | username: "admin",
15 | nickname: "小铭",
16 | // 一个用户可能有多个角色
17 | roles: ["admin"],
18 | accessToken: "eyJhbGciOiJIUzUxMiJ9.admin",
19 | refreshToken: "eyJhbGciOiJIUzUxMiJ9.adminRefresh",
20 | expires: "2030/10/30 00:00:00"
21 | }
22 | };
23 | } else {
24 | return {
25 | success: true,
26 | data: {
27 | avatar: "https://avatars.githubusercontent.com/u/52823142",
28 | username: "common",
29 | nickname: "小林",
30 | roles: ["common"],
31 | accessToken: "eyJhbGciOiJIUzUxMiJ9.common",
32 | refreshToken: "eyJhbGciOiJIUzUxMiJ9.commonRefresh",
33 | expires: "2030/10/30 00:00:00"
34 | }
35 | };
36 | }
37 | }
38 | }
39 | ]);
40 |
--------------------------------------------------------------------------------
/src/api/basic/user.ts:
--------------------------------------------------------------------------------
1 | import * as http from "../base";
2 |
3 | /**
4 | * 分页查询
5 | *
6 | * @param query
7 | * @returns
8 | */
9 | export function pageUser(query?: any) {
10 | return http.get
31 | 403
32 |
48 | 抱歉,你无权访问该页面
49 |
31 | 404
32 |
48 | 抱歉,你访问的页面不存在
49 |
31 | 500
32 |
48 | 抱歉,服务器出错了
49 |
53 | 温馨提示:右键上方裁剪区可开启功能菜单
54 |
66 | 图像大小:{{ parseInt(infos.width) }} ×
67 | {{ parseInt(infos.height) }}像素
68 |
70 | 文件大小:{{ formatBytes(infos.size) }}({{ infos.size }} 字节)
71 | 加载中....(query?: Q) {
8 | return http.get
("/sys/permission", query);
9 | }
10 | /**
11 | * 树形菜单结构
12 | *
13 | * @param filterBtn 是否过滤按钮类型
14 | * @returns
15 | */
16 | export function listTree(filterButton = true) {
17 | return http.get
vue-pure-admin Lite Edition(no i18n version)
2 |
3 | [](LICENSE)
4 |
5 | **English** | [中文](./README.md)
6 |
7 | ## Introduce
8 |
9 | The simplified version is based on the shelf extracted from [vue-pure-admin](https://github.com/pure-admin/vue-pure-admin), which contains main functions and is more suitable for actual project development. The packaged size is introduced globally [element-plus](https://element-plus.org) is still below `2.3MB`, and the full version of the code will be permanently synchronized. After enabling `brotli` compression and `cdn` to replace the local library mode, the package size is less than `350kb`
10 |
11 | ## Supporting video
12 |
13 | [Click me to view UI design](https://www.bilibili.com/video/BV17g411T7rq)
14 | [Click me to view the rapid development tutorial](https://www.bilibili.com/video/BV1kg411v7QT)
15 |
16 | ## Nanny-level documents
17 |
18 | [Click me to view vue-pure-admin documentation](https://pure-admin.github.io/pure-admin-doc)
19 | [Click me to view @pureadmin/utils documentation](https://pure-admin-utils.netlify.app)
20 |
21 | ## Quality service, software outsourcing, sponsorship support
22 |
23 | [Click me to view details](https://pure-admin.github.io/pure-admin-doc/pages/service/)
24 |
25 | ## Preview
26 |
27 | [Click me to view the preview station](https://pure-admin-thin.netlify.app/#/login)
28 |
29 | ## Maintainer
30 |
31 | [xiaoxian521](https://github.com/xiaoxian521)
32 |
33 | ## ⚠️ Attention
34 |
35 | The Lite version does not accept any issues and prs. If you have any questions, please go to the full version [issues](https://github.com/pure-admin/vue-pure-admin/issues/new/choose) to mention, thank you!
36 |
37 | ## License
38 |
39 | [MIT © 2020-present, pure-admin](./LICENSE)
40 |
--------------------------------------------------------------------------------
/src/layout/components/lay-sidebar/components/SidebarCenterCollapse.vue:
--------------------------------------------------------------------------------
1 |
33 |
34 |
35 | (url: string, params?: Q): Promise
(
64 | url: string,
65 | params?: Q,
66 | data?: E
67 | ): Promise
(
78 | url: string,
79 | params?: Q,
80 | data?: E
81 | ): Promise
(
93 | url: string,
94 | data: E,
95 | params?: Q
96 | ): Promise