├── .env.development ├── .env.production ├── .eslintignore ├── .eslintrc.js ├── .gitignore ├── .husky └── pre-commit ├── .prettierrc.js ├── .vscode ├── extensions.json └── settings.json ├── LICENSE ├── README.md ├── auto-imports.d.ts ├── components.d.ts ├── docker ├── Dockerfile ├── docker-compose.yaml └── xhuicloud-ui.conf ├── index.html ├── package.json ├── public ├── favicon.ico └── tinymce │ ├── langs │ ├── en.js │ └── zh-Hans.js │ └── skins │ ├── content │ └── default │ │ └── content.min.css │ └── ui │ ├── oxide-dark │ ├── content.inline.min.css │ ├── content.min.css │ ├── content.mobile.min.css │ ├── fonts │ │ └── tinymce-mobile.woff │ ├── skin.min.css │ ├── skin.mobile.min.css │ └── skin.shadowdom.min.css │ └── oxide │ ├── content.inline.min.css │ ├── content.min.css │ ├── content.mobile.min.css │ ├── fonts │ └── tinymce-mobile.woff │ ├── skin.min.css │ ├── skin.mobile.min.css │ └── skin.shadowdom.min.css ├── src ├── App.vue ├── api │ ├── base │ │ ├── baseEntity.ts │ │ └── index.d.ts │ ├── chatroom │ │ ├── conversation.ts │ │ ├── entity │ │ │ └── chat.d.ts │ │ └── index.ts │ ├── generator │ │ ├── db.ts │ │ └── entity │ │ │ └── ds.d.ts │ ├── logs │ │ ├── entity │ │ │ └── log.d.ts │ │ ├── log-login.ts │ │ └── record.ts │ ├── upms │ │ ├── auth.ts │ │ ├── client.ts │ │ ├── dept.ts │ │ ├── dict.ts │ │ ├── dictData.ts │ │ ├── entity │ │ │ ├── client.d.ts │ │ │ ├── dept.d.ts │ │ │ ├── dict.d.ts │ │ │ ├── file.d.ts │ │ │ ├── menu.d.ts │ │ │ ├── param.d.ts │ │ │ ├── role.d.ts │ │ │ ├── routeConf.d.ts │ │ │ ├── social.d.ts │ │ │ ├── tenant.d.ts │ │ │ └── user.d.ts │ │ ├── file.ts │ │ ├── menu.ts │ │ ├── mobile.ts │ │ ├── param.ts │ │ ├── roles.ts │ │ ├── routeConf.ts │ │ ├── tenant.ts │ │ └── user.ts │ └── wechat │ │ ├── account.ts │ │ ├── draft.ts │ │ ├── entity │ │ ├── account.d.ts │ │ ├── draft.d.ts │ │ ├── material.d.ts │ │ ├── mpMenus.d.ts │ │ ├── publish.d.ts │ │ └── user.d.ts │ │ ├── material.ts │ │ ├── menu.ts │ │ ├── publish.ts │ │ └── user.ts ├── assets │ ├── login │ │ └── loginbg.png │ ├── png │ │ ├── bt.png │ │ ├── iphone_mobile.png │ │ ├── wechat_bt.png │ │ └── wechat_mobile.png │ └── svg │ │ ├── Component.svg │ │ ├── QrCode.svg │ │ ├── add.svg │ │ ├── audit.svg │ │ ├── authClient.svg │ │ ├── baseinfo.svg │ │ ├── connect.svg │ │ ├── data.svg │ │ ├── datasource.svg │ │ ├── db.svg │ │ ├── delete.svg │ │ ├── dept.svg │ │ ├── dev.svg │ │ ├── dict.svg │ │ ├── dictData.svg │ │ ├── down.svg │ │ ├── download.svg │ │ ├── drafts.svg │ │ ├── edit.svg │ │ ├── email.svg │ │ ├── eye-open.svg │ │ ├── eye.svg │ │ ├── file.svg │ │ ├── form.svg │ │ ├── gen.svg │ │ ├── genCode.svg │ │ ├── gender.svg │ │ ├── hamburger-closed.svg │ │ ├── hamburger-opened.svg │ │ ├── home.svg │ │ ├── icons.svg │ │ ├── idcard.svg │ │ ├── image.svg │ │ ├── language.svg │ │ ├── left.svg │ │ ├── loadFailed.svg │ │ ├── loginLogs.svg │ │ ├── logs.svg │ │ ├── man.svg │ │ ├── material.svg │ │ ├── menus.svg │ │ ├── message.svg │ │ ├── mobile.svg │ │ ├── password.svg │ │ ├── pay.svg │ │ ├── permission.svg │ │ ├── publish.svg │ │ ├── qq.svg │ │ ├── red-point.svg │ │ ├── right.svg │ │ ├── role.svg │ │ ├── route.svg │ │ ├── screenfull-exit.svg │ │ ├── screenfull.svg │ │ ├── security.svg │ │ ├── system.svg │ │ ├── table.svg │ │ ├── tenant.svg │ │ ├── theme.svg │ │ ├── up.svg │ │ ├── user.svg │ │ ├── userInfo.svg │ │ ├── video.svg │ │ ├── voice.svg │ │ ├── wechat.svg │ │ ├── wechatOperating.svg │ │ ├── weibo.svg │ │ └── woman.svg ├── components │ ├── XhBreadcrumb │ │ ├── breadcrumb.vue │ │ └── index.ts │ ├── XhCard │ │ ├── card.vue │ │ └── index.ts │ ├── XhCharts │ │ ├── charts.vue │ │ └── index.ts │ ├── XhDraggable │ │ ├── draggable.vue │ │ └── index.ts │ ├── XhEditor │ │ ├── index.ts │ │ └── index.vue │ ├── XhForm │ │ ├── form-action.ts │ │ ├── form-action.vue │ │ ├── form-item.ts │ │ ├── form-item.vue │ │ ├── form.ts │ │ ├── hooks │ │ │ ├── index.ts │ │ │ ├── useFormContext.ts │ │ │ ├── useFormItem.ts │ │ │ ├── useFormMethods.ts │ │ │ └── useFormState.ts │ │ ├── index.ts │ │ ├── index.vue │ │ └── src │ │ │ ├── cascader │ │ │ └── index.ts │ │ │ ├── checkBoxGroup │ │ │ ├── CheckBoxGroup.vue │ │ │ └── index.ts │ │ │ ├── datePicker │ │ │ └── datePickerProps.ts │ │ │ ├── input │ │ │ ├── inputNumberProps.ts │ │ │ └── inputProps.ts │ │ │ ├── radioGroup │ │ │ ├── RadioButtonGroup.vue │ │ │ └── index.ts │ │ │ ├── select │ │ │ └── selectProps.ts │ │ │ └── upload │ │ │ └── imgUpload │ │ │ └── index.vue │ ├── XhHamburger │ │ ├── hamburger.vue │ │ └── index.ts │ ├── XhIconView │ │ ├── iconView.vue │ │ └── index.ts │ ├── XhLangSelect │ │ ├── index.ts │ │ └── langSelect.vue │ ├── XhMessage │ │ ├── index.ts │ │ └── message.vue │ ├── XhScreenfull │ │ ├── index.ts │ │ └── screenfull.vue │ ├── XhSettingSelect │ │ ├── index.ts │ │ └── settingSelect.vue │ ├── XhSidebar │ │ ├── MenuItem.vue │ │ ├── SidebarItem.vue │ │ ├── SidebarMenu.vue │ │ └── index.ts │ ├── XhSvg │ │ ├── index.ts │ │ └── index.vue │ ├── XhTable │ │ ├── crud-form.vue │ │ ├── crud-head-operation.vue │ │ ├── crud-row-operation.vue │ │ ├── crud-style.vue │ │ ├── crud.ts │ │ ├── crud.vue │ │ ├── hooks │ │ │ ├── index.ts │ │ │ ├── useTableContext.ts │ │ │ ├── useTableForm.ts │ │ │ ├── useTableMethods.ts │ │ │ └── useTableState.ts │ │ └── pagination.ts │ ├── XhTagView │ │ ├── index.ts │ │ └── tagView.vue │ ├── XhThemeSelect │ │ ├── index.ts │ │ └── themeSelect.vue │ ├── XhVerifition │ │ ├── Verify.vue │ │ ├── Verify │ │ │ ├── VerifyPoints.vue │ │ │ └── VerifySlide.vue │ │ ├── api │ │ │ └── index.js │ │ └── utils │ │ │ ├── ase.js │ │ │ ├── axios.js │ │ │ └── util.js │ ├── component.ts │ ├── default.ts │ └── index.ts ├── config │ ├── setting.config.js │ └── theme.config.js ├── hooks │ ├── useBreakpoint.ts │ ├── useEventListener.ts │ ├── useMqtt.ts │ ├── useUploadFiles.ts │ └── useWebSocket.ts ├── i18n │ ├── README.md │ ├── index.ts │ └── locale │ │ ├── en.yml │ │ └── zhCn.yml ├── layout │ ├── AppMain │ │ └── index.vue │ ├── Login │ │ ├── formLogin.vue │ │ ├── index.vue │ │ └── otherLogin.vue │ ├── Navbar │ │ └── index.vue │ ├── Sidebar │ │ └── index.vue │ └── index.vue ├── main.ts ├── permission.ts ├── router │ ├── commons.ts │ ├── index.ts │ └── types.ts ├── store │ ├── index.ts │ └── modules │ │ ├── app.ts │ │ ├── permission.ts │ │ ├── theme.ts │ │ └── user.ts ├── styles │ ├── element.scss │ ├── home.scss │ ├── index.scss │ ├── login.scss │ ├── media.scss │ ├── message-box.scss │ ├── mixin.scss │ ├── sidebar.scss │ ├── tag.scss │ ├── transition.scss │ ├── variables.global.scss │ ├── variables.global.scss.d.ts │ └── variables.scss ├── utils │ ├── date.ts │ ├── encrypt.ts │ ├── http │ │ ├── index.ts │ │ ├── xhAxios.ts │ │ └── xhAxiosHandler.d.ts │ ├── index.ts │ ├── install.ts │ ├── is.ts │ ├── route.ts │ ├── rules.ts │ ├── storage.ts │ └── theme.ts └── views │ ├── admin │ ├── dept │ │ ├── index.ts │ │ └── index.vue │ ├── menus │ │ ├── icon-select.vue │ │ ├── index.tsx │ │ └── index.vue │ ├── roles │ │ ├── index.ts │ │ └── index.vue │ ├── tenant │ │ ├── index.ts │ │ └── index.vue │ └── user │ │ ├── index.ts │ │ ├── index.vue │ │ └── info.vue │ ├── audit │ └── log │ │ ├── index.ts │ │ ├── index.vue │ │ └── login.vue │ ├── component │ ├── chat-room │ │ └── index.vue │ ├── form │ │ └── index.vue │ └── table │ │ └── index.vue │ ├── development │ └── gen │ │ ├── db-info.vue │ │ ├── index.ts │ │ └── index.vue │ ├── error │ ├── 401.vue │ └── 404.vue │ ├── home │ └── index.vue │ ├── security │ ├── userBind.ts │ └── userBind.vue │ ├── system │ ├── application │ │ ├── index.ts │ │ └── index.vue │ ├── client │ │ ├── index.tsx │ │ └── index.vue │ ├── dict │ │ ├── data.vue │ │ ├── index.ts │ │ └── index.vue │ ├── file │ │ ├── index.ts │ │ └── index.vue │ ├── icons │ │ └── index.vue │ └── param │ │ ├── index.ts │ │ └── index.vue │ └── wechat │ ├── account │ ├── index.ts │ └── index.vue │ ├── components │ └── selectWechat.vue │ ├── drafts │ ├── editor.vue │ ├── index.vue │ ├── message.vue │ ├── multiple.vue │ ├── operation.vue │ └── single.vue │ ├── material │ ├── components │ │ ├── image.vue │ │ ├── video.vue │ │ ├── voice.vue │ │ └── voiceAndvideo.ts │ ├── index.ts │ └── index.vue │ ├── menu │ ├── editForm.vue │ └── index.vue │ └── publish │ ├── index.ts │ └── index.vue ├── tsconfig.json ├── types ├── axios.d.ts ├── components.d.ts ├── env.d.ts ├── global.d.ts ├── homeTag.d.ts ├── modules.d.ts ├── mqtt.d.ts └── shims-vue.d.ts └── vite.config.ts /.env.development: -------------------------------------------------------------------------------- 1 | VITE_PORT = 8080 2 | 3 | # 路由历史模式 4 | VITE_ROUTER_HISTORY = "hash" 5 | 6 | VITE_WS_API = "localhost" 7 | 8 | # 后端地址 9 | VITE_BASE_API = "http://localhost:15000" 10 | 11 | # 图片oss地址 当没有domain时自动拼接 12 | VITE_OSS_DOMAIN = "http://127.0.0.1:9000" -------------------------------------------------------------------------------- /.env.production: -------------------------------------------------------------------------------- 1 | VITE_PORT = 8080 2 | 3 | # 路由历史模式 4 | VITE_ROUTER_HISTORY = "hash" 5 | 6 | # 后端地址 7 | VITE_BASE_API = "http://api.xhuicloud.cn" 8 | 9 | VITE_WS_API = "api.xhuicloud.cn" 10 | 11 | # 图片oss地址 当没有domain时自动拼接 12 | VITE_OSS_DOMAIN = "http://127.0.0.1:9000" -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | dist 3 | *.md -------------------------------------------------------------------------------- /.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | env: { 4 | browser: true, 5 | es2021: true, 6 | node: true 7 | }, 8 | parser: 'vue-eslint-parser', 9 | extends: [ 10 | 'plugin:vue/vue3-recommended', 11 | 'plugin:@typescript-eslint/recommended', 12 | 'prettier', 13 | 'plugin:prettier/recommended' 14 | ], 15 | plugins: ['@typescript-eslint', 'prettier', 'import'], 16 | parserOptions: { 17 | parser: '@typescript-eslint/parser', 18 | ecmaVersion: 2020, 19 | sourceType: 'module', 20 | jsxPragma: 'React', 21 | ecmaFeatures: { 22 | jsx: true, 23 | tsx: true 24 | } 25 | }, 26 | rules: { 27 | 'no-console': 'off', 28 | 'no-debugger': 'off', 29 | 'no-use-before-define': 'off', 30 | 'vue/multi-word-component-names': 'off', 31 | 'vue/no-v-html': 'off', 32 | 'vue/v-on-event-hyphenation': 'off', 33 | '@typescript-eslint/ban-types': 'off', 34 | '@typescript-eslint/no-non-null-assertion': 'off', 35 | '@typescript-eslint/no-non-null-asserted-optional-chain': 'off', 36 | '@typescript-eslint/no-explicit-any': 'off', 37 | '@typescript-eslint/no-unused-vars': [ 38 | 'error', 39 | { 40 | argsIgnorePattern: '^_', 41 | varsIgnorePattern: '^_' 42 | } 43 | ], 44 | 'no-unused-vars': [ 45 | 'error', 46 | { 47 | argsIgnorePattern: '^_', 48 | varsIgnorePattern: '^_' 49 | } 50 | ] 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | *.log 3 | npm-debug.log* 4 | yarn-debug.log* 5 | yarn-error.log* 6 | pnpm-debug.log* 7 | lerna-debug.log* 8 | 9 | node_modules 10 | dist 11 | dist-ssr 12 | *.local 13 | 14 | # Editor directories and files 15 | .vscode/* 16 | !.vscode/extensions.json 17 | .idea 18 | .DS_Store 19 | *.suo 20 | *.ntvs* 21 | *.njsproj 22 | *.sln 23 | *.sw? 24 | -------------------------------------------------------------------------------- /.husky/pre-commit: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | . "$(dirname "$0")/_/husky.sh" 3 | 4 | npm run lint:lint-staged 5 | -------------------------------------------------------------------------------- /.prettierrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | printWidth: 120, // 换行字符串阈值 3 | tabWidth: 2, // 设置工具每一个水平缩进的空格数 4 | useTabs: false, 5 | semi: false, // 句末是否加分号 6 | vueIndentScriptAndStyle: true, 7 | singleQuote: true, // 用单引号 8 | trailingComma: 'none', // 最后一个对象元素加逗号 9 | bracketSpacing: true, // 对象,数组加空格 10 | jsxBracketSameLine: true, // jsx > 是否另起一行 11 | arrowParens: 'always', // (x) => {} 是否要有小括号 12 | requirePragma: false, // 不需要写文件开头的 @prettier 13 | insertPragma: false, // 不需要自动在文件开头插入 @prettier 14 | endOfLine: 'auto' 15 | } -------------------------------------------------------------------------------- /.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | "recommendations": [ 3 | "vue.volar", 4 | "dbaeumer.vscode-eslint", 5 | "esbenp.prettier-vscode", 6 | "antfu.vite", 7 | "lokalise.i18n-ally" 8 | ] 9 | } -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "typescript.tsdk": "./node_modules/typescript/lib", 3 | "volar.tsPlugin": true, 4 | "volar.tsPluginStatus": false, 5 | // 关闭代码地图 6 | "explorer.openEditors.visible": 0, 7 | // 保存时自动格式化 8 | "editor.formatOnSave": true, 9 | // 关闭根据文件类型设置缩进 10 | "editor.detectIndentation": false, 11 | // 统一缩进 12 | "editor.tabSize": 2, 13 | "editor.defaultFormatter": "esbenp.prettier-vscode", 14 | // 控制在差异编辑器中是否把前导空格或尾随空格的改动显示为差异 15 | "diffEditor.ignoreTrimWhitespace": false, 16 | "eslint.probe": [ 17 | "javascript", 18 | "javascriptreact", 19 | "typescript", 20 | "typescriptreact", 21 | "html", 22 | "vue", 23 | "markdown", 24 | "json", 25 | "jsonc" 26 | ], 27 | "eslint.validate": ["javascript", "javascriptreact", "typescript", "typescriptreact", "html", "vue", "markdown"], 28 | "i18n-ally.localesPaths": "src/i18n/locale", 29 | "i18n-ally.sourceLanguage": "zhCn", 30 | "i18n-ally.displayLanguage": "zhCn", 31 | "i18n-ally.enabledParsers": ["yaml"], 32 | "i18n-ally.enabledFrameworks": ["vue"], 33 | "i18n-ally.keystyle": "nested", 34 | "cSpell.words": [ 35 | "Sinda", 36 | "upms", 37 | "pinia", 38 | "vite", 39 | "vitejs", 40 | "unplugin", 41 | "intlify", 42 | "xhuicloud", 43 | "echarts", 44 | "screenfull", 45 | "vuedraggable", 46 | "vueuse" 47 | ] 48 | } 49 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022 Sinda 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 | -------------------------------------------------------------------------------- /docker/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM nginx 2 | 3 | COPY ./dist /data 4 | 5 | RUN rm /etc/nginx/conf.d/default.conf 6 | 7 | ADD xhuicloud-ui.conf /etc/nginx/conf.d/default.conf 8 | 9 | RUN ["echo","xhuicloud-ui run success ..."] -------------------------------------------------------------------------------- /docker/docker-compose.yaml: -------------------------------------------------------------------------------- 1 | version: '3.8' 2 | 3 | networks: 4 | xhuicloud_xhuicloud: 5 | external: true 6 | 7 | services: 8 | xhuicloud-ui: 9 | build: 10 | context: . 11 | restart: always 12 | container_name: xhuicloud-ui 13 | image: xhuicloud-ui 14 | networks: 15 | - xhuicloud_xhuicloud 16 | external_links: 17 | - xhuicloud-gateway 18 | ports: 19 | - 80:80 20 | -------------------------------------------------------------------------------- /docker/xhuicloud-ui.conf: -------------------------------------------------------------------------------- 1 | server { 2 | listen 80; 3 | server_name localhost; 4 | 5 | gzip on; 6 | gzip_static on; 7 | gzip_min_length 1k; 8 | gzip_comp_level 4; 9 | gzip_proxied any; 10 | gzip_types text/plain text/xml text/css; 11 | gzip_vary on; 12 | gzip_disable "MSIE [1-6]\.(?!.*SV1)"; 13 | 14 | root /data/; 15 | } 16 | 17 | server { 18 | listen 80; 19 | server_name localhost; 20 | 21 | access_log off; 22 | 23 | location ~* ^/(auth|admin|pay|gen|push|logs|wechat) { 24 | proxy_pass http://xhuicloud-gateway:15000; 25 | proxy_connect_timeout 15s; 26 | proxy_send_timeout 15s; 27 | proxy_read_timeout 15s; 28 | proxy_set_header X-Real-IP $remote_addr; 29 | proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; 30 | proxy_set_header X-Forwarded-Proto http; 31 | } 32 | } -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 星辉云 10 | 11 | 12 |
13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sindaZeng/xhuicloud-ui/d3f17a58a3341a1fa7afa09bdf95b42d693bd845/public/favicon.ico -------------------------------------------------------------------------------- /public/tinymce/skins/content/default/content.min.css: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Tiny Technologies, Inc. All rights reserved. 3 | * Licensed under the LGPL or a commercial license. 4 | * For LGPL see License.txt in the project root for license information. 5 | * For commercial licenses see https://www.tiny.cloud/ 6 | */ 7 | body{font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Oxygen,Ubuntu,Cantarell,'Open Sans','Helvetica Neue',sans-serif;line-height:1.4;margin:1rem}table{border-collapse:collapse}table:not([cellpadding]) td,table:not([cellpadding]) th{padding:.4rem}table[border]:not([border="0"]):not([style*=border-width]) td,table[border]:not([border="0"]):not([style*=border-width]) th{border-width:1px}table[border]:not([border="0"]):not([style*=border-style]) td,table[border]:not([border="0"]):not([style*=border-style]) th{border-style:solid}table[border]:not([border="0"]):not([style*=border-color]) td,table[border]:not([border="0"]):not([style*=border-color]) th{border-color:#ccc}figure{display:table;margin:1rem auto}figure figcaption{color:#999;display:block;margin-top:.25rem;text-align:center}hr{border-color:#ccc;border-style:solid;border-width:1px 0 0 0}code{background-color:#e8e8e8;border-radius:3px;padding:.1rem .2rem}.mce-content-body:not([dir=rtl]) blockquote{border-left:2px solid #ccc;margin-left:1.5rem;padding-left:1rem}.mce-content-body[dir=rtl] blockquote{border-right:2px solid #ccc;margin-right:1.5rem;padding-right:1rem} 8 | -------------------------------------------------------------------------------- /public/tinymce/skins/ui/oxide-dark/content.mobile.min.css: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Tiny Technologies, Inc. All rights reserved. 3 | * Licensed under the LGPL or a commercial license. 4 | * For LGPL see License.txt in the project root for license information. 5 | * For commercial licenses see https://www.tiny.cloud/ 6 | */ 7 | .tinymce-mobile-unfocused-selections .tinymce-mobile-unfocused-selection{background-color:green;display:inline-block;opacity:.5;position:absolute}body{-webkit-text-size-adjust:none}body img{max-width:96vw}body table img{max-width:95%}body{font-family:sans-serif}table{border-collapse:collapse} 8 | -------------------------------------------------------------------------------- /public/tinymce/skins/ui/oxide-dark/fonts/tinymce-mobile.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sindaZeng/xhuicloud-ui/d3f17a58a3341a1fa7afa09bdf95b42d693bd845/public/tinymce/skins/ui/oxide-dark/fonts/tinymce-mobile.woff -------------------------------------------------------------------------------- /public/tinymce/skins/ui/oxide-dark/skin.shadowdom.min.css: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Tiny Technologies, Inc. All rights reserved. 3 | * Licensed under the LGPL or a commercial license. 4 | * For LGPL see License.txt in the project root for license information. 5 | * For commercial licenses see https://www.tiny.cloud/ 6 | */ 7 | body.tox-dialog__disable-scroll{overflow:hidden}.tox-fullscreen{border:0;height:100%;margin:0;overflow:hidden;-ms-scroll-chaining:none;overscroll-behavior:none;padding:0;touch-action:pinch-zoom;width:100%}.tox.tox-tinymce.tox-fullscreen .tox-statusbar__resize-handle{display:none}.tox-shadowhost.tox-fullscreen,.tox.tox-tinymce.tox-fullscreen{left:0;position:fixed;top:0;z-index:1200}.tox.tox-tinymce.tox-fullscreen{background-color:transparent}.tox-fullscreen .tox.tox-tinymce-aux,.tox-fullscreen~.tox.tox-tinymce-aux{z-index:1201} 8 | -------------------------------------------------------------------------------- /public/tinymce/skins/ui/oxide/content.mobile.min.css: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Tiny Technologies, Inc. All rights reserved. 3 | * Licensed under the LGPL or a commercial license. 4 | * For LGPL see License.txt in the project root for license information. 5 | * For commercial licenses see https://www.tiny.cloud/ 6 | */ 7 | .tinymce-mobile-unfocused-selections .tinymce-mobile-unfocused-selection{background-color:green;display:inline-block;opacity:.5;position:absolute}body{-webkit-text-size-adjust:none}body img{max-width:96vw}body table img{max-width:95%}body{font-family:sans-serif}table{border-collapse:collapse} 8 | -------------------------------------------------------------------------------- /public/tinymce/skins/ui/oxide/fonts/tinymce-mobile.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sindaZeng/xhuicloud-ui/d3f17a58a3341a1fa7afa09bdf95b42d693bd845/public/tinymce/skins/ui/oxide/fonts/tinymce-mobile.woff -------------------------------------------------------------------------------- /public/tinymce/skins/ui/oxide/skin.shadowdom.min.css: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Tiny Technologies, Inc. All rights reserved. 3 | * Licensed under the LGPL or a commercial license. 4 | * For LGPL see License.txt in the project root for license information. 5 | * For commercial licenses see https://www.tiny.cloud/ 6 | */ 7 | body.tox-dialog__disable-scroll{overflow:hidden}.tox-fullscreen{border:0;height:100%;margin:0;overflow:hidden;-ms-scroll-chaining:none;overscroll-behavior:none;padding:0;touch-action:pinch-zoom;width:100%}.tox.tox-tinymce.tox-fullscreen .tox-statusbar__resize-handle{display:none}.tox-shadowhost.tox-fullscreen,.tox.tox-tinymce.tox-fullscreen{left:0;position:fixed;top:0;z-index:1200}.tox.tox-tinymce.tox-fullscreen{background-color:transparent}.tox-fullscreen .tox.tox-tinymce-aux,.tox-fullscreen~.tox.tox-tinymce-aux{z-index:1201} 8 | -------------------------------------------------------------------------------- /src/App.vue: -------------------------------------------------------------------------------- 1 | 6 | 17 | 18 | -------------------------------------------------------------------------------- /src/api/base/baseEntity.ts: -------------------------------------------------------------------------------- 1 | export const baseBoolean = [ 2 | { 3 | value: '否', 4 | label: 0 5 | }, 6 | { 7 | value: '是', 8 | label: 1 9 | } 10 | ] 11 | -------------------------------------------------------------------------------- /src/api/base/index.d.ts: -------------------------------------------------------------------------------- 1 | export interface Page { 2 | records: T[] 3 | total: number 4 | size: number 5 | current: number 6 | } 7 | 8 | export interface BaseEntity { 9 | id?: number 10 | createTime?: string 11 | createId?: number 12 | updateId?: any 13 | updateTime?: string 14 | isDel?: number 15 | } 16 | 17 | interface UploadFileParams { 18 | file: File | Blob 19 | filename?: string 20 | data?: Recordable 21 | params?: Recordable 22 | [key: string]: any 23 | } 24 | -------------------------------------------------------------------------------- /src/api/chatroom/conversation.ts: -------------------------------------------------------------------------------- 1 | import { HttpClient } from '@/utils/http' 2 | 3 | export function getConversation() { 4 | return HttpClient.get({ 5 | url: `/chat/conversation` 6 | }) 7 | } 8 | -------------------------------------------------------------------------------- /src/api/chatroom/entity/chat.d.ts: -------------------------------------------------------------------------------- 1 | interface Message { 2 | messageId?: string 3 | text: string 4 | userId: string 5 | } 6 | -------------------------------------------------------------------------------- /src/api/chatroom/index.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * MIT License 3 | * Copyright <2021-2022> 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 copies 9 | * of the Software, and to permit persons to whom the Software is furnished to do so, 10 | * 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 IMPLIED, 16 | * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A 17 | * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 18 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF 19 | * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE 20 | * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | * @Author: Sinda 22 | * @Email: xhuicloud@163.com 23 | */ 24 | 25 | import { HttpClient } from '@/utils/http' 26 | import { RequestOptions } from '@/utils/http/xhAxiosHandler' 27 | 28 | const API_KEY = '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' 29 | const ENDPOINT = 'https://api.openai.com/v1/engines/davinci/jobs' 30 | const options: RequestOptions = { withToken: false } 31 | 32 | export function generateText(prompt: string) { 33 | return HttpClient.post( 34 | { 35 | url: `${ENDPOINT}?prompt=${encodeURIComponent(prompt)}&max_tokens=1024`, 36 | headers: { 37 | 'Content-Type': 'application/json', 38 | Authorization: `Bearer ${API_KEY}` 39 | } 40 | }, 41 | options 42 | ) 43 | } 44 | -------------------------------------------------------------------------------- /src/api/generator/entity/ds.d.ts: -------------------------------------------------------------------------------- 1 | interface GenDsInfo { 2 | id: number 3 | name: string 4 | type: string 5 | username: string 6 | password: string 7 | host: string 8 | port?: string 9 | createTime: string 10 | updateTime: string 11 | isDel: number 12 | } 13 | 14 | interface TableInfo { 15 | tableName: string 16 | engine: string 17 | tableComment: string 18 | createTime: string 19 | } 20 | 21 | interface GenCode { 22 | id?: number 23 | tableName?: string[] 24 | toReplace?: number[] 25 | moduleName?: string 26 | contextPath?: string 27 | packagePath?: string 28 | author?: string 29 | tablePrefix?: string 30 | genWeb?: number 31 | isTs?: number 32 | } 33 | -------------------------------------------------------------------------------- /src/api/logs/entity/log.d.ts: -------------------------------------------------------------------------------- 1 | interface AuditRecord { 2 | id: number 3 | reqId: string 4 | requestIp: string 5 | serviceSystem: string 6 | operator: string 7 | detail: string 8 | classPath: string 9 | requestMethod: string 10 | requestUri: string 11 | httpMethod: string 12 | params: string 13 | result: string 14 | status: number 15 | errorMsg: string 16 | createTime: string 17 | } 18 | 19 | interface AuditLogin { 20 | id: number 21 | username: string 22 | userId: number 23 | loginTime: string 24 | ip: string 25 | useragent: string 26 | status: number 27 | remake?: any 28 | } 29 | -------------------------------------------------------------------------------- /src/api/logs/log-login.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * MIT License 3 | * Copyright <2021-2022> 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 copies 9 | * of the Software, and to permit persons to whom the Software is furnished to do so, 10 | * 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 IMPLIED, 16 | * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A 17 | * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 18 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF 19 | * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE 20 | * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | * @Author: Sinda 22 | * @Email: xhuicloud@163.com 23 | */ 24 | 25 | import { HttpClient } from '@/utils/http' 26 | import { Page } from '../base' 27 | 28 | enum LogLoginApi { 29 | LogPage = '/logs/auditLogin/page' 30 | } 31 | 32 | export function logLoginPage(params: any) { 33 | return HttpClient.get>({ 34 | url: LogLoginApi.LogPage, 35 | params 36 | }) 37 | } 38 | -------------------------------------------------------------------------------- /src/api/logs/record.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * MIT License 3 | * Copyright <2021-2022> 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 copies 9 | * of the Software, and to permit persons to whom the Software is furnished to do so, 10 | * 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 IMPLIED, 16 | * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A 17 | * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 18 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF 19 | * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE 20 | * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | * @Author: Sinda 22 | * @Email: xhuicloud@163.com 23 | */ 24 | 25 | import { HttpClient } from '@/utils/http' 26 | import { Page } from '../base' 27 | 28 | enum AuditRecordApi { 29 | AuditRecordPage = '/logs/auditRecord/page' 30 | } 31 | 32 | export function recordPage(params: any) { 33 | return HttpClient.get>({ 34 | url: AuditRecordApi.AuditRecordPage, 35 | params 36 | }) 37 | } 38 | -------------------------------------------------------------------------------- /src/api/upms/dict.ts: -------------------------------------------------------------------------------- 1 | import { HttpClient } from '@/utils/http' 2 | import { Page } from '../base' 3 | 4 | enum DictApi { 5 | DictPage = '/admin/dict/page', 6 | CreateDict = '/admin/dict', 7 | UpdateDict = '/admin/dict', 8 | DeleteDict = '/admin/dict/' 9 | } 10 | 11 | export function dictPage(params: any) { 12 | return HttpClient.get>({ 13 | url: DictApi.DictPage, 14 | params 15 | }) 16 | } 17 | 18 | export function createDict(data: SysDict) { 19 | return HttpClient.post( 20 | { 21 | url: DictApi.CreateDict, 22 | data 23 | }, 24 | { 25 | titleMsg: '操作成功', 26 | successMsg: '字典项添加成功' 27 | } 28 | ) 29 | } 30 | 31 | export function updateDict(data: SysDict) { 32 | return HttpClient.put( 33 | { 34 | url: DictApi.UpdateDict, 35 | data 36 | }, 37 | { 38 | titleMsg: '操作成功', 39 | successMsg: '字典项修改成功' 40 | } 41 | ) 42 | } 43 | 44 | export function deleteDict(id: number) { 45 | return HttpClient.delete( 46 | { 47 | url: DictApi.DeleteDict + id 48 | }, 49 | { 50 | titleMsg: '操作成功', 51 | successMsg: '字典项删除成功' 52 | } 53 | ) 54 | } 55 | -------------------------------------------------------------------------------- /src/api/upms/dictData.ts: -------------------------------------------------------------------------------- 1 | import { HttpClient } from '@/utils/http' 2 | import { Page } from '../base' 3 | 4 | enum DictApi { 5 | DictDataPage = '/admin/dictData/page', 6 | CreateDictData = '/admin/dictData', 7 | UpdateDictData = '/admin/dictData', 8 | DeleteDictData = '/admin/dictData/' 9 | } 10 | 11 | export function dictDataPage(params: any) { 12 | return HttpClient.get>({ 13 | url: DictApi.DictDataPage, 14 | params 15 | }) 16 | } 17 | 18 | export function createDictData(data: SysDictData) { 19 | return HttpClient.post( 20 | { 21 | url: DictApi.CreateDictData, 22 | data 23 | }, 24 | { 25 | titleMsg: '操作成功', 26 | successMsg: '字典添加成功' 27 | } 28 | ) 29 | } 30 | 31 | export function updateDictData(data: SysDictData) { 32 | return HttpClient.put( 33 | { 34 | url: DictApi.UpdateDictData, 35 | data 36 | }, 37 | { 38 | titleMsg: '操作成功', 39 | successMsg: '字典修改成功' 40 | } 41 | ) 42 | } 43 | 44 | export function deleteDictData(id: number) { 45 | return HttpClient.delete( 46 | { 47 | url: DictApi.DeleteDictData + id 48 | }, 49 | { 50 | titleMsg: '操作成功', 51 | successMsg: '字典删除成功' 52 | } 53 | ) 54 | } 55 | -------------------------------------------------------------------------------- /src/api/upms/entity/client.d.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * MIT License 3 | * Copyright <2021-2022> 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 copies 9 | * of the Software, and to permit persons to whom the Software is furnished to do so, 10 | * 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 IMPLIED, 16 | * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A 17 | * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 18 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF 19 | * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE 20 | * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | * @Author: Sinda 22 | * @Email: xhuicloud@163.com 23 | */ 24 | 25 | interface SysClient { 26 | id: number 27 | name: string 28 | clientId: string 29 | resourceIds?: string 30 | clientSecret: string 31 | scope: string 32 | authorizedGrantTypes: string 33 | webServerRedirectUri: string 34 | authorities?: string 35 | accessTokenValidity?: number 36 | refreshTokenValidity?: number 37 | captchaEnable?: number 38 | multiLogin?: number 39 | autoApprove: string 40 | isDel: number 41 | tenantId: number 42 | } 43 | -------------------------------------------------------------------------------- /src/api/upms/entity/dept.d.ts: -------------------------------------------------------------------------------- 1 | interface Dept { 2 | label: string 3 | value: number 4 | id: number 5 | parentId: number 6 | children: Dept[] 7 | name: string 8 | address: string 9 | createTime: any 10 | } 11 | 12 | interface SysDept { 13 | id: number 14 | name: string 15 | address?: any 16 | parentId: number 17 | sort: number 18 | createTime: string 19 | createId: number 20 | updateTime: string 21 | updateId?: any 22 | isDel: number 23 | tenantId: number 24 | } 25 | -------------------------------------------------------------------------------- /src/api/upms/entity/dict.d.ts: -------------------------------------------------------------------------------- 1 | interface SysDict { 2 | id: number 3 | type: string 4 | description: string 5 | remark: string 6 | sort?: number 7 | createTime: string 8 | createId: number 9 | updateTime: string 10 | updateId: number 11 | isDel: number 12 | } 13 | 14 | interface SysDictData { 15 | id: number 16 | dictId: number 17 | type: string 18 | label: string 19 | value?: string 20 | description: string 21 | remarks: string 22 | sort: number 23 | createTime: string 24 | createId: number 25 | updateTime: string 26 | updateId?: number 27 | isDel: number 28 | } 29 | -------------------------------------------------------------------------------- /src/api/upms/entity/file.d.ts: -------------------------------------------------------------------------------- 1 | interface SysFile { 2 | id: number 3 | url: string 4 | fileName: string 5 | name: string 6 | fileSize: string 7 | fileType: string 8 | bucketName: string 9 | createTime: string 10 | createId: number 11 | updateTime?: string 12 | updateId?: number 13 | isDel: number 14 | tenantId: number 15 | } 16 | -------------------------------------------------------------------------------- /src/api/upms/entity/menu.d.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * MIT License 3 | * Copyright <2021-2022> 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 copies 9 | * of the Software, and to permit persons to whom the Software is furnished to do so, 10 | * 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 IMPLIED, 16 | * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A 17 | * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 18 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF 19 | * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE 20 | * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | * @Author: Sinda 22 | * @Email: xhuicloud@163.com 23 | */ 24 | interface Menu { 25 | id: number 26 | label: string 27 | value: number 28 | parentId: number 29 | children: Menu[] 30 | icon: string 31 | name: string 32 | internationalization: string 33 | permission: string 34 | path: string 35 | type: number 36 | sort: number 37 | } 38 | -------------------------------------------------------------------------------- /src/api/upms/entity/param.d.ts: -------------------------------------------------------------------------------- 1 | interface SysParam { 2 | id: number 3 | paramName: string 4 | paramKey: string 5 | paramValue: string 6 | paramType: number 7 | remark: string 8 | sort: number 9 | createId: number 10 | createTime: string 11 | updateId: number 12 | updateTime: string 13 | isDel: number 14 | } 15 | -------------------------------------------------------------------------------- /src/api/upms/entity/role.d.ts: -------------------------------------------------------------------------------- 1 | interface RoleDto { 2 | label: string 3 | value: number 4 | } 5 | 6 | interface SysRole { 7 | id: number 8 | roleCode: string 9 | roleName: string 10 | roleDesc: string 11 | createTime: string 12 | createId: number 13 | updateTime: string 14 | updateId: number 15 | isDel: number 16 | tenantId: number 17 | } 18 | 19 | interface RoleMenusDto { 20 | /** 21 | * 角色ID 22 | */ 23 | roleId: number 24 | 25 | /** 26 | * 菜单ID 27 | */ 28 | menuIds: number[] 29 | } 30 | -------------------------------------------------------------------------------- /src/api/upms/entity/routeConf.d.ts: -------------------------------------------------------------------------------- 1 | interface SysRouteConf { 2 | id: number 3 | routeName: string 4 | routeId: string 5 | predicates: string 6 | filters: string 7 | uri: string 8 | sort: number 9 | createTime: string 10 | createId?: number 11 | updateTime: string 12 | updateId?: number 13 | isDel: number 14 | } 15 | interface Predicate { 16 | args: Args 17 | name: string 18 | } 19 | 20 | interface Args { 21 | [key: string]: string 22 | } 23 | 24 | interface PredicateAndFilterVo { 25 | predicateVos: CommonVo[] 26 | filterVos: CommonVo[] 27 | } 28 | 29 | interface CommonVo { 30 | value: string 31 | name: string 32 | nameEdit?: boolean 33 | valueEdit?: boolean 34 | } 35 | -------------------------------------------------------------------------------- /src/api/upms/entity/social.d.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * MIT License 3 | * Copyright <2021-2022> 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 copies 9 | * of the Software, and to permit persons to whom the Software is furnished to do so, 10 | * 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 IMPLIED, 16 | * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A 17 | * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 18 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF 19 | * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE 20 | * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | * @Author: Sinda 22 | * @Email: xhuicloud@163.com 23 | */ 24 | 25 | export interface BaseSocial { 26 | appId: string 27 | redirectUrl: string 28 | } 29 | -------------------------------------------------------------------------------- /src/api/upms/entity/tenant.d.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * MIT License 3 | * Copyright <2021-2022> 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 copies 9 | * of the Software, and to permit persons to whom the Software is furnished to do so, 10 | * 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 IMPLIED, 16 | * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A 17 | * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 18 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF 19 | * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE 20 | * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | * @Author: Sinda 22 | * @Email: xhuicloud@163.com 23 | */ 24 | import { BaseSocial } from './social' 25 | 26 | export type Socials = Record 27 | 28 | export interface Tenant { 29 | /** 30 | * 租户id 31 | */ 32 | id: number 33 | 34 | /** 35 | * 租户名称 36 | */ 37 | name: string 38 | 39 | /** 40 | * logo地址 41 | */ 42 | logo: string 43 | 44 | /** 45 | * 社交登录配置 46 | */ 47 | socials: Socials 48 | } 49 | 50 | export interface SysTenant { 51 | id: number 52 | name: string 53 | state: number 54 | expirationTime: string 55 | logo: string 56 | remark?: any 57 | createTime: string 58 | createId: number 59 | updateId?: any 60 | updateTime: string 61 | isDel: number 62 | } 63 | -------------------------------------------------------------------------------- /src/api/upms/file.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * MIT License 3 | * Copyright <2021-2022> 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 copies 9 | * of the Software, and to permit persons to whom the Software is furnished to do so, 10 | * 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 IMPLIED, 16 | * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A 17 | * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 18 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF 19 | * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE 20 | * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | * @Author: Sinda 22 | * @Email: xhuicloud@163.com 23 | */ 24 | 25 | import { HttpClient } from '@/utils/http' 26 | import { Page } from '../base' 27 | 28 | export enum FileApi { 29 | FileUpload = '/admin/file/upload', 30 | FilePage = '/admin/file/page', 31 | DeleteFile = '/admin/file/' 32 | } 33 | 34 | export function filePage(params: any) { 35 | return HttpClient.get>({ 36 | url: FileApi.FilePage, 37 | params 38 | }) 39 | } 40 | 41 | export function deleteFile(id: number) { 42 | return HttpClient.delete( 43 | { 44 | url: FileApi.DeleteFile + id 45 | }, 46 | { 47 | titleMsg: '操作成功', 48 | successMsg: '文件删除成功' 49 | } 50 | ) 51 | } 52 | -------------------------------------------------------------------------------- /src/api/upms/mobile.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * MIT License 3 | * Copyright <2021-2022> 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 copies 9 | * of the Software, and to permit persons to whom the Software is furnished to do so, 10 | * 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 IMPLIED, 16 | * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A 17 | * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 18 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF 19 | * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE 20 | * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | * @Author: Sinda 22 | * @Email: xhuicloud@163.com 23 | */ 24 | 25 | import { HttpClient } from '@/utils/http' 26 | 27 | export enum MobileApi { 28 | SendSmsCode = '/admin/mobile/', 29 | CheckSmsCode = '/mobile/check/code' 30 | } 31 | 32 | export function sendSmsCode(mobile: string) { 33 | return HttpClient.get({ 34 | url: MobileApi.SendSmsCode + mobile 35 | }) 36 | } 37 | 38 | export function checkSmsCode(params: any) { 39 | return HttpClient.get({ 40 | url: MobileApi.CheckSmsCode, 41 | params 42 | }) 43 | } 44 | -------------------------------------------------------------------------------- /src/api/upms/param.ts: -------------------------------------------------------------------------------- 1 | import { HttpClient } from '@/utils/http' 2 | import { Page } from '../base' 3 | 4 | enum ParamApi { 5 | ParamTree = '/admin/param/tree', 6 | ParamPage = '/admin/param/page', 7 | CreateParam = '/admin/param', 8 | UpdateParam = '/admin/param', 9 | DeleteParam = '/admin/param/' 10 | } 11 | 12 | export function paramTree(params?: any) { 13 | return HttpClient.get>({ url: ParamApi.ParamTree, params }) 14 | } 15 | 16 | export function paramPage(params: any) { 17 | return HttpClient.get>({ 18 | url: ParamApi.ParamPage, 19 | params 20 | }) 21 | } 22 | 23 | export function createParam(data: SysParam) { 24 | return HttpClient.post( 25 | { 26 | url: ParamApi.CreateParam, 27 | data 28 | }, 29 | { 30 | titleMsg: '操作成功', 31 | successMsg: '系统参数添加成功' 32 | } 33 | ) 34 | } 35 | 36 | export function updateParam(data: SysParam) { 37 | return HttpClient.put( 38 | { 39 | url: ParamApi.UpdateParam, 40 | data 41 | }, 42 | { 43 | titleMsg: '操作成功', 44 | successMsg: '系统参数修改成功' 45 | } 46 | ) 47 | } 48 | 49 | export function deleteParam(paramId: number) { 50 | return HttpClient.delete( 51 | { 52 | url: ParamApi.DeleteParam + paramId 53 | }, 54 | { 55 | titleMsg: '操作成功', 56 | successMsg: '系统参数删除成功' 57 | } 58 | ) 59 | } 60 | -------------------------------------------------------------------------------- /src/api/wechat/entity/account.d.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * MIT License 3 | * Copyright <2021-2022> 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 copies 9 | * of the Software, and to permit persons to whom the Software is furnished to do so, 10 | * 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 IMPLIED, 16 | * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A 17 | * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 18 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF 19 | * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE 20 | * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | * @Author: Sinda 22 | * @Email: xhuicloud@163.com 23 | */ 24 | 25 | interface Account { 26 | id: number 27 | name: string 28 | url: string 29 | appId: string 30 | appSecret: string 31 | type: number 32 | appAuthToken: string 33 | appDecrypt: string 34 | redirectUrl: string 35 | createTime: string 36 | createId: number 37 | updateTime: string 38 | updateId: number 39 | tenantId: number 40 | isDel: number 41 | } 42 | 43 | interface AccountVo { 44 | name: string 45 | url: string 46 | } 47 | -------------------------------------------------------------------------------- /src/api/wechat/entity/draft.d.ts: -------------------------------------------------------------------------------- 1 | interface Draft { 2 | mediaId: string 3 | content: Content 4 | updateTime: number 5 | } 6 | 7 | interface Content { 8 | newsItem: NewsItem[] 9 | } 10 | 11 | interface NewsItem { 12 | title: string // 标题 13 | author: string // 作者 14 | digest: string // 图文消息的摘要,仅有单图文消息才有摘要,多图文此处为空。如果本字段为没有填写,则默认抓取正文前54个字。 15 | content: string // 图文消息的具体内容,支持HTML标签,必须少于2万字符,小于1M,且此处会去除JS,涉及图片url必须来源 "上传图文消息内的图片获取URL"接口获取。外部图片url将被过滤。 16 | contentSourceUrl: string // 图文消息的原文地址,即点击“阅读原文”后的URL 17 | thumbMediaId: string // 图文消息的封面图片素材id(必须是永久MediaID) 18 | showCoverPic: number // 是否显示封面,0为false,即不显示,1为true,即显示(默认) 19 | needOpenComment: number // 是否打开评论,0不打开(默认),1打开 20 | onlyFansCanComment: number // 是否粉丝才可评论,0所有人可评论(默认),1粉丝才可评论 21 | url: string // 草稿的临时链接,点击图文消息跳转链接 22 | thumbUrl: string // 图文消息的封面url 23 | } 24 | 25 | interface WxMpUpdateDraft { 26 | mediaId: string // 要修改的图文消息的id 27 | index?: number // 要更新的文章在图文消息中的位置(多图文消息时,此字段才有意义),第一篇为0 28 | articles: NewsItem 29 | } 30 | 31 | interface EditorProps { 32 | appid: string 33 | index?: number 34 | formData?: NewsItem 35 | contextMediaId: string 36 | } 37 | -------------------------------------------------------------------------------- /src/api/wechat/entity/material.d.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * MIT License 3 | * Copyright <2021-2022> 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 copies 9 | * of the Software, and to permit persons to whom the Software is furnished to do so, 10 | * 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 IMPLIED, 16 | * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A 17 | * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 18 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF 19 | * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE 20 | * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | * @Author: Sinda 22 | * @Email: xhuicloud@163.com 23 | */ 24 | 25 | import type { UploadFiles } from 'element-plus' 26 | 27 | interface Material { 28 | mediaId: string 29 | updateTime: string 30 | url: string 31 | name: string 32 | } 33 | 34 | interface MaterialVideoInfo { 35 | mediaId: string 36 | updateTime: string 37 | url: string 38 | name: string 39 | } 40 | 41 | interface VideoMaterial { 42 | videoTitle: string 43 | videoIntroduction: string 44 | multipartFile: UploadFiles 45 | } 46 | -------------------------------------------------------------------------------- /src/api/wechat/entity/mpMenus.d.ts: -------------------------------------------------------------------------------- 1 | interface WeChatMpMenu { 2 | key: string 3 | name: string 4 | type?: string 5 | appid?: string // 小程序AppId 6 | resContent?: string // 点击事件响应内容 7 | resType?: string // 点击事件响应类型 8 | url?: string 9 | pagepath?: string 10 | subButtonList: WeChatMpMenu[] 11 | } 12 | -------------------------------------------------------------------------------- /src/api/wechat/entity/publish.d.ts: -------------------------------------------------------------------------------- 1 | interface Publish { 2 | articleId: string 3 | content: Content 4 | updateTime: string 5 | } 6 | 7 | interface Content { 8 | newsItem: Item[] 9 | } 10 | 11 | interface Item { 12 | title: string 13 | author: string 14 | digest: string 15 | content: string 16 | contentSourceUrl: string 17 | thumbMediaId: string 18 | showCoverPic: number 19 | needOpenComment: number 20 | onlyFansCanComment: number 21 | thumbUrl: string 22 | url: string 23 | isDeleted: boolean 24 | } 25 | -------------------------------------------------------------------------------- /src/api/wechat/entity/user.d.ts: -------------------------------------------------------------------------------- 1 | interface WeChatSummary { 2 | name: string 3 | appId: string 4 | newUser: number 5 | cancelUser: number 6 | totalUser: number 7 | } 8 | -------------------------------------------------------------------------------- /src/api/wechat/menu.ts: -------------------------------------------------------------------------------- 1 | import { HttpClient } from '@/utils/http' 2 | 3 | export function createAndReleaseMpMenu(appId: string, data: any) { 4 | return HttpClient.post({ 5 | url: `/wechat/menu/${appId}/release`, 6 | data 7 | }) 8 | } 9 | 10 | export function getReleaseMpMenu(appId: string) { 11 | return HttpClient.get({ 12 | url: `/wechat/menu/${appId}` 13 | }) 14 | } 15 | -------------------------------------------------------------------------------- /src/api/wechat/publish.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * MIT License 3 | * Copyright <2021-2022> 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 copies 9 | * of the Software, and to permit persons to whom the Software is furnished to do so, 10 | * 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 IMPLIED, 16 | * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A 17 | * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 18 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF 19 | * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE 20 | * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | * @Author: Sinda 22 | * @Email: xhuicloud@163.com 23 | */ 24 | 25 | import { HttpClient } from '@/utils/http' 26 | import { Page } from '../base' 27 | export function publishPage(appId: string, params: any) { 28 | return HttpClient.get>({ 29 | url: `/wechat/publish/${appId}/page`, 30 | params 31 | }) 32 | } 33 | 34 | export function publish(appId: string, mediaId: string) { 35 | return HttpClient.post({ 36 | url: `/wechat/publish/${appId}`, 37 | params: { mediaId } 38 | }) 39 | } 40 | export function editDraft(appId: string, data: WxMpUpdateDraft) { 41 | return HttpClient.put( 42 | { 43 | url: `/wechat/publish/${appId}`, 44 | data 45 | }, 46 | { 47 | titleMsg: '操作成功', 48 | successMsg: '修改成功,即将刷新' 49 | } 50 | ) 51 | } 52 | -------------------------------------------------------------------------------- /src/api/wechat/user.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * MIT License 3 | * Copyright <2021-2022> 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 copies 9 | * of the Software, and to permit persons to whom the Software is furnished to do so, 10 | * 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 IMPLIED, 16 | * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A 17 | * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 18 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF 19 | * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE 20 | * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | * @Author: Sinda 22 | * @Email: xhuicloud@163.com 23 | */ 24 | 25 | import { HttpClient } from '@/utils/http' 26 | 27 | export function getUserSummary(appId: string) { 28 | return HttpClient.get({ 29 | url: `/wechat/user/${appId}/getUserSummary` 30 | }) 31 | } 32 | -------------------------------------------------------------------------------- /src/assets/login/loginbg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sindaZeng/xhuicloud-ui/d3f17a58a3341a1fa7afa09bdf95b42d693bd845/src/assets/login/loginbg.png -------------------------------------------------------------------------------- /src/assets/png/bt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sindaZeng/xhuicloud-ui/d3f17a58a3341a1fa7afa09bdf95b42d693bd845/src/assets/png/bt.png -------------------------------------------------------------------------------- /src/assets/png/iphone_mobile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sindaZeng/xhuicloud-ui/d3f17a58a3341a1fa7afa09bdf95b42d693bd845/src/assets/png/iphone_mobile.png -------------------------------------------------------------------------------- /src/assets/png/wechat_bt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sindaZeng/xhuicloud-ui/d3f17a58a3341a1fa7afa09bdf95b42d693bd845/src/assets/png/wechat_bt.png -------------------------------------------------------------------------------- /src/assets/png/wechat_mobile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sindaZeng/xhuicloud-ui/d3f17a58a3341a1fa7afa09bdf95b42d693bd845/src/assets/png/wechat_mobile.png -------------------------------------------------------------------------------- /src/assets/svg/QrCode.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/svg/add.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/svg/audit.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/svg/authClient.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/svg/data.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/svg/datasource.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/svg/db.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/svg/dept.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/svg/dev.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/svg/dict.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/svg/down.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/svg/download.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/svg/edit.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/svg/email.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/svg/eye-open.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/svg/eye.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/svg/form.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/svg/gen.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/svg/genCode.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/svg/gender.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/svg/hamburger-closed.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/svg/hamburger-opened.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/svg/home.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/svg/idcard.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/svg/language.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/svg/left.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/svg/loadFailed.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/svg/loginLogs.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/svg/material.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/svg/menus.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/svg/message.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/svg/mobile.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/svg/permission.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/svg/publish.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/svg/qq.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/svg/red-point.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/svg/right.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/svg/route.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/svg/screenfull-exit.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/svg/screenfull.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/svg/security.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/svg/tenant.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/svg/theme.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/svg/up.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/svg/video.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/svg/wechat.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/svg/woman.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/components/XhBreadcrumb/index.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * MIT License 3 | * Copyright <2021-2022> 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 copies 9 | * of the Software, and to permit persons to whom the Software is furnished to do so, 10 | * 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 IMPLIED, 16 | * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A 17 | * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 18 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF 19 | * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE 20 | * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | * @Author: Sinda 22 | * @Email: xhuicloud@163.com 23 | */ 24 | 25 | import xhBreadcrumb from './breadcrumb.vue' 26 | 27 | import { withInstall } from '@/utils/install' 28 | 29 | export const XhBreadcrumb = withInstall(xhBreadcrumb, 'XhBreadcrumb') 30 | 31 | export { xhBreadcrumb } 32 | 33 | export default XhBreadcrumb 34 | -------------------------------------------------------------------------------- /src/components/XhCard/index.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * MIT License 3 | * Copyright <2021-2022> 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 copies 9 | * of the Software, and to permit persons to whom the Software is furnished to do so, 10 | * 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 IMPLIED, 16 | * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A 17 | * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 18 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF 19 | * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE 20 | * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | * @Author: Sinda 22 | * @Email: xhuicloud@163.com 23 | */ 24 | 25 | import xhCard from './card.vue' 26 | 27 | import { withInstall } from '@/utils/install' 28 | 29 | export const XhCard = withInstall(xhCard, 'XhCard') 30 | 31 | export { xhCard } 32 | 33 | export default XhCard 34 | -------------------------------------------------------------------------------- /src/components/XhCharts/index.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * MIT License 3 | * Copyright <2021-2022> 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 copies 9 | * of the Software, and to permit persons to whom the Software is furnished to do so, 10 | * 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 IMPLIED, 16 | * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A 17 | * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 18 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF 19 | * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE 20 | * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | * @Author: Sinda 22 | * @Email: xhuicloud@163.com 23 | */ 24 | 25 | import xhCharts from './charts.vue' 26 | 27 | import { withInstall } from '@/utils/install' 28 | 29 | export const XhCharts = withInstall(xhCharts, 'XhCharts') 30 | 31 | export { xhCharts } 32 | 33 | export default XhCharts 34 | -------------------------------------------------------------------------------- /src/components/XhDraggable/index.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * MIT License 3 | * Copyright <2021-2022> 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 copies 9 | * of the Software, and to permit persons to whom the Software is furnished to do so, 10 | * 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 IMPLIED, 16 | * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A 17 | * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 18 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF 19 | * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE 20 | * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | * @Author: Sinda 22 | * @Email: xhuicloud@163.com 23 | */ 24 | 25 | import xhDraggable from './draggable.vue' 26 | 27 | import { withInstall } from '@/utils/install' 28 | 29 | export const XhDraggable = withInstall(xhDraggable, 'XhDraggable') 30 | 31 | export { xhDraggable } 32 | 33 | export default XhDraggable 34 | -------------------------------------------------------------------------------- /src/components/XhEditor/index.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * MIT License 3 | * Copyright <2021-2022> 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 copies 9 | * of the Software, and to permit persons to whom the Software is furnished to do so, 10 | * 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 IMPLIED, 16 | * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A 17 | * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 18 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF 19 | * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE 20 | * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | * @Author: Sinda 22 | * @Email: xhuicloud@163.com 23 | */ 24 | 25 | import xhEditor from './index.vue' 26 | 27 | import { withInstall } from '@/utils/install' 28 | 29 | export const XhEditor = withInstall(xhEditor, 'XhEditor') 30 | 31 | export { xhEditor } 32 | 33 | export default XhEditor 34 | -------------------------------------------------------------------------------- /src/components/XhForm/form-action.ts: -------------------------------------------------------------------------------- 1 | import { ColProps } from 'element-plus' 2 | import { ExtractPropTypes, PropType } from 'vue' 3 | 4 | export const formActionButtonGroupProps = { 5 | col: { 6 | type: Object as PropType 7 | }, 8 | show: { 9 | type: Boolean as PropType 10 | }, 11 | // 搜索按钮 12 | showSearchButton: { 13 | type: Boolean as PropType 14 | }, 15 | // 收起展开按钮 16 | showShowUpButton: { 17 | type: Boolean as PropType 18 | }, 19 | // 重置按钮属性 20 | showResetButton: { 21 | type: Boolean as PropType 22 | } 23 | } 24 | 25 | export type FormActionButtonGroupProps = ExtractPropTypes 26 | -------------------------------------------------------------------------------- /src/components/XhForm/form-action.vue: -------------------------------------------------------------------------------- 1 | 23 | 29 | 34 | -------------------------------------------------------------------------------- /src/components/XhForm/hooks/index.ts: -------------------------------------------------------------------------------- 1 | import type { UseFormState } from './useFormState' 2 | import type { UseFormMethods } from './useFormMethods' 3 | import type { UseFormItem } from './useFormItem' 4 | import type { FormProps } from '../form' 5 | import XhForm from '../index.vue' 6 | 7 | export * from './useFormState' 8 | export * from './useFormItem' 9 | export * from './useFormMethods' 10 | 11 | export type FormType = FormProps & UseFormState & UseFormMethods & UseFormItem 12 | export type XhFormInstance = InstanceType 13 | -------------------------------------------------------------------------------- /src/components/XhForm/hooks/useFormContext.ts: -------------------------------------------------------------------------------- 1 | import { provide, inject } from 'vue' 2 | import type { FormType } from '.' 3 | 4 | const key = Symbol('xh-form') 5 | 6 | export function createFormContext(instance: FormType) { 7 | provide(key, instance) 8 | } 9 | 10 | export function useFormContext() { 11 | return inject(key) as FormType 12 | } 13 | -------------------------------------------------------------------------------- /src/components/XhForm/hooks/useFormMethods.ts: -------------------------------------------------------------------------------- 1 | import { unref } from 'vue' 2 | import { FormProps, FormEmitsFn } from '../form' 3 | import { UseFormState } from './useFormState' 4 | 5 | interface UseFormMethodsContext { 6 | state: UseFormState 7 | emit: FormEmitsFn 8 | } 9 | export const useFormMethods = ({ state, emit }: UseFormMethodsContext) => { 10 | const { innerFormPropsRef, showUpRef, formModelRef } = state 11 | 12 | const setProps = (props: Partial) => { 13 | innerFormPropsRef.value = { ...unref(innerFormPropsRef), ...props } 14 | } 15 | 16 | /** 17 | * 展示 false 收起 true 18 | * 收起时候展示前三个 小于3个不展示 19 | * @param showUpRef 20 | */ 21 | const showOrUp = () => { 22 | let defaultShowNum = 0 23 | for (const schema of unref(innerFormPropsRef).schemas!) { 24 | if (unref(showUpRef) && defaultShowNum++ < 3) { 25 | continue 26 | } 27 | schema.show = unref(showUpRef) 28 | } 29 | } 30 | 31 | /** 32 | * 去重置 33 | */ 34 | const toReset = () => { 35 | formModelRef.value = {} 36 | } 37 | 38 | /** 39 | * 展开折叠 40 | */ 41 | const toShowUp = () => { 42 | showUpRef.value = !showUpRef.value 43 | showOrUp() 44 | } 45 | 46 | /** 47 | * 去搜索 48 | */ 49 | const toSearch = () => { 50 | emit('search', formModelRef.value) 51 | } 52 | 53 | return { 54 | setProps, 55 | toSearch, 56 | toReset, 57 | toShowUp 58 | } 59 | } 60 | 61 | export type UseFormMethods = ReturnType 62 | -------------------------------------------------------------------------------- /src/components/XhForm/hooks/useFormState.ts: -------------------------------------------------------------------------------- 1 | import { cloneDeep } from 'lodash-es' 2 | import { ref, computed } from 'vue' 3 | import FormProps from '../form' 4 | 5 | export type UseFormContext = { 6 | props: FormProps 7 | attrs: Data 8 | } 9 | 10 | export const useFormState = ({ props, attrs }: UseFormContext) => { 11 | const innerFormPropsRef = ref(cloneDeep(props)) 12 | // 展示/折叠 13 | const showUpRef = ref(false) 14 | 15 | // 表单数据 16 | const formModelRef = ref({ ...props.model }) 17 | 18 | // 表单原始数据 19 | const resourceFormModelRef = ref({ ...props.model }) 20 | 21 | const getBindValue = computed(() => ({ ...attrs, ...props } as FormProps)) 22 | 23 | return { 24 | showUpRef, 25 | getBindValue, 26 | formModelRef, 27 | innerFormPropsRef, 28 | resourceFormModelRef 29 | } 30 | } 31 | 32 | export type UseFormState = ReturnType 33 | -------------------------------------------------------------------------------- /src/components/XhForm/index.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * MIT License 3 | * Copyright <2021-2022> 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 copies 9 | * of the Software, and to permit persons to whom the Software is furnished to do so, 10 | * 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 IMPLIED, 16 | * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A 17 | * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 18 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF 19 | * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE 20 | * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | * @Author: Sinda 22 | * @Email: xhuicloud@163.com 23 | */ 24 | 25 | import xhForm from './index.vue' 26 | 27 | import { withInstall } from '@/utils/install' 28 | 29 | export const XhForm = withInstall(xhForm, 'XhForm') 30 | 31 | export { xhForm } 32 | 33 | export default XhForm 34 | -------------------------------------------------------------------------------- /src/components/XhForm/src/checkBoxGroup/CheckBoxGroup.vue: -------------------------------------------------------------------------------- 1 | 8 | 15 | 16 | -------------------------------------------------------------------------------- /src/components/XhForm/src/datePicker/datePickerProps.ts: -------------------------------------------------------------------------------- 1 | import { timePickerDefaultProps } from 'element-plus' 2 | import { ExtractPropTypes } from 'vue' 3 | 4 | /** 输入框 **/ 5 | export const datePickViewProps = { 6 | ...timePickerDefaultProps 7 | } 8 | export type DatePickViewProps = Partial> 9 | -------------------------------------------------------------------------------- /src/components/XhForm/src/input/inputNumberProps.ts: -------------------------------------------------------------------------------- 1 | import { inputNumberProps } from 'element-plus' 2 | import { ExtractPropTypes } from 'vue' 3 | 4 | export type InputNumberProps = ExtractPropTypes 5 | -------------------------------------------------------------------------------- /src/components/XhForm/src/input/inputProps.ts: -------------------------------------------------------------------------------- 1 | import { Component, ExtractPropTypes, PropType } from 'vue' 2 | 3 | /** 输入框 **/ 4 | export const inputViewProps = { 5 | modelValue: { 6 | type: [Number, String] as PropType, 7 | default: '' 8 | }, 9 | placeholder: { 10 | type: String, 11 | default: '' 12 | }, 13 | disabled: Boolean, 14 | autosize: { 15 | type: Boolean as PropType 16 | }, 17 | clearable: { 18 | type: Boolean, 19 | default: false 20 | }, 21 | showPassword: { 22 | type: Boolean, 23 | default: false 24 | }, 25 | suffixIcon: { 26 | type: Object as PropType, 27 | default: '' 28 | }, 29 | prefixIcon: { 30 | type: String as PropType, 31 | default: '' 32 | }, 33 | size: { 34 | type: String as PropType<'large' | 'default' | 'small'>, 35 | default: 'default' 36 | }, 37 | type: { 38 | type: String as PropType<'textarea'>, 39 | default: '' 40 | }, 41 | rows: { 42 | type: Number as PropType 43 | }, 44 | maxlength: { 45 | type: Number as PropType 46 | }, 47 | minlength: { 48 | type: Number as PropType 49 | }, 50 | showWordLimit: { 51 | type: Boolean as PropType, 52 | default: false 53 | }, 54 | formatter: { 55 | type: Function 56 | }, 57 | parser: { 58 | type: Function 59 | } 60 | } 61 | 62 | export type InputViewProps = Partial> 63 | /** 输入框 **/ 64 | -------------------------------------------------------------------------------- /src/components/XhForm/src/radioGroup/RadioButtonGroup.vue: -------------------------------------------------------------------------------- 1 | 8 | 15 | 16 | -------------------------------------------------------------------------------- /src/components/XhForm/src/radioGroup/index.ts: -------------------------------------------------------------------------------- 1 | import { useSizeProp } from 'element-plus' 2 | import { ExtractPropTypes, PropType } from 'vue' 3 | 4 | export type OptionsItem = { label: string | number; value: string | number; disabled?: boolean; name: string } 5 | const radioButtonGroupProps = { 6 | id: { 7 | type: String, 8 | default: undefined 9 | }, 10 | size: useSizeProp, 11 | disabled: Boolean, 12 | modelValue: { 13 | type: [String, Number, Boolean], 14 | default: '' 15 | }, 16 | fill: { 17 | type: String, 18 | default: '' 19 | }, 20 | label: { 21 | type: String, 22 | default: undefined 23 | }, 24 | textColor: { 25 | type: String, 26 | default: '' 27 | }, 28 | name: { 29 | type: String, 30 | default: undefined 31 | }, 32 | options: { 33 | type: Array as PropType, 34 | default: () => [] 35 | } 36 | } 37 | export type RadioProps = ExtractPropTypes 38 | export default radioButtonGroupProps 39 | -------------------------------------------------------------------------------- /src/components/XhForm/src/select/selectProps.ts: -------------------------------------------------------------------------------- 1 | import { ComponentSize } from 'element-plus' 2 | import { ExtractPropTypes, PropType } from 'vue' 3 | import { OptionsItem } from '../radioGroup' 4 | 5 | export type OptionCommon = { 6 | label: string 7 | } 8 | 9 | export type Option = OptionCommon & { 10 | value: T 11 | [prop: string]: any 12 | } 13 | 14 | export type OptionGroup = OptionCommon & { 15 | options: Array 16 | [prop: string]: any 17 | } 18 | 19 | export type OptionType = Option | OptionGroup 20 | 21 | /** 选择框 **/ 22 | export const selectViewProps = { 23 | modelValue: { 24 | type: [Array, String, Number, Boolean, Object], 25 | default: '' 26 | }, 27 | placeholder: { 28 | type: String, 29 | default: '' 30 | }, 31 | size: { 32 | type: String as PropType 33 | }, 34 | options: { 35 | type: Array as PropType, 36 | required: true 37 | } 38 | } 39 | 40 | export type SelectViewProps = Partial> 41 | /** 选择框 **/ 42 | -------------------------------------------------------------------------------- /src/components/XhForm/src/upload/imgUpload/index.vue: -------------------------------------------------------------------------------- 1 | 9 | 40 | 41 | -------------------------------------------------------------------------------- /src/components/XhHamburger/index.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * MIT License 3 | * Copyright <2021-2022> 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 copies 9 | * of the Software, and to permit persons to whom the Software is furnished to do so, 10 | * 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 IMPLIED, 16 | * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A 17 | * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 18 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF 19 | * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE 20 | * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | * @Author: Sinda 22 | * @Email: xhuicloud@163.com 23 | */ 24 | 25 | import xhHamburger from './hamburger.vue' 26 | 27 | import { withInstall } from '@/utils/install' 28 | 29 | export const XhHamburger = withInstall(xhHamburger, 'XhHamburger') 30 | 31 | export { xhHamburger } 32 | 33 | export default XhHamburger 34 | -------------------------------------------------------------------------------- /src/components/XhIconView/index.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * MIT License 3 | * Copyright <2021-2022> 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 copies 9 | * of the Software, and to permit persons to whom the Software is furnished to do so, 10 | * 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 IMPLIED, 16 | * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A 17 | * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 18 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF 19 | * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE 20 | * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | * @Author: Sinda 22 | * @Email: xhuicloud@163.com 23 | */ 24 | 25 | import xhIconView from './iconView.vue' 26 | 27 | import { withInstall } from '@/utils/install' 28 | 29 | export const XhIconView = withInstall(xhIconView, 'XhIconView') 30 | 31 | export { xhIconView } 32 | 33 | export default XhIconView 34 | -------------------------------------------------------------------------------- /src/components/XhLangSelect/index.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * MIT License 3 | * Copyright <2021-2022> 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 copies 9 | * of the Software, and to permit persons to whom the Software is furnished to do so, 10 | * 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 IMPLIED, 16 | * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A 17 | * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 18 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF 19 | * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE 20 | * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | * @Author: Sinda 22 | * @Email: xhuicloud@163.com 23 | */ 24 | 25 | import xhLangSelect from './langSelect.vue' 26 | 27 | import { withInstall } from '@/utils/install' 28 | 29 | export const XhLangSelect = withInstall(xhLangSelect, 'XhLangSelect') 30 | 31 | export { xhLangSelect } 32 | 33 | export default XhLangSelect 34 | -------------------------------------------------------------------------------- /src/components/XhMessage/index.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * MIT License 3 | * Copyright <2021-2022> 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 copies 9 | * of the Software, and to permit persons to whom the Software is furnished to do so, 10 | * 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 IMPLIED, 16 | * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A 17 | * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 18 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF 19 | * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE 20 | * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | * @Author: Sinda 22 | * @Email: xhuicloud@163.com 23 | */ 24 | 25 | import xhMessage from './message.vue' 26 | 27 | import { withInstall } from '@/utils/install' 28 | 29 | export const XhMessage = withInstall(xhMessage, 'XhMessage') 30 | 31 | export { xhMessage } 32 | 33 | export default XhMessage 34 | -------------------------------------------------------------------------------- /src/components/XhScreenfull/index.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * MIT License 3 | * Copyright <2021-2022> 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 copies 9 | * of the Software, and to permit persons to whom the Software is furnished to do so, 10 | * 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 IMPLIED, 16 | * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A 17 | * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 18 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF 19 | * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE 20 | * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | * @Author: Sinda 22 | * @Email: xhuicloud@163.com 23 | */ 24 | 25 | import xhScreenfull from './screenfull.vue' 26 | 27 | import { withInstall } from '@/utils/install' 28 | 29 | export const XhScreenfull = withInstall(xhScreenfull, 'XhScreenfull') 30 | 31 | export { xhScreenfull } 32 | 33 | export default XhScreenfull 34 | -------------------------------------------------------------------------------- /src/components/XhSettingSelect/index.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * MIT License 3 | * Copyright <2021-2022> 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 copies 9 | * of the Software, and to permit persons to whom the Software is furnished to do so, 10 | * 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 IMPLIED, 16 | * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A 17 | * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 18 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF 19 | * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE 20 | * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | * @Author: Sinda 22 | * @Email: xhuicloud@163.com 23 | */ 24 | 25 | import xhSettingSelect from './settingSelect.vue' 26 | 27 | import { withInstall } from '@/utils/install' 28 | 29 | export const XhSettingSelect = withInstall(xhSettingSelect, 'XhSettingSelect') 30 | 31 | export { xhSettingSelect } 32 | 33 | export default XhSettingSelect 34 | -------------------------------------------------------------------------------- /src/components/XhSidebar/MenuItem.vue: -------------------------------------------------------------------------------- 1 | 24 | 25 | 30 | 31 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /src/components/XhSidebar/index.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * MIT License 3 | * Copyright <2021-2022> 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 copies 9 | * of the Software, and to permit persons to whom the Software is furnished to do so, 10 | * 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 IMPLIED, 16 | * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A 17 | * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 18 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF 19 | * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE 20 | * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | * @Author: Sinda 22 | * @Email: xhuicloud@163.com 23 | */ 24 | 25 | import menuItem from './MenuItem.vue' 26 | import sidebarItem from './SidebarItem.vue' 27 | import sidebarMenu from './SidebarMenu.vue' 28 | 29 | import { withInstall } from '@/utils/install' 30 | 31 | export const MenuItem = withInstall(menuItem, 'MenuItem') 32 | export const SidebarItem = withInstall(sidebarItem, 'SidebarItem') 33 | export const SidebarMenu = withInstall(sidebarMenu, 'SidebarMenu') 34 | 35 | export default { MenuItem, SidebarItem, SidebarMenu } 36 | -------------------------------------------------------------------------------- /src/components/XhSvg/index.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * MIT License 3 | * Copyright <2021-2022> 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 copies 9 | * of the Software, and to permit persons to whom the Software is furnished to do so, 10 | * 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 IMPLIED, 16 | * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A 17 | * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 18 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF 19 | * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE 20 | * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | * @Author: Sinda 22 | * @Email: xhuicloud@163.com 23 | */ 24 | 25 | import xhSvg from './index.vue' 26 | 27 | import { withInstall } from '@/utils/install' 28 | 29 | export const XhSvg = withInstall(xhSvg, 'XhSvg') 30 | 31 | export { xhSvg } 32 | 33 | export default XhSvg 34 | -------------------------------------------------------------------------------- /src/components/XhTable/crud-form.vue: -------------------------------------------------------------------------------- 1 | 26 | 57 | 58 | -------------------------------------------------------------------------------- /src/components/XhTable/crud-head-operation.vue: -------------------------------------------------------------------------------- 1 | 39 | 40 | 50 | 51 | -------------------------------------------------------------------------------- /src/components/XhTable/crud-row-operation.vue: -------------------------------------------------------------------------------- 1 | 22 | 38 | 39 | -------------------------------------------------------------------------------- /src/components/XhTable/hooks/index.ts: -------------------------------------------------------------------------------- 1 | import type { TableProps } from '../crud' 2 | import type { TableState } from './useTableState' 3 | import type { TableMethods } from './useTableMethods' 4 | import type { TableForm } from './useTableForm' 5 | import Crud from '../crud.vue' 6 | 7 | export * from './useTableState' 8 | export * from './useTableContext' 9 | export * from './useTableMethods' 10 | export * from './useTableForm' 11 | 12 | export type XhTableType = TableProps & TableState & TableMethods & TableForm 13 | export type CrudInstance = InstanceType 14 | -------------------------------------------------------------------------------- /src/components/XhTable/hooks/useTableContext.ts: -------------------------------------------------------------------------------- 1 | import { provide, inject } from 'vue' 2 | import type { XhTableType } from '.' 3 | 4 | const key = Symbol('Crud') 5 | 6 | export function createTableContext(instance: XhTableType) { 7 | provide(key, instance) 8 | } 9 | 10 | export function useTableContext() { 11 | return inject(key) as XhTableType 12 | } 13 | -------------------------------------------------------------------------------- /src/components/XhTable/hooks/useTableState.ts: -------------------------------------------------------------------------------- 1 | import { isNullOrUnDef, isEmptyObject } from '@/utils/is' 2 | import { computed, ref, unref, watchEffect } from 'vue' 3 | import { TableProps } from '../crud' 4 | import { Pagination } from '../pagination' 5 | 6 | export type TableState = ReturnType 7 | /** 8 | * 表格状态 9 | * 10 | * @param props 11 | * @returns 12 | */ 13 | export const useTableState = (props: TableProps) => { 14 | const tableData = ref([]) 15 | const paginationRef = ref(props.page) 16 | const tableDrawer = ref(false) 17 | const innerPropsRef = ref>() 18 | const dialogVisible = ref(false) 19 | const dialogTitle = ref('create') 20 | 21 | watchEffect(() => { 22 | // 传入了data 23 | if (!isNullOrUnDef(props.data)) { 24 | tableData.value = props.data 25 | } 26 | // 开启分页 27 | if (!isNullOrUnDef(props.page) && !isEmptyObject(unref(paginationRef))) { 28 | paginationRef.value = { 29 | total: tableData.value.length, 30 | pageSizes: [10, 20, 30, 40], 31 | layout: 'total, sizes, prev, pager, next, jumper', 32 | background: true, 33 | ...props.page 34 | } 35 | } 36 | }) 37 | 38 | /** 39 | * 维护一个可修改的props 40 | */ 41 | const getProps = computed(() => { 42 | return { ...props, ...unref(innerPropsRef) } 43 | }) 44 | 45 | return { 46 | getProps, 47 | tableData, 48 | tableDrawer, 49 | paginationRef, 50 | // 是否分页 51 | enablePagination: !isNullOrUnDef(paginationRef.value.pageSizes), 52 | innerPropsRef, 53 | dialogVisible, 54 | dialogTitle 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /src/components/XhTable/pagination.ts: -------------------------------------------------------------------------------- 1 | import { ExtractPropTypes, PropType } from 'vue' 2 | 3 | const paginationProps = { 4 | current: { 5 | type: Number as PropType, 6 | default: 1 7 | }, 8 | size: { 9 | type: Number as PropType, 10 | default: 10 11 | }, 12 | total: { 13 | type: Number as PropType, 14 | default: 0 15 | }, 16 | layout: { 17 | type: String as PropType 18 | }, 19 | background: { 20 | type: Boolean as PropType 21 | }, 22 | pageSizes: { 23 | type: Array as PropType 24 | }, 25 | handleSizeChange: { 26 | type: Function as PropType<(val: number) => void> 27 | }, 28 | handleCurrentChange: { 29 | type: Function as PropType<(val: number) => void> 30 | } 31 | } 32 | export type Pagination = Partial> 33 | 34 | export default paginationProps 35 | -------------------------------------------------------------------------------- /src/components/XhTagView/index.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * MIT License 3 | * Copyright <2021-2022> 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 copies 9 | * of the Software, and to permit persons to whom the Software is furnished to do so, 10 | * 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 IMPLIED, 16 | * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A 17 | * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 18 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF 19 | * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE 20 | * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | * @Author: Sinda 22 | * @Email: xhuicloud@163.com 23 | */ 24 | 25 | import xhTagView from './tagView.vue' 26 | 27 | import { withInstall } from '@/utils/install' 28 | 29 | export const XhTagView = withInstall(xhTagView, 'XhTagView') 30 | 31 | export { xhTagView } 32 | 33 | export default XhTagView 34 | -------------------------------------------------------------------------------- /src/components/XhThemeSelect/index.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * MIT License 3 | * Copyright <2021-2022> 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 copies 9 | * of the Software, and to permit persons to whom the Software is furnished to do so, 10 | * 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 IMPLIED, 16 | * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A 17 | * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 18 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF 19 | * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE 20 | * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | * @Author: Sinda 22 | * @Email: xhuicloud@163.com 23 | */ 24 | 25 | import xhThemeSelect from './themeSelect.vue' 26 | 27 | import { withInstall } from '@/utils/install' 28 | 29 | export const XhThemeSelect = withInstall(xhThemeSelect, 'XhThemeSelect') 30 | 31 | export { xhThemeSelect } 32 | 33 | export default XhThemeSelect 34 | -------------------------------------------------------------------------------- /src/components/XhVerifition/api/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * 此处可直接引用自己项目封装好的 axios 配合后端联调 3 | */ 4 | 5 | import request from './../utils/axios' 6 | 7 | //获取验证图片 以及token 8 | export function reqGet(data) { 9 | return request({ 10 | url: '/captcha/get', 11 | method: 'post', 12 | data 13 | }) 14 | } 15 | 16 | //滑动或者点选验证 17 | export function reqCheck(data) { 18 | return request({ 19 | url: '/captcha/check', 20 | method: 'post', 21 | params: data 22 | }) 23 | } 24 | -------------------------------------------------------------------------------- /src/components/XhVerifition/utils/ase.js: -------------------------------------------------------------------------------- 1 | import CryptoJS from 'crypto-js' 2 | /** 3 | * @word 要加密的内容 4 | * @keyWord String 服务器随机返回的关键字 5 | * */ 6 | export function aesEncrypt(word, keyWord = 'XwKsGlMcdPMEhR1B') { 7 | var key = CryptoJS.enc.Utf8.parse(keyWord) 8 | var srcs = CryptoJS.enc.Utf8.parse(word) 9 | var encrypted = CryptoJS.AES.encrypt(srcs, key, { mode: CryptoJS.mode.ECB, padding: CryptoJS.pad.Pkcs7 }) 10 | return encrypted.toString() 11 | } 12 | -------------------------------------------------------------------------------- /src/components/XhVerifition/utils/axios.js: -------------------------------------------------------------------------------- 1 | import axios from 'axios' 2 | 3 | axios.defaults.baseURL = import.meta.env.VITE_BASE_API 4 | 5 | const service = axios.create({ 6 | timeout: 40000, 7 | headers: { 8 | 'X-Requested-With': 'XMLHttpRequest', 9 | 'Content-Type': 'application/json; charset=UTF-8' 10 | } 11 | }) 12 | service.interceptors.request.use( 13 | (config) => { 14 | return config 15 | }, 16 | (error) => { 17 | Promise.reject(error) 18 | } 19 | ) 20 | 21 | // response interceptor 22 | service.interceptors.response.use((response) => { 23 | const res = response.data 24 | return res 25 | }) 26 | export default service 27 | -------------------------------------------------------------------------------- /src/components/component.ts: -------------------------------------------------------------------------------- 1 | export * from './XhBreadcrumb' 2 | export * from './XhCard' 3 | export * from './XhCharts' 4 | export * from './XhDraggable' 5 | export * from './XhForm' 6 | export * from './XhHamburger' 7 | export * from './XhIconView' 8 | export * from './XhLangSelect' 9 | export * from './XhMessage' 10 | export * from './XhScreenfull' 11 | export * from './XhSettingSelect' 12 | export * from './XhSvg' 13 | export * from './XhTagView' 14 | export * from './XhThemeSelect' 15 | export * from './XhEditor' 16 | -------------------------------------------------------------------------------- /src/components/default.ts: -------------------------------------------------------------------------------- 1 | import type { Plugin } from 'vue' 2 | 3 | import { XhBreadcrumb } from './XhBreadcrumb' 4 | import { XhCard } from './XhCard' 5 | import { XhCharts } from './XhCharts' 6 | import { XhDraggable } from './XhDraggable' 7 | import { XhForm } from './XhForm' 8 | import { XhHamburger } from './XhHamburger' 9 | import { XhIconView } from './XhIconView' 10 | import { XhLangSelect } from './XhLangSelect' 11 | import { XhMessage } from './XhMessage' 12 | import { XhScreenfull } from './XhScreenfull' 13 | import { XhSettingSelect } from './XhSettingSelect' 14 | import { XhSvg } from './XhSvg' 15 | import { XhTagView } from './XhTagView' 16 | import { XhThemeSelect } from './XhThemeSelect' 17 | import { XhEditor } from './XhEditor' 18 | 19 | export default [ 20 | XhBreadcrumb, 21 | XhCard, 22 | XhCharts, 23 | XhDraggable, 24 | XhForm, 25 | XhHamburger, 26 | XhIconView, 27 | XhLangSelect, 28 | XhMessage, 29 | XhScreenfull, 30 | XhSettingSelect, 31 | XhSvg, 32 | XhTagView, 33 | XhThemeSelect, 34 | XhEditor 35 | ] as Plugin[] 36 | -------------------------------------------------------------------------------- /src/components/index.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * MIT License 3 | * Copyright <2021-2022> 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 copies 9 | * of the Software, and to permit persons to whom the Software is furnished to do so, 10 | * 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 IMPLIED, 16 | * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A 17 | * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 18 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF 19 | * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE 20 | * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | * @Author: Sinda 22 | * @Email: xhuicloud@163.com 23 | */ 24 | import { makeInstaller } from '@/utils/install' 25 | import Components from './default' 26 | const installer = makeInstaller(Components) 27 | 28 | export const install = installer.install 29 | export default installer 30 | -------------------------------------------------------------------------------- /src/config/theme.config.js: -------------------------------------------------------------------------------- 1 | /* 2 | * MIT License 3 | * Copyright <2021-2022> 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 copies 9 | * of the Software, and to permit persons to whom the Software is furnished to do so, 10 | * 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 IMPLIED, 16 | * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A 17 | * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 18 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF 19 | * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE 20 | * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | * @Author: Sinda 22 | * @Email: xhuicloud@163.com 23 | */ 24 | 25 | const theme = { 26 | themeColor: '#409eff', 27 | themeKey: 'theme', 28 | sidebarLogo: 'sidebarLogo', 29 | cardStyle: 'cardStyle' 30 | } 31 | 32 | export default theme 33 | -------------------------------------------------------------------------------- /src/hooks/useEventListener.ts: -------------------------------------------------------------------------------- 1 | import { ref, watch, unref, type Ref } from 'vue' 2 | import { useThrottleFn, useDebounceFn } from '@vueuse/core' 3 | 4 | export type RemoveEventFn = () => void 5 | 6 | export interface UseEventParams { 7 | el?: Element | Ref | Window | any 8 | name: string 9 | listener: EventListener 10 | options?: boolean | AddEventListenerOptions 11 | autoRemove?: boolean 12 | isDebounce?: boolean 13 | wait?: number 14 | } 15 | 16 | export function useEventListener({ 17 | el = window, 18 | name, 19 | listener, 20 | options, 21 | autoRemove = true, 22 | isDebounce = true, 23 | wait = 80 24 | }: UseEventParams): { removeEvent: RemoveEventFn } { 25 | // eslint-disable-next-line @typescript-eslint/no-empty-function 26 | let remove: RemoveEventFn = () => {} 27 | const isAddRef = ref(false) 28 | 29 | if (el) { 30 | const element = ref(el as Element) as Ref 31 | 32 | const handler = isDebounce ? useDebounceFn(listener, wait) : useThrottleFn(listener, wait) 33 | const realHandler = wait ? handler : listener 34 | const removeEventListener = (e: Element) => { 35 | isAddRef.value = true 36 | e.removeEventListener(name, realHandler, options) 37 | } 38 | const addEventListener = (e: Element) => e.addEventListener(name, realHandler, options) 39 | 40 | const removeWatch = watch( 41 | element, 42 | (v, _ov, cleanUp) => { 43 | if (v) { 44 | !unref(isAddRef) && addEventListener(v) 45 | cleanUp(() => { 46 | autoRemove && removeEventListener(v) 47 | }) 48 | } 49 | }, 50 | { immediate: true } 51 | ) 52 | 53 | remove = () => { 54 | removeEventListener(element.value) 55 | removeWatch() 56 | } 57 | } 58 | return { removeEvent: remove } 59 | } 60 | -------------------------------------------------------------------------------- /src/hooks/useUploadFiles.ts: -------------------------------------------------------------------------------- 1 | import { FileApi } from '@/api/upms/file' 2 | import useStore from '@/store' 3 | import { ElMessage, UploadRawFile } from 'element-plus' 4 | 5 | const { user } = useStore() 6 | 7 | const headers = { Authorization: 'Bearer ' + user.getToken } 8 | 9 | export interface UseUploadFilesParams { 10 | fileType?: string[] 11 | fileSize?: number // 文件大小 默认不能超过2M 12 | actionUrl?: string // 请求地址 13 | } 14 | export function useUploadFiles({ 15 | fileType = ['image/png'], 16 | fileSize = 2, 17 | actionUrl = FileApi.FileUpload 18 | }: UseUploadFilesParams) { 19 | const beforeUpload = (rawFile: UploadRawFile) => { 20 | return checkFileType(rawFile) && checkFileSize(rawFile) 21 | } 22 | 23 | const checkFileType = (rawFile: UploadRawFile) => { 24 | const type: string[] = rawFile.name.split('.') 25 | const isFileType = fileType.indexOf(rawFile.type) >= 0 || fileType.indexOf(type[type.length - 1]) >= 0 26 | if (!isFileType) { 27 | ElMessage({ 28 | message: `上传的文件类型只能是${fileType.join(',')}格式!`, 29 | type: 'warning' 30 | }) 31 | } 32 | return isFileType 33 | } 34 | 35 | const checkFileSize = (rawFile: UploadRawFile) => { 36 | const isLt = rawFile.size / 1024 / 1024 < fileSize 37 | if (!isLt) { 38 | ElMessage({ 39 | message: `上传${fileType}大小不能超过 ${fileSize}MB!`, 40 | type: 'warning' 41 | }) 42 | } 43 | return isLt 44 | } 45 | return { 46 | headers, 47 | action: import.meta.env.VITE_BASE_API + actionUrl, 48 | beforeUpload, 49 | pathPrefix: import.meta.env.VITE_OSS_DOMAIN 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /src/i18n/README.md: -------------------------------------------------------------------------------- 1 | ### 国际化配置 2 | 3 | #### 新增语言 4 | 1 语言包只需要添加到 locale目录下 5 | 6 | 2 在XhLangSelect 组件下新增 7 | ``` 8 | 你的语言包 9 | ``` 10 | 11 | -------------------------------------------------------------------------------- /src/i18n/index.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * MIT License 3 | * Copyright <2021-2022> 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 copies 9 | * of the Software, and to permit persons to whom the Software is furnished to do so, 10 | * 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 IMPLIED, 16 | * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A 17 | * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 18 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF 19 | * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE 20 | * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | * @Author: Sinda 22 | * @Email: xhuicloud@163.com 23 | */ 24 | 25 | import { Composer, createI18n } from 'vue-i18n' 26 | import { storageLocal } from '@/utils/storage' 27 | import messages from '@intlify/vite-plugin-vue-i18n/messages' 28 | import setting from '@/config/setting.config' 29 | 30 | const locale = storageLocal.getItem(setting.languageKey) || setting.language 31 | 32 | const i18n = createI18n({ 33 | locale, 34 | fallbackLocale: 'zhCn', 35 | // 使用了composition api 36 | legacy: false, 37 | // 全局使用 转换函数 38 | globalInjection: true, 39 | messages 40 | }) 41 | const global = i18n.global as Composer 42 | export default i18n 43 | export { global } 44 | -------------------------------------------------------------------------------- /src/layout/AppMain/index.vue: -------------------------------------------------------------------------------- 1 | 24 | 25 | 36 | 37 | 38 | 39 | 48 | -------------------------------------------------------------------------------- /src/main.ts: -------------------------------------------------------------------------------- 1 | import { createApp } from 'vue' 2 | import App from './App.vue' 3 | import router from '@/router' 4 | import XhComponents from '@/components' 5 | 6 | import { createPinia } from 'pinia' 7 | import i18n from '@/i18n' 8 | import 'virtual:svg-icons-register' // 导入svg注册脚本 9 | 10 | import 'element-plus/theme-chalk/src/index.scss' 11 | import '@/styles/index.scss' // global css 12 | 13 | import '@/permission' 14 | import * as ElIcons from '@element-plus/icons-vue' 15 | 16 | const app = createApp(App) 17 | 18 | // 全局注册el-icon 19 | Object.keys(ElIcons).forEach((key) => { 20 | app.component(key, (ElIcons as any)[key]) 21 | }) 22 | 23 | app.use(createPinia()) 24 | app.use(XhComponents) 25 | app.use(router) 26 | app.use(i18n) 27 | app.mount('#app') 28 | -------------------------------------------------------------------------------- /src/router/index.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * MIT License 3 | * Copyright <2021-2022> 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 copies 9 | * of the Software, and to permit persons to whom the Software is furnished to do so, 10 | * 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 IMPLIED, 16 | * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A 17 | * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 18 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF 19 | * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE 20 | * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | * @Author: Sinda 22 | * @Email: xhuicloud@163.com 23 | */ 24 | 25 | import { Router, createRouter } from 'vue-router' 26 | import { historyMode } from '@/utils/route' 27 | import commonsRoutes from './commons' 28 | // 创建路由 29 | export const router: Router = createRouter({ 30 | history: historyMode(), 31 | routes: commonsRoutes, 32 | strict: true, 33 | scrollBehavior(to, from, savedPosition) { 34 | return new Promise((resolve) => { 35 | if (savedPosition && to.meta.keepAlive) { 36 | return savedPosition 37 | } else { 38 | if (from.meta.saveSrollTop) { 39 | const top: number = document.documentElement.scrollTop || document.body.scrollTop 40 | resolve({ left: 0, top }) 41 | } 42 | } 43 | }) 44 | } 45 | }) 46 | 47 | export default router 48 | -------------------------------------------------------------------------------- /src/router/types.ts: -------------------------------------------------------------------------------- 1 | import { RouteLocationNormalized } from 'vue-router' 2 | 3 | export interface toRouteType extends RouteLocationNormalized { 4 | meta: { 5 | title?: string 6 | icon?: string 7 | internationalization?: string 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/store/index.ts: -------------------------------------------------------------------------------- 1 | import useUserStore from '@/store/modules/user' 2 | import useAppStore from '@/store/modules/app' 3 | import useThemeStore from '@/store/modules/theme' 4 | import usePermissionStore from '@/store/modules/permission' 5 | 6 | const useStore = () => ({ 7 | user: useUserStore(), 8 | app: useAppStore(), 9 | theme: useThemeStore(), 10 | permission: usePermissionStore() 11 | }) 12 | 13 | export default useStore 14 | -------------------------------------------------------------------------------- /src/styles/element.scss: -------------------------------------------------------------------------------- 1 | /*! 2 | * MIT License 3 | * Copyright <2021-2022> 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 copies 9 | * of the Software, and to permit persons to whom the Software is furnished to do so, 10 | * 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 IMPLIED, 16 | * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A 17 | * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 18 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF 19 | * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE 20 | * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | * @Author: Sinda 22 | * @Email: xhuicloud@163.com 23 | */ 24 | 25 | .el-avatar { 26 | --el-avatar-background-color: none; 27 | } 28 | 29 | .el-input { 30 | --el-input-height: 30px !important; 31 | } 32 | .el-input__wrapper { 33 | --el-input-inner-height: 30px !important; 34 | } 35 | 36 | .el-table th { 37 | word-break: break-word; 38 | color: black; 39 | } 40 | .el-date-editor { 41 | --el-date-editor-width: 230px !important; 42 | height: 32px !important; 43 | } 44 | .el-table__header { 45 | --el-table-header-bg-color: #fafafa; 46 | } 47 | .el-select-dropdown { 48 | min-width: 230px !important; 49 | } 50 | @media screen and (max-width: 992px) { 51 | .el-dialog, 52 | .el-message-box { 53 | width: 98% !important; 54 | } 55 | } 56 | 57 | .topDialog { 58 | margin-top: 2px !important; 59 | } 60 | -------------------------------------------------------------------------------- /src/styles/index.scss: -------------------------------------------------------------------------------- 1 | @import './mixin.scss'; 2 | @import './sidebar.scss'; 3 | @import './tag.scss'; 4 | @import './element.scss'; 5 | @import './transition.scss'; 6 | @import './media.scss'; 7 | 8 | html { 9 | height: 100%; 10 | box-sizing: border-box; 11 | } 12 | 13 | body { 14 | @include scrollBar; 15 | 16 | height: 100%; 17 | margin: 0; 18 | padding: 0; 19 | -moz-osx-font-smoothing: grayscale; 20 | -webkit-font-smoothing: antialiased; 21 | text-rendering: optimizeLegibility; 22 | font-family: Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB, Microsoft YaHei, Arial, sans-serif; 23 | 24 | div { 25 | @include scrollBar; 26 | } 27 | } 28 | 29 | #app { 30 | height: 100%; 31 | } 32 | 33 | .tox-tinymce-aux { 34 | z-index: 9999 !important; 35 | } 36 | 37 | .wxw-img { 38 | vertical-align: bottom; 39 | } 40 | 41 | .select { 42 | &:hover, 43 | &:focus, 44 | &:active { 45 | border: 1px solid #07c160; 46 | } 47 | } 48 | 49 | img { 50 | *zoom: 1; 51 | max-width: 100%; 52 | *max-width: 96%; 53 | height: auto !important; 54 | } 55 | *, 56 | *:before, 57 | *:after { 58 | box-sizing: inherit; 59 | margin: 0; 60 | padding: 0; 61 | } 62 | 63 | a:focus, 64 | a:active { 65 | outline: none; 66 | } 67 | 68 | a, 69 | a:focus, 70 | a:hover { 71 | cursor: pointer; 72 | color: inherit; 73 | text-decoration: none; 74 | } 75 | 76 | div:focus { 77 | outline: none; 78 | } 79 | 80 | .clearfix { 81 | &:after { 82 | visibility: hidden; 83 | display: block; 84 | font-size: 0; 85 | content: ' '; 86 | clear: both; 87 | height: 0; 88 | } 89 | } 90 | 91 | ::selection { 92 | background: #d3d3d3; 93 | 94 | color: #555; 95 | } 96 | 97 | ::-moz-selection { 98 | background: #d3d3d3; 99 | 100 | color: #555; 101 | } 102 | 103 | ::-webkit-selection { 104 | background: #d3d3d3; 105 | 106 | color: #555; 107 | } 108 | -------------------------------------------------------------------------------- /src/styles/media.scss: -------------------------------------------------------------------------------- 1 | /*! 2 | * MIT License 3 | * Copyright <2021-2022> 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 copies 9 | * of the Software, and to permit persons to whom the Software is furnished to do so, 10 | * 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 IMPLIED, 16 | * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A 17 | * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 18 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF 19 | * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE 20 | * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | * @Author: Sinda 22 | * @Email: xhuicloud@163.com 23 | */ 24 | @import './variables.scss'; 25 | 26 | @media screen and (max-height: 700px) { 27 | .login-form-container { 28 | margin: auto !important; 29 | } 30 | } 31 | 32 | @media screen and (max-width: 990px) { 33 | // 登录页适应 34 | .login-form-container { 35 | margin: 0 auto; 36 | width: 96% !important; 37 | } 38 | .openSidebar { 39 | // layout 布局适应 40 | .left-body { 41 | left: -$sideBarWidth !important; 42 | } 43 | 44 | .main-container { 45 | margin-left: unset !important; 46 | } 47 | 48 | .header-container { 49 | width: unset !important; 50 | left: 0; 51 | } 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /src/styles/mixin.scss: -------------------------------------------------------------------------------- 1 | @mixin clearfix { 2 | &:after { 3 | content: ''; 4 | display: table; 5 | clear: both; 6 | } 7 | } 8 | 9 | @mixin scrollBar { 10 | &::-webkit-scrollbar-track-piece { 11 | background: #d3dce6; 12 | } 13 | 14 | &::-webkit-scrollbar { 15 | width: 6px; 16 | } 17 | 18 | &::-webkit-scrollbar-thumb { 19 | background: #99a9bf; 20 | border-radius: 20px; 21 | } 22 | } 23 | 24 | @mixin relative { 25 | position: relative; 26 | width: 100%; 27 | height: 100%; 28 | } 29 | 30 | @mixin prefixed($property, $value) { 31 | -webkit-#{$property}: #{$value}; 32 | } 33 | -------------------------------------------------------------------------------- /src/styles/variables.global.scss: -------------------------------------------------------------------------------- 1 | @import "./variables.scss"; 2 | 3 | // 共享变量 4 | :export { 5 | menuText: $menuText; 6 | menuActiveText: $menuActiveText; 7 | subMenuActiveText: $subMenuActiveText; 8 | menuBg: $menuBg; 9 | menuHover: $menuHover; 10 | subMenuBg: $subMenuBg; 11 | subMenuHover: $subMenuHover; 12 | sideBarWidth: $sideBarWidth; 13 | closeSidebarWidth: $closeSidebarWidth; 14 | navbarBg: $navbarBg; 15 | sidebarTransition: $sidebarTransition; 16 | } 17 | -------------------------------------------------------------------------------- /src/styles/variables.global.scss.d.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * MIT License 3 | * Copyright <2021-2022> 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 copies 9 | * of the Software, and to permit persons to whom the Software is furnished to do so, 10 | * 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 IMPLIED, 16 | * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A 17 | * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 18 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF 19 | * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE 20 | * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | * @Author: Sinda 22 | * @Email: xhuicloud@163.com 23 | */ 24 | 25 | export interface GlobalScss { 26 | menuText: string 27 | menuActiveText: string 28 | subMenuActiveText: string 29 | menuBg: string 30 | menuHover: string 31 | subMenuBg: string 32 | subMenuHover: string 33 | sideBarWidth: string 34 | closeSidebarWidth: string 35 | navbarBg: string 36 | sidebarTransition: string 37 | } 38 | export const styles: GlobalScss 39 | 40 | export default styles 41 | -------------------------------------------------------------------------------- /src/styles/variables.scss: -------------------------------------------------------------------------------- 1 | $menuText: black; //菜单栏字体颜色 2 | $menuActiveText: rgba(35, 65, 184, 0.91); 3 | $subMenuActiveText: black; // 选中子菜单 父菜单的字体颜色 4 | 5 | $menuBg: #ffffff; //菜单栏背景 6 | $menuHover: #ffffff; //鼠标移动至一级菜单时颜色 7 | 8 | $subMenuBg: #ffffff; //一级菜单 下拉打开二级菜单的颜色 9 | $subMenuHover: #b5baba; //鼠标移动至二级菜单时颜色 10 | 11 | $sideBarWidth: 210px; 12 | $closeSidebarWidth: 54px; 13 | 14 | $navbarBg: #409eff; //Navbar 背景 15 | 16 | $sidebarTransition: 0.5s; //Sidebar 相关动画 17 | -------------------------------------------------------------------------------- /src/utils/date.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * MIT License 3 | * Copyright <2021-2022> 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 copies 9 | * of the Software, and to permit persons to whom the Software is furnished to do so, 10 | * 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 IMPLIED, 16 | * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A 17 | * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 18 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF 19 | * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE 20 | * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | * @Author: Sinda 22 | * @Email: xhuicloud@163.com 23 | */ 24 | 25 | import dayjs from 'dayjs' 26 | 27 | const DATE_TIME_FORMAT = 'YYYY-MM-DD HH:mm:ss' 28 | const DATE_FORMAT = 'YYYY-MM-DD' 29 | 30 | export function formatToDateTime(date: dayjs.Dayjs | undefined = undefined, format = DATE_TIME_FORMAT): string { 31 | return dayjs(date).format(format) 32 | } 33 | 34 | export function formatDateTime(date: number, format = DATE_TIME_FORMAT): string { 35 | return dayjs.unix(date).format(format) 36 | } 37 | 38 | export function formatToDate(date: dayjs.Dayjs | undefined = undefined, format = DATE_FORMAT): string { 39 | return dayjs(date).format(format) 40 | } 41 | 42 | export const dateUtil = dayjs 43 | -------------------------------------------------------------------------------- /src/utils/encrypt.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * MIT License 3 | * Copyright <2021-2022> 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 copies 9 | * of the Software, and to permit persons to whom the Software is furnished to do so, 10 | * 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 IMPLIED, 16 | * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A 17 | * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 18 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF 19 | * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE 20 | * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | * @Author: Sinda 22 | * @Email: xhuicloud@163.com 23 | */ 24 | 25 | import { encrypt } from 'crypto-js/aes' 26 | import { parse } from 'crypto-js/enc-utf8' 27 | import CFB from 'crypto-js/mode-cfb' 28 | import NoPadding from 'crypto-js/pad-nopadding' 29 | 30 | export function encryption(data: T, iv: string, encryptParams: string[]): T { 31 | const result = JSON.parse(JSON.stringify(data)) 32 | const _iv = parse(iv) 33 | encryptParams.forEach((ele) => { 34 | result[ele] = encrypt(result[ele], _iv, { 35 | iv: _iv, 36 | mode: CFB, 37 | padding: NoPadding 38 | }).toString() 39 | }) 40 | return result 41 | } 42 | -------------------------------------------------------------------------------- /src/utils/install.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * MIT License 3 | * Copyright <2021-2022> 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 copies 9 | * of the Software, and to permit persons to whom the Software is furnished to do so, 10 | * 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 IMPLIED, 16 | * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A 17 | * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 18 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF 19 | * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE 20 | * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | * @Author: Sinda 22 | * @Email: xhuicloud@163.com 23 | */ 24 | 25 | import type { App, Plugin } from 'vue' 26 | 27 | export type SFCWithInstall = T & Plugin 28 | 29 | export const withInstall = (comp: T, name: string) => { 30 | ;(comp as SFCWithInstall).install = (app): void => { 31 | app.component(name, comp as any) 32 | } 33 | return comp as SFCWithInstall 34 | } 35 | 36 | export const makeInstaller = (components: Plugin[] = []) => { 37 | const install = (app: App) => { 38 | components.forEach((c) => app.use(c)) 39 | } 40 | return { 41 | install 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /src/views/admin/dept/index.ts: -------------------------------------------------------------------------------- 1 | import { TableColumn } from '@/components/XhTable/crud' 2 | 3 | export const tableColumn: TableColumn[] = [ 4 | { 5 | label: '部门id', 6 | prop: 'id', 7 | hidden: true, 8 | editDisabled: true, 9 | createDisabled: true 10 | }, 11 | { 12 | label: '上级部门', 13 | prop: 'parentId', 14 | isFormItem: true, 15 | operationForm: { 16 | rules: [ 17 | { 18 | required: true, 19 | message: '请选择上级部门', 20 | trigger: 'blur' 21 | } 22 | ] 23 | } 24 | }, 25 | { 26 | label: '部门名称', 27 | prop: 'name', 28 | operationForm: { 29 | rules: [ 30 | { 31 | required: true, 32 | message: '请输入部门名称', 33 | trigger: 'blur' 34 | } 35 | ] 36 | } 37 | }, 38 | { 39 | label: '区域|地址|工位', 40 | prop: 'address', 41 | operationForm: {} 42 | }, 43 | { 44 | label: '创建时间', 45 | prop: 'createTime' 46 | } 47 | ] 48 | -------------------------------------------------------------------------------- /src/views/admin/roles/index.ts: -------------------------------------------------------------------------------- 1 | import { TableColumn } from '@/components/XhTable/crud' 2 | import { ColProps } from 'element-plus' 3 | 4 | const col = { xl: 24, lg: 24 } as ColProps 5 | 6 | export const tableColumn: TableColumn[] = [ 7 | { 8 | label: 'id', 9 | prop: 'id', 10 | createDisplay: true, 11 | editDisabled: true, 12 | operationForm: {} 13 | }, 14 | { 15 | label: '角色编码', 16 | prop: 'roleCode', 17 | operationForm: { 18 | col, 19 | rules: [ 20 | { 21 | required: true, 22 | message: '角色编码不能为空', 23 | trigger: 'blur' 24 | } 25 | ] 26 | } 27 | }, 28 | 29 | { 30 | label: '角色名称', 31 | prop: 'roleName', 32 | searchForm: { 33 | componentProps: { placeholder: '请输入角色名称' } 34 | }, 35 | operationForm: { 36 | col, 37 | rules: [ 38 | { 39 | required: true, 40 | message: '角色名称不能为空', 41 | trigger: 'blur' 42 | } 43 | ] 44 | } 45 | }, 46 | { 47 | label: '角色描述', 48 | prop: 'roleDesc', 49 | operationForm: { 50 | col, 51 | componentProps: { 52 | type: 'textarea' 53 | } 54 | } 55 | }, 56 | { 57 | label: '创建时间', 58 | prop: 'createTime' 59 | }, 60 | { 61 | label: '更新时间', 62 | prop: 'updateTime' 63 | } 64 | ] 65 | -------------------------------------------------------------------------------- /src/views/audit/log/login.vue: -------------------------------------------------------------------------------- 1 | 10 | 36 | 37 | -------------------------------------------------------------------------------- /src/views/component/form/index.vue: -------------------------------------------------------------------------------- 1 | 10 | 13 | 14 | -------------------------------------------------------------------------------- /src/views/development/gen/index.ts: -------------------------------------------------------------------------------- 1 | import { TableColumn } from '@/components/XhTable/crud' 2 | import { global } from '@/i18n' 3 | 4 | export const dsTableColumn: TableColumn[] = [ 5 | { 6 | label: global.t('gen.Id'), 7 | prop: 'id', 8 | createDisplay: true, 9 | editDisabled: true, 10 | operationForm: {} 11 | }, 12 | { 13 | label: global.t('gen.Name'), 14 | prop: 'name', 15 | operationForm: {}, 16 | searchForm: {} 17 | }, 18 | { 19 | label: global.t('gen.Username'), 20 | prop: 'username', 21 | operationForm: {} 22 | }, 23 | { 24 | label: global.t('gen.Password'), 25 | prop: 'password', 26 | hidden: true, 27 | operationForm: { 28 | componentProps: { 29 | showPassword: true 30 | } 31 | } 32 | }, 33 | { 34 | label: global.t('gen.Host'), 35 | prop: 'host', 36 | hidden: true, 37 | operationForm: {} 38 | }, 39 | { 40 | label: global.t('gen.Port'), 41 | prop: 'port', 42 | operationForm: { 43 | component: 'ElInputNumber' 44 | } 45 | }, 46 | { 47 | label: global.t('gen.Type'), 48 | prop: 'type', 49 | operationForm: {} 50 | }, 51 | { 52 | label: global.t('gen.CreateTime'), 53 | prop: 'createTime' 54 | } 55 | ] 56 | -------------------------------------------------------------------------------- /src/views/error/401.vue: -------------------------------------------------------------------------------- 1 | 24 | 25 | 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /src/views/error/404.vue: -------------------------------------------------------------------------------- 1 | 24 | 25 | 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /src/views/security/userBind.ts: -------------------------------------------------------------------------------- 1 | import { ExtractPropTypes, PropType } from 'vue' 2 | 3 | export const userBindProps = { 4 | updateModel: { type: String as PropType, default: '' }, 5 | updateProp: { type: String, default: '' }, 6 | active: { type: Number, default: 1 }, 7 | validate: { type: Function as PropType<(params: string) => boolean | string>, default: () => ({}) } 8 | } 9 | 10 | export type UserBindProps = ExtractPropTypes 11 | -------------------------------------------------------------------------------- /src/views/system/application/index.ts: -------------------------------------------------------------------------------- 1 | import { TableColumn } from '@/components/XhTable/crud' 2 | 3 | export const tableColumn: TableColumn[] = [ 4 | { 5 | label: '编号', 6 | prop: 'id', 7 | createDisplay: true, 8 | editDisabled: true, 9 | operationForm: {} 10 | }, 11 | { 12 | label: '服务名称', 13 | prop: 'routeName', 14 | operationForm: {} 15 | }, 16 | { 17 | label: '服务编号', 18 | prop: 'routeId', 19 | operationForm: {} 20 | }, 21 | { 22 | label: '谓词/断言', 23 | prop: 'predicates', 24 | hidden: true 25 | }, 26 | { 27 | label: '过滤器', 28 | prop: 'filters', 29 | hidden: true 30 | }, 31 | { 32 | label: 'lb/轮询地址', 33 | prop: 'uri', 34 | operationForm: {} 35 | }, 36 | { 37 | label: '创建时间', 38 | prop: 'createTime' 39 | } 40 | ] 41 | -------------------------------------------------------------------------------- /src/views/system/file/index.ts: -------------------------------------------------------------------------------- 1 | import { TableColumn } from '@/components/XhTable/crud' 2 | 3 | export const fileTableColumn: TableColumn[] = [ 4 | { 5 | label: 'id', 6 | prop: 'id' 7 | }, 8 | { 9 | label: '桶名称', 10 | prop: 'bucketName', 11 | searchForm: {} 12 | }, 13 | { 14 | label: '文件名称', 15 | prop: 'fileName', 16 | searchForm: {} 17 | }, 18 | { 19 | label: '原文件名称', 20 | prop: 'name' 21 | }, 22 | { 23 | label: '文件大小', 24 | prop: 'fileSize' 25 | }, 26 | { 27 | label: '文件类型', 28 | prop: 'fileType' 29 | }, 30 | { 31 | label: '创建时间', 32 | prop: 'createTime' 33 | } 34 | ] 35 | -------------------------------------------------------------------------------- /src/views/system/file/index.vue: -------------------------------------------------------------------------------- 1 | 13 | 49 | 50 | -------------------------------------------------------------------------------- /src/views/wechat/drafts/operation.vue: -------------------------------------------------------------------------------- 1 | 2 | 21 | 33 | 34 | -------------------------------------------------------------------------------- /src/views/wechat/drafts/single.vue: -------------------------------------------------------------------------------- 1 | 2 | 23 | 30 | 31 | -------------------------------------------------------------------------------- /src/views/wechat/material/components/voiceAndvideo.ts: -------------------------------------------------------------------------------- 1 | import { TableColumn } from '@/components/XhTable/crud' 2 | 3 | export const tableColumn: TableColumn[] = [ 4 | { 5 | label: 'mediaId', 6 | prop: 'mediaId' 7 | }, 8 | { 9 | label: 'name', 10 | prop: 'name' 11 | }, 12 | { 13 | label: 'updateTime', 14 | prop: 'updateTime' 15 | } 16 | ] 17 | -------------------------------------------------------------------------------- /src/views/wechat/material/index.ts: -------------------------------------------------------------------------------- 1 | import { TableColumn } from '@/components/XhTable/crud' 2 | 3 | export const tableColumn: TableColumn[] = [ 4 | { 5 | label: 'mediaId', 6 | prop: 'mediaId' 7 | }, 8 | { 9 | label: '名称', 10 | prop: 'name' 11 | }, 12 | { 13 | label: '创建时间', 14 | prop: 'updateTime' 15 | } 16 | ] 17 | -------------------------------------------------------------------------------- /src/views/wechat/publish/index.ts: -------------------------------------------------------------------------------- 1 | import { TableColumn } from '@/components/XhTable/crud' 2 | 3 | export const tableColumn: TableColumn[] = [] 4 | -------------------------------------------------------------------------------- /src/views/wechat/publish/index.vue: -------------------------------------------------------------------------------- 1 | 19 | 47 | 48 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "outDir": "./dist", 4 | "target": "esnext", 5 | "module": "esnext", 6 | "useDefineForClassFields": true, 7 | "allowJs": true, 8 | "checkJs": false, 9 | "moduleResolution": "node", 10 | "removeComments": true, 11 | "strict": true, 12 | "jsx": "preserve", 13 | "sourceMap": true, 14 | "noImplicitThis": true, 15 | "noImplicitAny": true, 16 | "preserveConstEnums": true, 17 | "resolveJsonModule": true, 18 | "noUnusedLocals": false, 19 | "isolatedModules": true, 20 | "noUnusedParameters": false, 21 | "esModuleInterop": true, 22 | "types": ["@intlify/vite-plugin-vue-i18n/client"], 23 | "lib": ["esnext", "dom"], 24 | "skipLibCheck": true, 25 | "baseUrl": ".", 26 | "paths": { 27 | "@/*": ["src/*"], 28 | "~/*": ["types/*"] 29 | } 30 | }, 31 | // 读取文件 32 | "include": [ 33 | "src/**/*.ts", 34 | "src/**/*.d.ts", 35 | "src/**/*.tsx", 36 | "src/**/*.vue", 37 | "types/*.ts", 38 | "types/*.d.ts", 39 | "vite.config.ts", 40 | "node_modules/element-plus/global.d.ts" 41 | ], 42 | "exclude": ["node_modules", "dist"] 43 | } 44 | -------------------------------------------------------------------------------- /types/axios.d.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * MIT License 3 | * Copyright <2021-2022> 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 copies 9 | * of the Software, and to permit persons to whom the Software is furnished to do so, 10 | * 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 IMPLIED, 16 | * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A 17 | * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 18 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF 19 | * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE 20 | * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | * @Author: Sinda 22 | * @Email: xhuicloud@163.com 23 | */ 24 | declare namespace API { 25 | type Response = { 26 | code: number 27 | msg: string 28 | data: T 29 | } 30 | 31 | type IPage = { 32 | total: number 33 | size: number 34 | current: number 35 | records: T[] 36 | } 37 | 38 | type UploadFile = { 39 | name?: string 40 | file: File | Blob 41 | filename?: string 42 | [key: string]: any 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /types/env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | 3 | interface ImportMetaEnv { 4 | /** 端口 */ 5 | readonly VITE_PORT: number 6 | /** 路由模式 */ 7 | readonly VITE_ROUTER_HISTORY: string 8 | /** 接口地址 */ 9 | readonly VITE_BASE_API: string 10 | /** Websocket地址 */ 11 | readonly VITE_WS_API: string 12 | /** 图片oss地址 当没有domain时自动拼接 */ 13 | readonly VITE_OSS_DOMAIN: string 14 | } 15 | 16 | interface ImportMeta { 17 | readonly env: ImportMetaEnv 18 | } 19 | -------------------------------------------------------------------------------- /types/homeTag.d.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * MIT License 3 | * Copyright <2021-2022> 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 copies 9 | * of the Software, and to permit persons to whom the Software is furnished to do so, 10 | * 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 IMPLIED, 16 | * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A 17 | * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 18 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF 19 | * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE 20 | * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | * @Author: Sinda 22 | * @Email: xhuicloud@163.com 23 | */ 24 | 25 | export interface HomeTag { 26 | fullPath: string 27 | meta: any 28 | params: any 29 | path: string 30 | query: any 31 | } 32 | -------------------------------------------------------------------------------- /types/modules.d.ts: -------------------------------------------------------------------------------- 1 | declare module 'css-color-function' { 2 | import colorConvert from 'css-color-function' 3 | export default colorConvert 4 | } 5 | -------------------------------------------------------------------------------- /types/mqtt.d.ts: -------------------------------------------------------------------------------- 1 | declare module 'mqtt/dist/mqtt' { 2 | import MQTT from 'mqtt' 3 | export = MQTT 4 | } 5 | 6 | interface MqttHookOptions { 7 | host: string 8 | port?: number 9 | path?: string 10 | username?: string 11 | password?: string 12 | clientId?: string 13 | protocol?: 'wss' | 'ws' | 'mqtt' | 'mqtts' | 'tcp' | 'ssl' | 'wx' | 'wxs' 14 | } 15 | 16 | interface MqttMessage { 17 | topic: string 18 | payload: MessagePayload 19 | } 20 | 21 | interface MessagePayload { 22 | messageId: string 23 | userId: string 24 | text: string 25 | } 26 | -------------------------------------------------------------------------------- /types/shims-vue.d.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * MIT License 3 | * Copyright <2021-2022> 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 copies 9 | * of the Software, and to permit persons to whom the Software is furnished to do so, 10 | * 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 IMPLIED, 16 | * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A 17 | * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 18 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF 19 | * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE 20 | * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | * @Author: Sinda 22 | * @Email: xhuicloud@163.com 23 | */ 24 | 25 | declare module '*.vue' { 26 | import type { DefineComponent } from 'vue' 27 | // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/ban-types 28 | const component: DefineComponent<{}, {}, any> 29 | export default component 30 | } 31 | --------------------------------------------------------------------------------