@k3000/s1 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +2 -0
- package/RuoYi-Vue3/.env.development +8 -0
- package/RuoYi-Vue3/.env.production +11 -0
- package/RuoYi-Vue3/.env.staging +11 -0
- package/RuoYi-Vue3/.github/FUNDING.yml +1 -0
- package/RuoYi-Vue3/LICENSE +20 -0
- package/RuoYi-Vue3/README.md +109 -0
- package/RuoYi-Vue3/bin/build.bat +12 -0
- package/RuoYi-Vue3/bin/package.bat +12 -0
- package/RuoYi-Vue3/bin/run-web.bat +12 -0
- package/RuoYi-Vue3/html/ie.html +46 -0
- package/RuoYi-Vue3/index.html +215 -0
- package/RuoYi-Vue3/package.json +44 -0
- package/RuoYi-Vue3/public/favicon.ico +0 -0
- package/RuoYi-Vue3/src/App.vue +15 -0
- package/RuoYi-Vue3/src/api/login.js +60 -0
- package/RuoYi-Vue3/src/api/menu.js +9 -0
- package/RuoYi-Vue3/src/api/monitor/cache.js +57 -0
- package/RuoYi-Vue3/src/api/monitor/job.js +71 -0
- package/RuoYi-Vue3/src/api/monitor/jobLog.js +26 -0
- package/RuoYi-Vue3/src/api/monitor/logininfor.js +34 -0
- package/RuoYi-Vue3/src/api/monitor/online.js +18 -0
- package/RuoYi-Vue3/src/api/monitor/operlog.js +26 -0
- package/RuoYi-Vue3/src/api/monitor/server.js +9 -0
- package/RuoYi-Vue3/src/api/system/config.js +60 -0
- package/RuoYi-Vue3/src/api/system/dept.js +52 -0
- package/RuoYi-Vue3/src/api/system/dict/data.js +52 -0
- package/RuoYi-Vue3/src/api/system/dict/type.js +60 -0
- package/RuoYi-Vue3/src/api/system/menu.js +60 -0
- package/RuoYi-Vue3/src/api/system/notice.js +44 -0
- package/RuoYi-Vue3/src/api/system/post.js +44 -0
- package/RuoYi-Vue3/src/api/system/role.js +119 -0
- package/RuoYi-Vue3/src/api/system/user.js +136 -0
- package/RuoYi-Vue3/src/api/tool/gen.js +85 -0
- package/RuoYi-Vue3/src/assets/401_images/401.gif +0 -0
- package/RuoYi-Vue3/src/assets/404_images/404.png +0 -0
- package/RuoYi-Vue3/src/assets/404_images/404_cloud.png +0 -0
- package/RuoYi-Vue3/src/assets/icons/svg/404.svg +1 -0
- package/RuoYi-Vue3/src/assets/icons/svg/bug.svg +1 -0
- package/RuoYi-Vue3/src/assets/icons/svg/build.svg +1 -0
- package/RuoYi-Vue3/src/assets/icons/svg/button.svg +1 -0
- package/RuoYi-Vue3/src/assets/icons/svg/cascader.svg +1 -0
- package/RuoYi-Vue3/src/assets/icons/svg/chart.svg +1 -0
- package/RuoYi-Vue3/src/assets/icons/svg/checkbox.svg +1 -0
- package/RuoYi-Vue3/src/assets/icons/svg/clipboard.svg +1 -0
- package/RuoYi-Vue3/src/assets/icons/svg/code.svg +1 -0
- package/RuoYi-Vue3/src/assets/icons/svg/color.svg +1 -0
- package/RuoYi-Vue3/src/assets/icons/svg/component.svg +1 -0
- package/RuoYi-Vue3/src/assets/icons/svg/dashboard.svg +1 -0
- package/RuoYi-Vue3/src/assets/icons/svg/date-range.svg +1 -0
- package/RuoYi-Vue3/src/assets/icons/svg/date.svg +1 -0
- package/RuoYi-Vue3/src/assets/icons/svg/dict.svg +1 -0
- package/RuoYi-Vue3/src/assets/icons/svg/documentation.svg +1 -0
- package/RuoYi-Vue3/src/assets/icons/svg/download.svg +1 -0
- package/RuoYi-Vue3/src/assets/icons/svg/drag.svg +1 -0
- package/RuoYi-Vue3/src/assets/icons/svg/druid.svg +1 -0
- package/RuoYi-Vue3/src/assets/icons/svg/edit.svg +1 -0
- package/RuoYi-Vue3/src/assets/icons/svg/education.svg +1 -0
- package/RuoYi-Vue3/src/assets/icons/svg/email.svg +1 -0
- package/RuoYi-Vue3/src/assets/icons/svg/example.svg +1 -0
- package/RuoYi-Vue3/src/assets/icons/svg/excel.svg +1 -0
- package/RuoYi-Vue3/src/assets/icons/svg/exit-fullscreen.svg +1 -0
- package/RuoYi-Vue3/src/assets/icons/svg/eye-open.svg +1 -0
- package/RuoYi-Vue3/src/assets/icons/svg/eye.svg +1 -0
- package/RuoYi-Vue3/src/assets/icons/svg/form.svg +1 -0
- package/RuoYi-Vue3/src/assets/icons/svg/fullscreen.svg +1 -0
- package/RuoYi-Vue3/src/assets/icons/svg/github.svg +1 -0
- package/RuoYi-Vue3/src/assets/icons/svg/guide.svg +1 -0
- package/RuoYi-Vue3/src/assets/icons/svg/icon.svg +1 -0
- package/RuoYi-Vue3/src/assets/icons/svg/input.svg +1 -0
- package/RuoYi-Vue3/src/assets/icons/svg/international.svg +1 -0
- package/RuoYi-Vue3/src/assets/icons/svg/job.svg +1 -0
- package/RuoYi-Vue3/src/assets/icons/svg/language.svg +1 -0
- package/RuoYi-Vue3/src/assets/icons/svg/link.svg +1 -0
- package/RuoYi-Vue3/src/assets/icons/svg/list.svg +1 -0
- package/RuoYi-Vue3/src/assets/icons/svg/lock.svg +1 -0
- package/RuoYi-Vue3/src/assets/icons/svg/log.svg +1 -0
- package/RuoYi-Vue3/src/assets/icons/svg/logininfor.svg +1 -0
- package/RuoYi-Vue3/src/assets/icons/svg/message.svg +1 -0
- package/RuoYi-Vue3/src/assets/icons/svg/money.svg +1 -0
- package/RuoYi-Vue3/src/assets/icons/svg/monitor.svg +2 -0
- package/RuoYi-Vue3/src/assets/icons/svg/nested.svg +1 -0
- package/RuoYi-Vue3/src/assets/icons/svg/number.svg +1 -0
- package/RuoYi-Vue3/src/assets/icons/svg/online.svg +1 -0
- package/RuoYi-Vue3/src/assets/icons/svg/password.svg +1 -0
- package/RuoYi-Vue3/src/assets/icons/svg/pdf.svg +1 -0
- package/RuoYi-Vue3/src/assets/icons/svg/people.svg +1 -0
- package/RuoYi-Vue3/src/assets/icons/svg/peoples.svg +1 -0
- package/RuoYi-Vue3/src/assets/icons/svg/phone.svg +1 -0
- package/RuoYi-Vue3/src/assets/icons/svg/post.svg +1 -0
- package/RuoYi-Vue3/src/assets/icons/svg/qq.svg +1 -0
- package/RuoYi-Vue3/src/assets/icons/svg/question.svg +1 -0
- package/RuoYi-Vue3/src/assets/icons/svg/radio.svg +1 -0
- package/RuoYi-Vue3/src/assets/icons/svg/rate.svg +1 -0
- package/RuoYi-Vue3/src/assets/icons/svg/redis-list.svg +2 -0
- package/RuoYi-Vue3/src/assets/icons/svg/redis.svg +1 -0
- package/RuoYi-Vue3/src/assets/icons/svg/row.svg +1 -0
- package/RuoYi-Vue3/src/assets/icons/svg/search.svg +1 -0
- package/RuoYi-Vue3/src/assets/icons/svg/select.svg +1 -0
- package/RuoYi-Vue3/src/assets/icons/svg/server.svg +1 -0
- package/RuoYi-Vue3/src/assets/icons/svg/shopping.svg +1 -0
- package/RuoYi-Vue3/src/assets/icons/svg/size.svg +1 -0
- package/RuoYi-Vue3/src/assets/icons/svg/skill.svg +1 -0
- package/RuoYi-Vue3/src/assets/icons/svg/slider.svg +1 -0
- package/RuoYi-Vue3/src/assets/icons/svg/star.svg +1 -0
- package/RuoYi-Vue3/src/assets/icons/svg/swagger.svg +1 -0
- package/RuoYi-Vue3/src/assets/icons/svg/switch.svg +1 -0
- package/RuoYi-Vue3/src/assets/icons/svg/system.svg +2 -0
- package/RuoYi-Vue3/src/assets/icons/svg/tab.svg +1 -0
- package/RuoYi-Vue3/src/assets/icons/svg/table.svg +1 -0
- package/RuoYi-Vue3/src/assets/icons/svg/textarea.svg +1 -0
- package/RuoYi-Vue3/src/assets/icons/svg/theme.svg +1 -0
- package/RuoYi-Vue3/src/assets/icons/svg/time-range.svg +1 -0
- package/RuoYi-Vue3/src/assets/icons/svg/time.svg +1 -0
- package/RuoYi-Vue3/src/assets/icons/svg/tool.svg +1 -0
- package/RuoYi-Vue3/src/assets/icons/svg/tree-table.svg +1 -0
- package/RuoYi-Vue3/src/assets/icons/svg/tree.svg +1 -0
- package/RuoYi-Vue3/src/assets/icons/svg/upload.svg +1 -0
- package/RuoYi-Vue3/src/assets/icons/svg/user.svg +1 -0
- package/RuoYi-Vue3/src/assets/icons/svg/validCode.svg +1 -0
- package/RuoYi-Vue3/src/assets/icons/svg/wechat.svg +1 -0
- package/RuoYi-Vue3/src/assets/icons/svg/zip.svg +1 -0
- package/RuoYi-Vue3/src/assets/images/dark.svg +39 -0
- package/RuoYi-Vue3/src/assets/images/light.svg +39 -0
- package/RuoYi-Vue3/src/assets/images/login-background.jpg +0 -0
- package/RuoYi-Vue3/src/assets/images/pay.png +0 -0
- package/RuoYi-Vue3/src/assets/images/profile.jpg +0 -0
- package/RuoYi-Vue3/src/assets/logo/logo.png +0 -0
- package/RuoYi-Vue3/src/assets/styles/btn.scss +99 -0
- package/RuoYi-Vue3/src/assets/styles/element-ui.scss +96 -0
- package/RuoYi-Vue3/src/assets/styles/index.scss +184 -0
- package/RuoYi-Vue3/src/assets/styles/mixin.scss +66 -0
- package/RuoYi-Vue3/src/assets/styles/ruoyi.scss +281 -0
- package/RuoYi-Vue3/src/assets/styles/sidebar.scss +238 -0
- package/RuoYi-Vue3/src/assets/styles/transition.scss +49 -0
- package/RuoYi-Vue3/src/assets/styles/variables.module.scss +65 -0
- package/RuoYi-Vue3/src/components/Breadcrumb/index.vue +66 -0
- package/RuoYi-Vue3/src/components/Crontab/day.vue +174 -0
- package/RuoYi-Vue3/src/components/Crontab/hour.vue +133 -0
- package/RuoYi-Vue3/src/components/Crontab/index.vue +310 -0
- package/RuoYi-Vue3/src/components/Crontab/min.vue +126 -0
- package/RuoYi-Vue3/src/components/Crontab/month.vue +141 -0
- package/RuoYi-Vue3/src/components/Crontab/result.vue +540 -0
- package/RuoYi-Vue3/src/components/Crontab/second.vue +128 -0
- package/RuoYi-Vue3/src/components/Crontab/week.vue +197 -0
- package/RuoYi-Vue3/src/components/Crontab/year.vue +149 -0
- package/RuoYi-Vue3/src/components/DictTag/index.vue +82 -0
- package/RuoYi-Vue3/src/components/Editor/index.vue +251 -0
- package/RuoYi-Vue3/src/components/FileUpload/index.vue +207 -0
- package/RuoYi-Vue3/src/components/Hamburger/index.vue +41 -0
- package/RuoYi-Vue3/src/components/HeaderSearch/index.vue +187 -0
- package/RuoYi-Vue3/src/components/IconSelect/index.vue +111 -0
- package/RuoYi-Vue3/src/components/IconSelect/requireIcons.js +8 -0
- package/RuoYi-Vue3/src/components/ImagePreview/index.vue +92 -0
- package/RuoYi-Vue3/src/components/ImageUpload/index.vue +213 -0
- package/RuoYi-Vue3/src/components/Pagination/index.vue +105 -0
- package/RuoYi-Vue3/src/components/ParentView/index.vue +3 -0
- package/RuoYi-Vue3/src/components/RightToolbar/index.vue +134 -0
- package/RuoYi-Vue3/src/components/RuoYi/Doc/index.vue +13 -0
- package/RuoYi-Vue3/src/components/RuoYi/Git/index.vue +13 -0
- package/RuoYi-Vue3/src/components/Screenfull/index.vue +22 -0
- package/RuoYi-Vue3/src/components/SizeSelect/index.vue +45 -0
- package/RuoYi-Vue3/src/components/SvgIcon/index.vue +53 -0
- package/RuoYi-Vue3/src/components/SvgIcon/svgicon.js +10 -0
- package/RuoYi-Vue3/src/components/TopNav/index.vue +214 -0
- package/RuoYi-Vue3/src/components/TreeSelect/index.vue +156 -0
- package/RuoYi-Vue3/src/components/iFrame/index.vue +31 -0
- package/RuoYi-Vue3/src/directive/common/copyText.js +66 -0
- package/RuoYi-Vue3/src/directive/index.js +9 -0
- package/RuoYi-Vue3/src/directive/permission/hasPermi.js +28 -0
- package/RuoYi-Vue3/src/directive/permission/hasRole.js +28 -0
- package/RuoYi-Vue3/src/layout/components/AppMain.vue +68 -0
- package/RuoYi-Vue3/src/layout/components/IframeToggle/index.vue +25 -0
- package/RuoYi-Vue3/src/layout/components/InnerLink/index.vue +24 -0
- package/RuoYi-Vue3/src/layout/components/Navbar.vue +191 -0
- package/RuoYi-Vue3/src/layout/components/Settings/index.vue +209 -0
- package/RuoYi-Vue3/src/layout/components/Sidebar/Link.vue +40 -0
- package/RuoYi-Vue3/src/layout/components/Sidebar/Logo.vue +81 -0
- package/RuoYi-Vue3/src/layout/components/Sidebar/SidebarItem.vue +102 -0
- package/RuoYi-Vue3/src/layout/components/Sidebar/index.vue +54 -0
- package/RuoYi-Vue3/src/layout/components/TagsView/ScrollPane.vue +107 -0
- package/RuoYi-Vue3/src/layout/components/TagsView/index.vue +358 -0
- package/RuoYi-Vue3/src/layout/components/index.js +4 -0
- package/RuoYi-Vue3/src/layout/index.vue +114 -0
- package/RuoYi-Vue3/src/main.js +84 -0
- package/RuoYi-Vue3/src/permission.js +65 -0
- package/RuoYi-Vue3/src/plugins/auth.js +60 -0
- package/RuoYi-Vue3/src/plugins/cache.js +77 -0
- package/RuoYi-Vue3/src/plugins/download.js +79 -0
- package/RuoYi-Vue3/src/plugins/index.js +18 -0
- package/RuoYi-Vue3/src/plugins/modal.js +82 -0
- package/RuoYi-Vue3/src/plugins/tab.js +69 -0
- package/RuoYi-Vue3/src/router/index.js +175 -0
- package/RuoYi-Vue3/src/settings.js +47 -0
- package/RuoYi-Vue3/src/store/index.js +3 -0
- package/RuoYi-Vue3/src/store/modules/app.js +46 -0
- package/RuoYi-Vue3/src/store/modules/dict.js +57 -0
- package/RuoYi-Vue3/src/store/modules/permission.js +142 -0
- package/RuoYi-Vue3/src/store/modules/settings.js +38 -0
- package/RuoYi-Vue3/src/store/modules/tagsView.js +182 -0
- package/RuoYi-Vue3/src/store/modules/user.js +72 -0
- package/RuoYi-Vue3/src/utils/auth.js +15 -0
- package/RuoYi-Vue3/src/utils/dict.js +24 -0
- package/RuoYi-Vue3/src/utils/dynamicTitle.js +15 -0
- package/RuoYi-Vue3/src/utils/errorCode.js +6 -0
- package/RuoYi-Vue3/src/utils/index.js +390 -0
- package/RuoYi-Vue3/src/utils/jsencrypt.js +30 -0
- package/RuoYi-Vue3/src/utils/permission.js +51 -0
- package/RuoYi-Vue3/src/utils/request.js +152 -0
- package/RuoYi-Vue3/src/utils/ruoyi.js +246 -0
- package/RuoYi-Vue3/src/utils/scroll-to.js +58 -0
- package/RuoYi-Vue3/src/utils/theme.js +49 -0
- package/RuoYi-Vue3/src/utils/validate.js +93 -0
- package/RuoYi-Vue3/src/views/error/401.vue +82 -0
- package/RuoYi-Vue3/src/views/error/404.vue +227 -0
- package/RuoYi-Vue3/src/views/index.vue +1092 -0
- package/RuoYi-Vue3/src/views/login.vue +227 -0
- package/RuoYi-Vue3/src/views/monitor/cache/index.vue +132 -0
- package/RuoYi-Vue3/src/views/monitor/cache/list.vue +246 -0
- package/RuoYi-Vue3/src/views/monitor/druid/index.vue +13 -0
- package/RuoYi-Vue3/src/views/monitor/job/index.vue +501 -0
- package/RuoYi-Vue3/src/views/monitor/job/log.vue +283 -0
- package/RuoYi-Vue3/src/views/monitor/logininfor/index.vue +233 -0
- package/RuoYi-Vue3/src/views/monitor/online/index.vue +109 -0
- package/RuoYi-Vue3/src/views/monitor/operlog/index.vue +310 -0
- package/RuoYi-Vue3/src/views/monitor/server/index.vue +187 -0
- package/RuoYi-Vue3/src/views/redirect/index.vue +14 -0
- package/RuoYi-Vue3/src/views/register.vue +219 -0
- package/RuoYi-Vue3/src/views/system/config/index.vue +316 -0
- package/RuoYi-Vue3/src/views/system/dept/index.vue +283 -0
- package/RuoYi-Vue3/src/views/system/dict/data.vue +362 -0
- package/RuoYi-Vue3/src/views/system/dict/index.vue +323 -0
- package/RuoYi-Vue3/src/views/system/menu/index.vue +452 -0
- package/RuoYi-Vue3/src/views/system/notice/index.vue +292 -0
- package/RuoYi-Vue3/src/views/system/post/index.vue +287 -0
- package/RuoYi-Vue3/src/views/system/role/authUser.vue +179 -0
- package/RuoYi-Vue3/src/views/system/role/index.vue +584 -0
- package/RuoYi-Vue3/src/views/system/role/selectUser.vue +144 -0
- package/RuoYi-Vue3/src/views/system/user/authRole.vue +116 -0
- package/RuoYi-Vue3/src/views/system/user/index.vue +635 -0
- package/RuoYi-Vue3/src/views/system/user/profile/index.vue +87 -0
- package/RuoYi-Vue3/src/views/system/user/profile/resetPwd.vue +59 -0
- package/RuoYi-Vue3/src/views/system/user/profile/userAvatar.vue +180 -0
- package/RuoYi-Vue3/src/views/system/user/profile/userInfo.vue +67 -0
- package/RuoYi-Vue3/src/views/tool/build/index.vue +3 -0
- package/RuoYi-Vue3/src/views/tool/gen/basicInfoForm.vue +48 -0
- package/RuoYi-Vue3/src/views/tool/gen/createTable.vue +46 -0
- package/RuoYi-Vue3/src/views/tool/gen/editTable.vue +200 -0
- package/RuoYi-Vue3/src/views/tool/gen/genInfoForm.vue +306 -0
- package/RuoYi-Vue3/src/views/tool/gen/importTable.vue +126 -0
- package/RuoYi-Vue3/src/views/tool/gen/index.vue +310 -0
- package/RuoYi-Vue3/src/views/tool/swagger/index.vue +9 -0
- package/RuoYi-Vue3/vite/plugins/auto-import.js +12 -0
- package/RuoYi-Vue3/vite/plugins/compression.js +28 -0
- package/RuoYi-Vue3/vite/plugins/index.js +15 -0
- package/RuoYi-Vue3/vite/plugins/setup-extend.js +5 -0
- package/RuoYi-Vue3/vite/plugins/svg-icon.js +10 -0
- package/RuoYi-Vue3/vite.config.js +58 -0
- package/admin/README.MD +0 -0
- package/admin/base.mjs +447 -0
- package/admin/index.mjs +19 -0
- package/admin/monitor/job.mjs +24 -0
- package/admin/monitor/jobLog.mjs +8 -0
- package/admin/monitor/logininfor.mjs +23 -0
- package/admin/monitor/operlog.mjs +9 -0
- package/admin/monitor/server.mjs +54 -0
- package/admin/service.mjs +10 -0
- package/admin/system/component.mjs +16 -0
- package/admin/system/config.mjs +8 -0
- package/admin/system/dept.mjs +24 -0
- package/admin/system/dict.mjs +34 -0
- package/admin/system/login.mjs +119 -0
- package/admin/system/menu.mjs +33 -0
- package/admin/system/notice.mjs +8 -0
- package/admin/system/path.mjs +53 -0
- package/admin/system/post.mjs +8 -0
- package/admin/system/role.mjs +105 -0
- package/admin/system/user.mjs +93 -0
- package/admin/tool/gen.mjs +95 -0
- package/admin/tool/helper.mjs +1335 -0
- package/admin/tool/pm2.mjs +71 -0
- package/admin/tool/store.mjs +84 -0
- package/admin/tool/upload.mjs +112 -0
- package/app/README.MD +0 -0
- package/app/index.mjs +9 -0
- package/bin.mjs +211 -0
- package/build.mjs +25 -0
- package/common/README.MD +0 -0
- package/common/config.mjs +40 -0
- package/common/pm2.mjs +145 -0
- package/common/service.mjs +79 -0
- package/common/service0.mjs +468 -0
- package/common/tools.mjs +314 -0
- package/common/type.ts +498 -0
- package/file/README.MD +0 -0
- package/files/.env.production +11 -0
- package/files/gen.js +76 -0
- package/files/genImportTable.vue +120 -0
- package/files/genIndex.vue +309 -0
- package/files/genInfoForm.vue +302 -0
- package/files/login.vue +237 -0
- package/files/menu.js +68 -0
- package/files/menuIndex.vue +447 -0
- package/files/pm2.js +88 -0
- package/files/pm2Data.vue +335 -0
- package/files/pm2Index.vue +343 -0
- package/files/routerIndex.js +204 -0
- package/files/serverIndex.vue +215 -0
- package/files/store.js +96 -0
- package/files/storeData.vue +294 -0
- package/files/storeIndex.vue +245 -0
- package/files/upload.js +47 -0
- package/files/uploadIndex.vue +240 -0
- package/files/vite.config.js +58 -0
- package/index.mjs +28 -0
- package/jwt/README.MD +12 -0
- package/jwt/index.mjs +17 -0
- package/package.json +22 -0
- package/proxy/README.MD +0 -0
- package/proxy/index.mjs +16 -0
- package/static/README.MD +0 -0
- package/static/admin/assets/401-CYieuz9-.js +1 -0
- package/static/admin/assets/401-CYieuz9-.js.gz +0 -0
- package/static/admin/assets/401-DmT2Eyz6.css +1 -0
- package/static/admin/assets/401-HGF6Q5qM.gif +0 -0
- package/static/admin/assets/404-DFv5Zpvm.js +1 -0
- package/static/admin/assets/404-DFv5Zpvm.js.gz +0 -0
- package/static/admin/assets/404-Dy3nURRX.js +1 -0
- package/static/admin/assets/404-Dy3nURRX.js.gz +0 -0
- package/static/admin/assets/404-N4aRkdWY.png +0 -0
- package/static/admin/assets/404-uZCOR2Ze.css +1 -0
- package/static/admin/assets/404-uZCOR2Ze.css.gz +0 -0
- package/static/admin/assets/404_cloud-CPexjtDj.png +0 -0
- package/static/admin/assets/authRole-ma37t91O.js +1 -0
- package/static/admin/assets/authRole-ma37t91O.js.gz +0 -0
- package/static/admin/assets/authUser-C2Y6gkW3.js +1 -0
- package/static/admin/assets/authUser-C2Y6gkW3.js.gz +0 -0
- package/static/admin/assets/basicInfoForm-Cqv-g0Vq.js +1 -0
- package/static/admin/assets/basicInfoForm-Cqv-g0Vq.js.gz +0 -0
- package/static/admin/assets/bug-10dePVta.js +1 -0
- package/static/admin/assets/bug-10dePVta.js.gz +0 -0
- package/static/admin/assets/build-2jMyI6eP.js +1 -0
- package/static/admin/assets/build-2jMyI6eP.js.gz +0 -0
- package/static/admin/assets/button-BlSCM_GH.js +1 -0
- package/static/admin/assets/button-BlSCM_GH.js.gz +0 -0
- package/static/admin/assets/cache-CRGI5LFU.js +1 -0
- package/static/admin/assets/cascader-CXIOcY1C.js +1 -0
- package/static/admin/assets/cascader-CXIOcY1C.js.gz +0 -0
- package/static/admin/assets/chart-BsLMrzXU.js +1 -0
- package/static/admin/assets/checkbox-Bpiun3bf.js +1 -0
- package/static/admin/assets/checkbox-Bpiun3bf.js.gz +0 -0
- package/static/admin/assets/clipboard-DaV3cn7f.js +1 -0
- package/static/admin/assets/clipboard-DaV3cn7f.js.gz +0 -0
- package/static/admin/assets/code-DgJ8cT4a.js +1 -0
- package/static/admin/assets/color-y1Sshoou.js +1 -0
- package/static/admin/assets/color-y1Sshoou.js.gz +0 -0
- package/static/admin/assets/component-Djp9s69L.js +1 -0
- package/static/admin/assets/component-Djp9s69L.js.gz +0 -0
- package/static/admin/assets/createTable-CpixhIJI.js +1 -0
- package/static/admin/assets/createTable-CpixhIJI.js.gz +0 -0
- package/static/admin/assets/dashboard-Dy7qt_a2.js +1 -0
- package/static/admin/assets/dashboard-Dy7qt_a2.js.gz +0 -0
- package/static/admin/assets/data-B6ExfNCI.js +1 -0
- package/static/admin/assets/data-B6ExfNCI.js.gz +0 -0
- package/static/admin/assets/data-BNwnwlkO.js +34 -0
- package/static/admin/assets/data-BNwnwlkO.js.gz +0 -0
- package/static/admin/assets/data-C3FuPwta.css +1 -0
- package/static/admin/assets/data-DmSA0HcO.js +1 -0
- package/static/admin/assets/data-DmSA0HcO.js.gz +0 -0
- package/static/admin/assets/date-B1FSITvi.js +1 -0
- package/static/admin/assets/date-B1FSITvi.js.gz +0 -0
- package/static/admin/assets/date-range-B8MgYLb1.js +1 -0
- package/static/admin/assets/date-range-B8MgYLb1.js.gz +0 -0
- package/static/admin/assets/dict-Bi_GqSXR.js +1 -0
- package/static/admin/assets/dict-Bi_GqSXR.js.gz +0 -0
- package/static/admin/assets/documentation-uH9BvL5U.js +1 -0
- package/static/admin/assets/download-DeIzgQWH.js +1 -0
- package/static/admin/assets/download-DeIzgQWH.js.gz +0 -0
- package/static/admin/assets/drag-BG1_I1vT.js +1 -0
- package/static/admin/assets/druid-BybW_S_B.js +1 -0
- package/static/admin/assets/edit-D0DI9pAq.js +1 -0
- package/static/admin/assets/editTable-zr5bdAM7.js +1 -0
- package/static/admin/assets/editTable-zr5bdAM7.js.gz +0 -0
- package/static/admin/assets/education-47KsSYIl.js +1 -0
- package/static/admin/assets/email-Dig28Vt2.js +1 -0
- package/static/admin/assets/example-CnLLAFb9.js +1 -0
- package/static/admin/assets/excel-D3hj5F35.js +1 -0
- package/static/admin/assets/exit-fullscreen-dXhGKlQm.js +1 -0
- package/static/admin/assets/exit-fullscreen-dXhGKlQm.js.gz +0 -0
- package/static/admin/assets/eye-DqRz4sMZ.js +1 -0
- package/static/admin/assets/eye-DqRz4sMZ.js.gz +0 -0
- package/static/admin/assets/eye-open-BxlshWqB.js +1 -0
- package/static/admin/assets/eye-open-BxlshWqB.js.gz +0 -0
- package/static/admin/assets/form-BDTA_i-I.js +1 -0
- package/static/admin/assets/form-BDTA_i-I.js.gz +0 -0
- package/static/admin/assets/fullscreen-0JHt5yWX.js +1 -0
- package/static/admin/assets/gen-DLNrNhtb.js +1 -0
- package/static/admin/assets/genInfoForm-CMDsV5QX.js +1 -0
- package/static/admin/assets/genInfoForm-CMDsV5QX.js.gz +0 -0
- package/static/admin/assets/github-AJ0WQBa2.js +1 -0
- package/static/admin/assets/github-AJ0WQBa2.js.gz +0 -0
- package/static/admin/assets/guide-DZWUPi2j.js +1 -0
- package/static/admin/assets/icon-BtMv6Od8.js +1 -0
- package/static/admin/assets/icon-BtMv6Od8.js.gz +0 -0
- package/static/admin/assets/importTable-BsBsGfWB.js +1 -0
- package/static/admin/assets/importTable-BsBsGfWB.js.gz +0 -0
- package/static/admin/assets/index-1Gtzb1EG.css +1 -0
- package/static/admin/assets/index-1Gtzb1EG.css.gz +0 -0
- package/static/admin/assets/index-22TxXV_H.js +1 -0
- package/static/admin/assets/index-2PS_9Njt.js +1 -0
- package/static/admin/assets/index-2PS_9Njt.js.gz +0 -0
- package/static/admin/assets/index-2QWdVCKT.js +1 -0
- package/static/admin/assets/index-BH2yis6M.js +1 -0
- package/static/admin/assets/index-BYiWbDzj.js +137 -0
- package/static/admin/assets/index-BYiWbDzj.js.gz +0 -0
- package/static/admin/assets/index-BcoIBYYg.js +1 -0
- package/static/admin/assets/index-BcoIBYYg.js.gz +0 -0
- package/static/admin/assets/index-BdfyYxZX.css +1 -0
- package/static/admin/assets/index-BdfyYxZX.css.gz +0 -0
- package/static/admin/assets/index-BpFFXMK5.js +1 -0
- package/static/admin/assets/index-BpFFXMK5.js.gz +0 -0
- package/static/admin/assets/index-CKPU_AaL.js +1 -0
- package/static/admin/assets/index-CKPU_AaL.js.gz +0 -0
- package/static/admin/assets/index-CXsykB0X.js +1 -0
- package/static/admin/assets/index-CXsykB0X.js.gz +0 -0
- package/static/admin/assets/index-CfHRKVJR.js +1 -0
- package/static/admin/assets/index-CfHRKVJR.js.gz +0 -0
- package/static/admin/assets/index-ChrWcM7o.js +1 -0
- package/static/admin/assets/index-ChrWcM7o.js.gz +0 -0
- package/static/admin/assets/index-CyGqJLpz.css +1 -0
- package/static/admin/assets/index-Czuq8j-W.js +1 -0
- package/static/admin/assets/index-D5kEXJN3.js +1 -0
- package/static/admin/assets/index-D5kEXJN3.js.gz +0 -0
- package/static/admin/assets/index-D7sjRL--.js +1 -0
- package/static/admin/assets/index-D7sjRL--.js.gz +0 -0
- package/static/admin/assets/index-D9JRAPr4.js +1 -0
- package/static/admin/assets/index-D9JRAPr4.js.gz +0 -0
- package/static/admin/assets/index-DADWjT7Y.js +1 -0
- package/static/admin/assets/index-DADWjT7Y.js.gz +0 -0
- package/static/admin/assets/index-DUTtT4NU.js +1 -0
- package/static/admin/assets/index-DUTtT4NU.js.gz +0 -0
- package/static/admin/assets/index-DZR__uIb.js +1 -0
- package/static/admin/assets/index-DZR__uIb.js.gz +0 -0
- package/static/admin/assets/index-Da2r8G2b.js +1 -0
- package/static/admin/assets/index-Da2r8G2b.js.gz +0 -0
- package/static/admin/assets/index-DakybE_b.js +1 -0
- package/static/admin/assets/index-DakybE_b.js.gz +0 -0
- package/static/admin/assets/index-DdnU2rJ0.css +1 -0
- package/static/admin/assets/index-H21xXZr5.js +60 -0
- package/static/admin/assets/index-H21xXZr5.js.gz +0 -0
- package/static/admin/assets/index-PGDGQEbD.js +1 -0
- package/static/admin/assets/index-PGDGQEbD.js.gz +0 -0
- package/static/admin/assets/index-Rm6qYhrO.js +1 -0
- package/static/admin/assets/index-VG6ZkdYt.js +1 -0
- package/static/admin/assets/index-VG6ZkdYt.js.gz +0 -0
- package/static/admin/assets/index-YVnsjgTq.js +1 -0
- package/static/admin/assets/index-YVnsjgTq.js.gz +0 -0
- package/static/admin/assets/index-t3XJ47us.css +1 -0
- package/static/admin/assets/index-t3XJ47us.css.gz +0 -0
- package/static/admin/assets/index-xfai-fRy.js +1 -0
- package/static/admin/assets/index-xfai-fRy.js.gz +0 -0
- package/static/admin/assets/input-BJoPMnBW.js +1 -0
- package/static/admin/assets/international-CmzG1OHg.js +1 -0
- package/static/admin/assets/international-CmzG1OHg.js.gz +0 -0
- package/static/admin/assets/job-BcmuINx7.js +1 -0
- package/static/admin/assets/job-BcmuINx7.js.gz +0 -0
- package/static/admin/assets/job-COdMvNx2.js +1 -0
- package/static/admin/assets/language-CaW1LMEk.js +1 -0
- package/static/admin/assets/language-CaW1LMEk.js.gz +0 -0
- package/static/admin/assets/link-C93f4PgI.js +1 -0
- package/static/admin/assets/list-C7O8B4zW.js +1 -0
- package/static/admin/assets/list-C7O8B4zW.js.gz +0 -0
- package/static/admin/assets/list-DUaPnccL.js +1 -0
- package/static/admin/assets/list-DUaPnccL.js.gz +0 -0
- package/static/admin/assets/lock-Bexeb9hp.js +1 -0
- package/static/admin/assets/log-CF2F-nSs.js +1 -0
- package/static/admin/assets/log-CF2F-nSs.js.gz +0 -0
- package/static/admin/assets/log-g6qirYnf.js +1 -0
- package/static/admin/assets/log-g6qirYnf.js.gz +0 -0
- package/static/admin/assets/login-1ezV0PC1.css +1 -0
- package/static/admin/assets/login-1ezV0PC1.css.gz +0 -0
- package/static/admin/assets/login-BnkuYS6J.js +22 -0
- package/static/admin/assets/login-BnkuYS6J.js.gz +0 -0
- package/static/admin/assets/login-background-Yn3y1TP_.jpg +0 -0
- package/static/admin/assets/logininfor-Bm9ZYYR7.js +1 -0
- package/static/admin/assets/logininfor-Bm9ZYYR7.js.gz +0 -0
- package/static/admin/assets/logo-BjsPc2xl.png +0 -0
- package/static/admin/assets/menu-BIu3IsSF.js +1 -0
- package/static/admin/assets/message-UkR-VIBB.js +1 -0
- package/static/admin/assets/money-B1qqPuhn.js +1 -0
- package/static/admin/assets/monitor-gwnnVq4l.js +1 -0
- package/static/admin/assets/monitor-gwnnVq4l.js.gz +0 -0
- package/static/admin/assets/nested-B4d5u3hW.js +1 -0
- package/static/admin/assets/number-D4hB_nHC.js +1 -0
- package/static/admin/assets/number-D4hB_nHC.js.gz +0 -0
- package/static/admin/assets/online-C2ZP8pdY.js +1 -0
- package/static/admin/assets/online-C2ZP8pdY.js.gz +0 -0
- package/static/admin/assets/password-DfGvqQpB.js +1 -0
- package/static/admin/assets/password-DfGvqQpB.js.gz +0 -0
- package/static/admin/assets/pay-2ZbgPnxn.png +0 -0
- package/static/admin/assets/pdf-CD9mOGjJ.js +1 -0
- package/static/admin/assets/pdf-CD9mOGjJ.js.gz +0 -0
- package/static/admin/assets/people-CdGMHN63.js +1 -0
- package/static/admin/assets/people-CdGMHN63.js.gz +0 -0
- package/static/admin/assets/peoples-BRYsIqmI.js +1 -0
- package/static/admin/assets/phone-BpAUIz0g.js +1 -0
- package/static/admin/assets/phone-BpAUIz0g.js.gz +0 -0
- package/static/admin/assets/pm2-BkmkkE2A.js +1 -0
- package/static/admin/assets/post-DrLDyPY9.js +1 -0
- package/static/admin/assets/post-DrLDyPY9.js.gz +0 -0
- package/static/admin/assets/profile-DruvkrZU.jpg +0 -0
- package/static/admin/assets/qq-D8j4O83Y.js +1 -0
- package/static/admin/assets/qq-D8j4O83Y.js.gz +0 -0
- package/static/admin/assets/question-CvYWQbyW.js +1 -0
- package/static/admin/assets/question-CvYWQbyW.js.gz +0 -0
- package/static/admin/assets/radio-B0t9wPBQ.js +1 -0
- package/static/admin/assets/radio-B0t9wPBQ.js.gz +0 -0
- package/static/admin/assets/rate-CgnHQvKS.js +1 -0
- package/static/admin/assets/rate-CgnHQvKS.js.gz +0 -0
- package/static/admin/assets/redis-D4ECyT6a.js +1 -0
- package/static/admin/assets/redis-D4ECyT6a.js.gz +0 -0
- package/static/admin/assets/redis-list-BtKGPnqO.js +1 -0
- package/static/admin/assets/redis-list-BtKGPnqO.js.gz +0 -0
- package/static/admin/assets/register-B9RmZvjt.js +1 -0
- package/static/admin/assets/register-B9RmZvjt.js.gz +0 -0
- package/static/admin/assets/register-n3u7gqca.css +1 -0
- package/static/admin/assets/resetPwd-M0EIDnQk.js +1 -0
- package/static/admin/assets/resetPwd-M0EIDnQk.js.gz +0 -0
- package/static/admin/assets/role-XbHkNxnW.js +1 -0
- package/static/admin/assets/role-XbHkNxnW.js.gz +0 -0
- package/static/admin/assets/row-CRXKIHjm.js +1 -0
- package/static/admin/assets/row-CRXKIHjm.js.gz +0 -0
- package/static/admin/assets/search-CUfclCsR.js +1 -0
- package/static/admin/assets/select-DhuHHMxz.js +1 -0
- package/static/admin/assets/select-DhuHHMxz.js.gz +0 -0
- package/static/admin/assets/selectUser-DA_rE9J_.js +1 -0
- package/static/admin/assets/selectUser-DA_rE9J_.js.gz +0 -0
- package/static/admin/assets/server-unS7EyF7.js +1 -0
- package/static/admin/assets/shopping-CU1IRvxM.js +1 -0
- package/static/admin/assets/shopping-CU1IRvxM.js.gz +0 -0
- package/static/admin/assets/size-Cj9fB5Rp.js +1 -0
- package/static/admin/assets/skill-B8f_I4m_.js +1 -0
- package/static/admin/assets/skill-B8f_I4m_.js.gz +0 -0
- package/static/admin/assets/slider-BGfehM6X.js +1 -0
- package/static/admin/assets/star-kST8a72V.js +1 -0
- package/static/admin/assets/store-CX7IRN8X.js +1 -0
- package/static/admin/assets/swagger-BHGXZ2Jt.js +1 -0
- package/static/admin/assets/swagger-BHGXZ2Jt.js.gz +0 -0
- package/static/admin/assets/switch-CvaargRJ.js +1 -0
- package/static/admin/assets/system-DcNSH_Fq.js +1 -0
- package/static/admin/assets/system-DcNSH_Fq.js.gz +0 -0
- package/static/admin/assets/tab-nA3f0aBt.js +1 -0
- package/static/admin/assets/table-5PRh60AQ.js +1 -0
- package/static/admin/assets/test-CEJIIaDM.js +1 -0
- package/static/admin/assets/test-CEJIIaDM.js.gz +0 -0
- package/static/admin/assets/textarea-CJWXlgbJ.js +1 -0
- package/static/admin/assets/theme-CyGq941x.js +1 -0
- package/static/admin/assets/time-BVERp0sU.js +1 -0
- package/static/admin/assets/time-BVERp0sU.js.gz +0 -0
- package/static/admin/assets/time-range-D3dxgtLj.js +1 -0
- package/static/admin/assets/time-range-D3dxgtLj.js.gz +0 -0
- package/static/admin/assets/tool-D8kXk1l-.js +1 -0
- package/static/admin/assets/tool-D8kXk1l-.js.gz +0 -0
- package/static/admin/assets/tree-BCtS3oPD.js +1 -0
- package/static/admin/assets/tree-BCtS3oPD.js.gz +0 -0
- package/static/admin/assets/tree-table-CnOS99I9.js +1 -0
- package/static/admin/assets/tree-table-CnOS99I9.js.gz +0 -0
- package/static/admin/assets/type-BU7MsCG8.js +1 -0
- package/static/admin/assets/upload-BueI-Il1.js +1 -0
- package/static/admin/assets/upload-BueI-Il1.js.gz +0 -0
- package/static/admin/assets/user-DCGYGA9G.js +1 -0
- package/static/admin/assets/user-DCGYGA9G.js.gz +0 -0
- package/static/admin/assets/user-DqMuW5cU.js +1 -0
- package/static/admin/assets/userAvatar-BAmwMY1G.css +1 -0
- package/static/admin/assets/userAvatar-BAmwMY1G.css.gz +0 -0
- package/static/admin/assets/userAvatar-Bax34kaQ.js +7 -0
- package/static/admin/assets/userAvatar-Bax34kaQ.js.gz +0 -0
- package/static/admin/assets/userInfo-OvdBjEQX.js +1 -0
- package/static/admin/assets/userInfo-OvdBjEQX.js.gz +0 -0
- package/static/admin/assets/validCode-COB1iLxa.js +1 -0
- package/static/admin/assets/validCode-COB1iLxa.js.gz +0 -0
- package/static/admin/assets/wechat-lmQOcPZu.js +1 -0
- package/static/admin/assets/wechat-lmQOcPZu.js.gz +0 -0
- package/static/admin/assets/zip-DIOSZc69.js +1 -0
- package/static/admin/assets/zip-DIOSZc69.js.gz +0 -0
- package/static/admin/favicon.ico +0 -0
- package/static/admin/index.html +216 -0
- package/static/admin/index.html.gz +0 -0
- package/store1/README.MD +0 -0
- package/store1/generic.mjs +102 -0
- package/store1/index.mjs +30 -0
- package/store1/monitor.mjs +13 -0
- package/store1/role.mjs +137 -0
- package/store1/store/0/data +0 -0
- package/store1/store/0/index +0 -0
- package/store1/store/0/index.mjs +15 -0
- package/store1/store/1/buffer/464135 +1 -0
- package/store1/store/1/buffer/464587 +1 -0
- package/store1/store/1/data +0 -0
- package/store1/store/1/data-LAPTOP-S8G0S6EH +0 -0
- package/store1/store/1/index +0 -0
- package/store1/store/1/index-LAPTOP-S8G0S6EH +0 -0
- package/store1/store/1/index.mjs +4045 -0
- package/store1/store/1/type.ts +1492 -0
- package/store1/store/index.mjs +23 -0
- package/store1/store2/0/data +0 -0
- package/store1/store2/0/index +0 -0
- package/store1/store2/0/index.mjs +15 -0
- package/store1/store2/1/buffer/464135 +1 -0
- package/store1/store2/1/buffer/464587 +1 -0
- package/store1/store2/1/data +0 -0
- package/store1/store2/1/data-LAPTOP-S8G0S6EH +0 -0
- package/store1/store2/1/index +0 -0
- package/store1/store2/1/index-LAPTOP-S8G0S6EH +0 -0
- package/store1/store2/1/index.mjs +4045 -0
- package/store1/store2/1/type.ts +1492 -0
- package/store1/store2/index.mjs +23 -0
- package/store1/system.mjs +67 -0
- package/store1/tool.mjs +472 -0
- package/store1/user.mjs +228 -0
@@ -0,0 +1,251 @@
|
|
1
|
+
<template>
|
2
|
+
<div>
|
3
|
+
<el-upload
|
4
|
+
:action="uploadUrl"
|
5
|
+
:before-upload="handleBeforeUpload"
|
6
|
+
:on-success="handleUploadSuccess"
|
7
|
+
:on-error="handleUploadError"
|
8
|
+
name="file"
|
9
|
+
:show-file-list="false"
|
10
|
+
:headers="headers"
|
11
|
+
class="editor-img-uploader"
|
12
|
+
v-if="type == 'url'"
|
13
|
+
>
|
14
|
+
<i ref="uploadRef" class="editor-img-uploader"></i>
|
15
|
+
</el-upload>
|
16
|
+
</div>
|
17
|
+
<div class="editor">
|
18
|
+
<quill-editor
|
19
|
+
ref="quillEditorRef"
|
20
|
+
v-model:content="content"
|
21
|
+
contentType="html"
|
22
|
+
@textChange="(e) => $emit('update:modelValue', content)"
|
23
|
+
:options="options"
|
24
|
+
:style="styles"
|
25
|
+
/>
|
26
|
+
</div>
|
27
|
+
</template>
|
28
|
+
|
29
|
+
<script setup>
|
30
|
+
import { QuillEditor } from "@vueup/vue-quill";
|
31
|
+
import "@vueup/vue-quill/dist/vue-quill.snow.css";
|
32
|
+
import { getToken } from "@/utils/auth";
|
33
|
+
|
34
|
+
const { proxy } = getCurrentInstance();
|
35
|
+
|
36
|
+
const quillEditorRef = ref();
|
37
|
+
const uploadUrl = ref(import.meta.env.VITE_APP_BASE_API + "/common/upload"); // 上传的图片服务器地址
|
38
|
+
const headers = ref({
|
39
|
+
Authorization: "Bearer " + getToken()
|
40
|
+
});
|
41
|
+
|
42
|
+
const props = defineProps({
|
43
|
+
/* 编辑器的内容 */
|
44
|
+
modelValue: {
|
45
|
+
type: String,
|
46
|
+
},
|
47
|
+
/* 高度 */
|
48
|
+
height: {
|
49
|
+
type: Number,
|
50
|
+
default: null,
|
51
|
+
},
|
52
|
+
/* 最小高度 */
|
53
|
+
minHeight: {
|
54
|
+
type: Number,
|
55
|
+
default: null,
|
56
|
+
},
|
57
|
+
/* 只读 */
|
58
|
+
readOnly: {
|
59
|
+
type: Boolean,
|
60
|
+
default: false,
|
61
|
+
},
|
62
|
+
/* 上传文件大小限制(MB) */
|
63
|
+
fileSize: {
|
64
|
+
type: Number,
|
65
|
+
default: 5,
|
66
|
+
},
|
67
|
+
/* 类型(base64格式、url格式) */
|
68
|
+
type: {
|
69
|
+
type: String,
|
70
|
+
default: "url",
|
71
|
+
}
|
72
|
+
});
|
73
|
+
|
74
|
+
const options = ref({
|
75
|
+
theme: "snow",
|
76
|
+
bounds: document.body,
|
77
|
+
debug: "warn",
|
78
|
+
modules: {
|
79
|
+
// 工具栏配置
|
80
|
+
toolbar: [
|
81
|
+
["bold", "italic", "underline", "strike"], // 加粗 斜体 下划线 删除线
|
82
|
+
["blockquote", "code-block"], // 引用 代码块
|
83
|
+
[{ list: "ordered" }, { list: "bullet" }], // 有序、无序列表
|
84
|
+
[{ indent: "-1" }, { indent: "+1" }], // 缩进
|
85
|
+
[{ size: ["small", false, "large", "huge"] }], // 字体大小
|
86
|
+
[{ header: [1, 2, 3, 4, 5, 6, false] }], // 标题
|
87
|
+
[{ color: [] }, { background: [] }], // 字体颜色、字体背景颜色
|
88
|
+
[{ align: [] }], // 对齐方式
|
89
|
+
["clean"], // 清除文本格式
|
90
|
+
["link", "image", "video"] // 链接、图片、视频
|
91
|
+
],
|
92
|
+
},
|
93
|
+
placeholder: "请输入内容",
|
94
|
+
readOnly: props.readOnly
|
95
|
+
});
|
96
|
+
|
97
|
+
const styles = computed(() => {
|
98
|
+
let style = {};
|
99
|
+
if (props.minHeight) {
|
100
|
+
style.minHeight = `${props.minHeight}px`;
|
101
|
+
}
|
102
|
+
if (props.height) {
|
103
|
+
style.height = `${props.height}px`;
|
104
|
+
}
|
105
|
+
return style;
|
106
|
+
});
|
107
|
+
|
108
|
+
const content = ref("");
|
109
|
+
watch(() => props.modelValue, (v) => {
|
110
|
+
if (v !== content.value) {
|
111
|
+
content.value = v === undefined ? "<p></p>" : v;
|
112
|
+
}
|
113
|
+
}, { immediate: true });
|
114
|
+
|
115
|
+
// 如果设置了上传地址则自定义图片上传事件
|
116
|
+
onMounted(() => {
|
117
|
+
if (props.type == 'url') {
|
118
|
+
let quill = quillEditorRef.value.getQuill();
|
119
|
+
let toolbar = quill.getModule("toolbar");
|
120
|
+
toolbar.addHandler("image", (value) => {
|
121
|
+
if (value) {
|
122
|
+
proxy.$refs.uploadRef.click();
|
123
|
+
} else {
|
124
|
+
quill.format("image", false);
|
125
|
+
}
|
126
|
+
});
|
127
|
+
}
|
128
|
+
});
|
129
|
+
|
130
|
+
// 上传前校检格式和大小
|
131
|
+
function handleBeforeUpload(file) {
|
132
|
+
const type = ["image/jpeg", "image/jpg", "image/png", "image/svg"];
|
133
|
+
const isJPG = type.includes(file.type);
|
134
|
+
//检验文件格式
|
135
|
+
if (!isJPG) {
|
136
|
+
proxy.$modal.msgError(`图片格式错误!`);
|
137
|
+
return false;
|
138
|
+
}
|
139
|
+
// 校检文件大小
|
140
|
+
if (props.fileSize) {
|
141
|
+
const isLt = file.size / 1024 / 1024 < props.fileSize;
|
142
|
+
if (!isLt) {
|
143
|
+
proxy.$modal.msgError(`上传文件大小不能超过 ${props.fileSize} MB!`);
|
144
|
+
return false;
|
145
|
+
}
|
146
|
+
}
|
147
|
+
return true;
|
148
|
+
}
|
149
|
+
|
150
|
+
// 上传成功处理
|
151
|
+
function handleUploadSuccess(res, file) {
|
152
|
+
// 如果上传成功
|
153
|
+
if (res.code == 200) {
|
154
|
+
// 获取富文本实例
|
155
|
+
let quill = toRaw(quillEditorRef.value).getQuill();
|
156
|
+
// 获取光标位置
|
157
|
+
let length = quill.selection.savedRange.index;
|
158
|
+
// 插入图片,res.url为服务器返回的图片链接地址
|
159
|
+
quill.insertEmbed(length, "image", import.meta.env.VITE_APP_BASE_API + res.fileName);
|
160
|
+
// 调整光标到最后
|
161
|
+
quill.setSelection(length + 1);
|
162
|
+
} else {
|
163
|
+
proxy.$modal.msgError("图片插入失败");
|
164
|
+
}
|
165
|
+
}
|
166
|
+
|
167
|
+
// 上传失败处理
|
168
|
+
function handleUploadError() {
|
169
|
+
proxy.$modal.msgError("图片插入失败");
|
170
|
+
}
|
171
|
+
</script>
|
172
|
+
|
173
|
+
<style>
|
174
|
+
.editor-img-uploader {
|
175
|
+
display: none;
|
176
|
+
}
|
177
|
+
.editor, .ql-toolbar {
|
178
|
+
white-space: pre-wrap !important;
|
179
|
+
line-height: normal !important;
|
180
|
+
}
|
181
|
+
.quill-img {
|
182
|
+
display: none;
|
183
|
+
}
|
184
|
+
.ql-snow .ql-tooltip[data-mode="link"]::before {
|
185
|
+
content: "请输入链接地址:";
|
186
|
+
}
|
187
|
+
.ql-snow .ql-tooltip.ql-editing a.ql-action::after {
|
188
|
+
border-right: 0px;
|
189
|
+
content: "保存";
|
190
|
+
padding-right: 0px;
|
191
|
+
}
|
192
|
+
.ql-snow .ql-tooltip[data-mode="video"]::before {
|
193
|
+
content: "请输入视频地址:";
|
194
|
+
}
|
195
|
+
.ql-snow .ql-picker.ql-size .ql-picker-label::before,
|
196
|
+
.ql-snow .ql-picker.ql-size .ql-picker-item::before {
|
197
|
+
content: "14px";
|
198
|
+
}
|
199
|
+
.ql-snow .ql-picker.ql-size .ql-picker-label[data-value="small"]::before,
|
200
|
+
.ql-snow .ql-picker.ql-size .ql-picker-item[data-value="small"]::before {
|
201
|
+
content: "10px";
|
202
|
+
}
|
203
|
+
.ql-snow .ql-picker.ql-size .ql-picker-label[data-value="large"]::before,
|
204
|
+
.ql-snow .ql-picker.ql-size .ql-picker-item[data-value="large"]::before {
|
205
|
+
content: "18px";
|
206
|
+
}
|
207
|
+
.ql-snow .ql-picker.ql-size .ql-picker-label[data-value="huge"]::before,
|
208
|
+
.ql-snow .ql-picker.ql-size .ql-picker-item[data-value="huge"]::before {
|
209
|
+
content: "32px";
|
210
|
+
}
|
211
|
+
.ql-snow .ql-picker.ql-header .ql-picker-label::before,
|
212
|
+
.ql-snow .ql-picker.ql-header .ql-picker-item::before {
|
213
|
+
content: "文本";
|
214
|
+
}
|
215
|
+
.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="1"]::before,
|
216
|
+
.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="1"]::before {
|
217
|
+
content: "标题1";
|
218
|
+
}
|
219
|
+
.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="2"]::before,
|
220
|
+
.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="2"]::before {
|
221
|
+
content: "标题2";
|
222
|
+
}
|
223
|
+
.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="3"]::before,
|
224
|
+
.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="3"]::before {
|
225
|
+
content: "标题3";
|
226
|
+
}
|
227
|
+
.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="4"]::before,
|
228
|
+
.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="4"]::before {
|
229
|
+
content: "标题4";
|
230
|
+
}
|
231
|
+
.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="5"]::before,
|
232
|
+
.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="5"]::before {
|
233
|
+
content: "标题5";
|
234
|
+
}
|
235
|
+
.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="6"]::before,
|
236
|
+
.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="6"]::before {
|
237
|
+
content: "标题6";
|
238
|
+
}
|
239
|
+
.ql-snow .ql-picker.ql-font .ql-picker-label::before,
|
240
|
+
.ql-snow .ql-picker.ql-font .ql-picker-item::before {
|
241
|
+
content: "标准字体";
|
242
|
+
}
|
243
|
+
.ql-snow .ql-picker.ql-font .ql-picker-label[data-value="serif"]::before,
|
244
|
+
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value="serif"]::before {
|
245
|
+
content: "衬线字体";
|
246
|
+
}
|
247
|
+
.ql-snow .ql-picker.ql-font .ql-picker-label[data-value="monospace"]::before,
|
248
|
+
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value="monospace"]::before {
|
249
|
+
content: "等宽字体";
|
250
|
+
}
|
251
|
+
</style>
|
@@ -0,0 +1,207 @@
|
|
1
|
+
<template>
|
2
|
+
<div class="upload-file">
|
3
|
+
<el-upload
|
4
|
+
multiple
|
5
|
+
:action="uploadFileUrl"
|
6
|
+
:before-upload="handleBeforeUpload"
|
7
|
+
:file-list="fileList"
|
8
|
+
:limit="limit"
|
9
|
+
:on-error="handleUploadError"
|
10
|
+
:on-exceed="handleExceed"
|
11
|
+
:on-success="handleUploadSuccess"
|
12
|
+
:show-file-list="false"
|
13
|
+
:headers="headers"
|
14
|
+
class="upload-file-uploader"
|
15
|
+
ref="fileUpload"
|
16
|
+
>
|
17
|
+
<!-- 上传按钮 -->
|
18
|
+
<el-button type="primary">选取文件</el-button>
|
19
|
+
</el-upload>
|
20
|
+
<!-- 上传提示 -->
|
21
|
+
<div class="el-upload__tip" v-if="showTip">
|
22
|
+
请上传
|
23
|
+
<template v-if="fileSize"> 大小不超过 <b style="color: #f56c6c">{{ fileSize }}MB</b> </template>
|
24
|
+
<template v-if="fileType"> 格式为 <b style="color: #f56c6c">{{ fileType.join("/") }}</b> </template>
|
25
|
+
的文件
|
26
|
+
</div>
|
27
|
+
<!-- 文件列表 -->
|
28
|
+
<transition-group class="upload-file-list el-upload-list el-upload-list--text" name="el-fade-in-linear" tag="ul">
|
29
|
+
<li :key="file.uid" class="el-upload-list__item ele-upload-list__item-content" v-for="(file, index) in fileList">
|
30
|
+
<el-link :href="`${baseUrl}${file.url}`" :underline="false" target="_blank">
|
31
|
+
<span class="el-icon-document"> {{ getFileName(file.name) }} </span>
|
32
|
+
</el-link>
|
33
|
+
<div class="ele-upload-list__item-content-action">
|
34
|
+
<el-link :underline="false" @click="handleDelete(index)" type="danger">删除</el-link>
|
35
|
+
</div>
|
36
|
+
</li>
|
37
|
+
</transition-group>
|
38
|
+
</div>
|
39
|
+
</template>
|
40
|
+
|
41
|
+
<script setup>
|
42
|
+
import { getToken } from "@/utils/auth";
|
43
|
+
|
44
|
+
const props = defineProps({
|
45
|
+
modelValue: [String, Object, Array],
|
46
|
+
// 数量限制
|
47
|
+
limit: {
|
48
|
+
type: Number,
|
49
|
+
default: 5,
|
50
|
+
},
|
51
|
+
// 大小限制(MB)
|
52
|
+
fileSize: {
|
53
|
+
type: Number,
|
54
|
+
default: 5,
|
55
|
+
},
|
56
|
+
// 文件类型, 例如['png', 'jpg', 'jpeg']
|
57
|
+
fileType: {
|
58
|
+
type: Array,
|
59
|
+
default: () => ["doc", "xls", "ppt", "txt", "pdf"],
|
60
|
+
},
|
61
|
+
// 是否显示提示
|
62
|
+
isShowTip: {
|
63
|
+
type: Boolean,
|
64
|
+
default: true
|
65
|
+
}
|
66
|
+
});
|
67
|
+
|
68
|
+
const { proxy } = getCurrentInstance();
|
69
|
+
const emit = defineEmits();
|
70
|
+
const number = ref(0);
|
71
|
+
const uploadList = ref([]);
|
72
|
+
const baseUrl = import.meta.env.VITE_APP_BASE_API;
|
73
|
+
const uploadFileUrl = ref(import.meta.env.VITE_APP_BASE_API + "/common/upload"); // 上传文件服务器地址
|
74
|
+
const headers = ref({ Authorization: "Bearer " + getToken() });
|
75
|
+
const fileList = ref([]);
|
76
|
+
const showTip = computed(
|
77
|
+
() => props.isShowTip && (props.fileType || props.fileSize)
|
78
|
+
);
|
79
|
+
|
80
|
+
watch(() => props.modelValue, val => {
|
81
|
+
if (val) {
|
82
|
+
let temp = 1;
|
83
|
+
// 首先将值转为数组
|
84
|
+
const list = Array.isArray(val) ? val : props.modelValue.split(',');
|
85
|
+
// 然后将数组转为对象数组
|
86
|
+
fileList.value = list.map(item => {
|
87
|
+
if (typeof item === "string") {
|
88
|
+
item = { name: item, url: item };
|
89
|
+
}
|
90
|
+
item.uid = item.uid || new Date().getTime() + temp++;
|
91
|
+
return item;
|
92
|
+
});
|
93
|
+
} else {
|
94
|
+
fileList.value = [];
|
95
|
+
return [];
|
96
|
+
}
|
97
|
+
},{ deep: true, immediate: true });
|
98
|
+
|
99
|
+
// 上传前校检格式和大小
|
100
|
+
function handleBeforeUpload(file) {
|
101
|
+
// 校检文件类型
|
102
|
+
if (props.fileType.length) {
|
103
|
+
const fileName = file.name.split('.');
|
104
|
+
const fileExt = fileName[fileName.length - 1];
|
105
|
+
const isTypeOk = props.fileType.indexOf(fileExt) >= 0;
|
106
|
+
if (!isTypeOk) {
|
107
|
+
proxy.$modal.msgError(`文件格式不正确, 请上传${props.fileType.join("/")}格式文件!`);
|
108
|
+
return false;
|
109
|
+
}
|
110
|
+
}
|
111
|
+
// 校检文件大小
|
112
|
+
if (props.fileSize) {
|
113
|
+
const isLt = file.size / 1024 / 1024 < props.fileSize;
|
114
|
+
if (!isLt) {
|
115
|
+
proxy.$modal.msgError(`上传文件大小不能超过 ${props.fileSize} MB!`);
|
116
|
+
return false;
|
117
|
+
}
|
118
|
+
}
|
119
|
+
proxy.$modal.loading("正在上传文件,请稍候...");
|
120
|
+
number.value++;
|
121
|
+
return true;
|
122
|
+
}
|
123
|
+
|
124
|
+
// 文件个数超出
|
125
|
+
function handleExceed() {
|
126
|
+
proxy.$modal.msgError(`上传文件数量不能超过 ${props.limit} 个!`);
|
127
|
+
}
|
128
|
+
|
129
|
+
// 上传失败
|
130
|
+
function handleUploadError(err) {
|
131
|
+
proxy.$modal.msgError("上传文件失败");
|
132
|
+
}
|
133
|
+
|
134
|
+
// 上传成功回调
|
135
|
+
function handleUploadSuccess(res, file) {
|
136
|
+
if (res.code === 200) {
|
137
|
+
uploadList.value.push({ name: res.fileName, url: res.fileName });
|
138
|
+
uploadedSuccessfully();
|
139
|
+
} else {
|
140
|
+
number.value--;
|
141
|
+
proxy.$modal.closeLoading();
|
142
|
+
proxy.$modal.msgError(res.msg);
|
143
|
+
proxy.$refs.fileUpload.handleRemove(file);
|
144
|
+
uploadedSuccessfully();
|
145
|
+
}
|
146
|
+
}
|
147
|
+
|
148
|
+
// 删除文件
|
149
|
+
function handleDelete(index) {
|
150
|
+
fileList.value.splice(index, 1);
|
151
|
+
emit("update:modelValue", listToString(fileList.value));
|
152
|
+
}
|
153
|
+
|
154
|
+
// 上传结束处理
|
155
|
+
function uploadedSuccessfully() {
|
156
|
+
if (number.value > 0 && uploadList.value.length === number.value) {
|
157
|
+
fileList.value = fileList.value.filter(f => f.url !== undefined).concat(uploadList.value);
|
158
|
+
uploadList.value = [];
|
159
|
+
number.value = 0;
|
160
|
+
emit("update:modelValue", listToString(fileList.value));
|
161
|
+
proxy.$modal.closeLoading();
|
162
|
+
}
|
163
|
+
}
|
164
|
+
|
165
|
+
// 获取文件名称
|
166
|
+
function getFileName(name) {
|
167
|
+
// 如果是url那么取最后的名字 如果不是直接返回
|
168
|
+
if (name.lastIndexOf("/") > -1) {
|
169
|
+
return name.slice(name.lastIndexOf("/") + 1);
|
170
|
+
} else {
|
171
|
+
return name;
|
172
|
+
}
|
173
|
+
}
|
174
|
+
|
175
|
+
// 对象转成指定字符串分隔
|
176
|
+
function listToString(list, separator) {
|
177
|
+
let strs = "";
|
178
|
+
separator = separator || ",";
|
179
|
+
for (let i in list) {
|
180
|
+
if (list[i].url) {
|
181
|
+
strs += list[i].url + separator;
|
182
|
+
}
|
183
|
+
}
|
184
|
+
return strs != '' ? strs.substr(0, strs.length - 1) : '';
|
185
|
+
}
|
186
|
+
</script>
|
187
|
+
|
188
|
+
<style scoped lang="scss">
|
189
|
+
.upload-file-uploader {
|
190
|
+
margin-bottom: 5px;
|
191
|
+
}
|
192
|
+
.upload-file-list .el-upload-list__item {
|
193
|
+
border: 1px solid #e4e7ed;
|
194
|
+
line-height: 2;
|
195
|
+
margin-bottom: 10px;
|
196
|
+
position: relative;
|
197
|
+
}
|
198
|
+
.upload-file-list .ele-upload-list__item-content {
|
199
|
+
display: flex;
|
200
|
+
justify-content: space-between;
|
201
|
+
align-items: center;
|
202
|
+
color: inherit;
|
203
|
+
}
|
204
|
+
.ele-upload-list__item-content-action .el-link {
|
205
|
+
margin-right: 10px;
|
206
|
+
}
|
207
|
+
</style>
|
@@ -0,0 +1,41 @@
|
|
1
|
+
<template>
|
2
|
+
<div style="padding: 0 15px;" @click="toggleClick">
|
3
|
+
<svg
|
4
|
+
:class="{'is-active':isActive}"
|
5
|
+
class="hamburger"
|
6
|
+
viewBox="0 0 1024 1024"
|
7
|
+
xmlns="http://www.w3.org/2000/svg"
|
8
|
+
width="64"
|
9
|
+
height="64"
|
10
|
+
>
|
11
|
+
<path d="M408 442h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm-8 204c0 4.4 3.6 8 8 8h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56zm504-486H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 632H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM142.4 642.1L298.7 519a8.84 8.84 0 0 0 0-13.9L142.4 381.9c-5.8-4.6-14.4-.5-14.4 6.9v246.3a8.9 8.9 0 0 0 14.4 7z" />
|
12
|
+
</svg>
|
13
|
+
</div>
|
14
|
+
</template>
|
15
|
+
|
16
|
+
<script setup>
|
17
|
+
defineProps({
|
18
|
+
isActive: {
|
19
|
+
type: Boolean,
|
20
|
+
default: false
|
21
|
+
}
|
22
|
+
})
|
23
|
+
|
24
|
+
const emit = defineEmits()
|
25
|
+
const toggleClick = () => {
|
26
|
+
emit('toggleClick');
|
27
|
+
}
|
28
|
+
</script>
|
29
|
+
|
30
|
+
<style scoped>
|
31
|
+
.hamburger {
|
32
|
+
display: inline-block;
|
33
|
+
vertical-align: middle;
|
34
|
+
width: 20px;
|
35
|
+
height: 20px;
|
36
|
+
}
|
37
|
+
|
38
|
+
.hamburger.is-active {
|
39
|
+
transform: rotate(180deg);
|
40
|
+
}
|
41
|
+
</style>
|
@@ -0,0 +1,187 @@
|
|
1
|
+
<template>
|
2
|
+
<div :class="{ 'show': show }" class="header-search">
|
3
|
+
<svg-icon class-name="search-icon" icon-class="search" @click.stop="click" />
|
4
|
+
<el-select
|
5
|
+
ref="headerSearchSelectRef"
|
6
|
+
v-model="search"
|
7
|
+
:remote-method="querySearch"
|
8
|
+
filterable
|
9
|
+
default-first-option
|
10
|
+
remote
|
11
|
+
placeholder="Search"
|
12
|
+
class="header-search-select"
|
13
|
+
@change="change"
|
14
|
+
>
|
15
|
+
<el-option v-for="option in options" :key="option.item.path" :value="option.item" :label="option.item.title.join(' > ')" />
|
16
|
+
</el-select>
|
17
|
+
</div>
|
18
|
+
</template>
|
19
|
+
|
20
|
+
<script setup>
|
21
|
+
import Fuse from 'fuse.js'
|
22
|
+
import { getNormalPath } from '@/utils/ruoyi'
|
23
|
+
import { isHttp } from '@/utils/validate'
|
24
|
+
import usePermissionStore from '@/store/modules/permission'
|
25
|
+
|
26
|
+
const search = ref('');
|
27
|
+
const options = ref([]);
|
28
|
+
const searchPool = ref([]);
|
29
|
+
const show = ref(false);
|
30
|
+
const fuse = ref(undefined);
|
31
|
+
const headerSearchSelectRef = ref(null);
|
32
|
+
const router = useRouter();
|
33
|
+
const routes = computed(() => usePermissionStore().routes);
|
34
|
+
|
35
|
+
function click() {
|
36
|
+
show.value = !show.value
|
37
|
+
if (show.value) {
|
38
|
+
headerSearchSelectRef.value && headerSearchSelectRef.value.focus()
|
39
|
+
}
|
40
|
+
};
|
41
|
+
function close() {
|
42
|
+
headerSearchSelectRef.value && headerSearchSelectRef.value.blur()
|
43
|
+
options.value = []
|
44
|
+
show.value = false
|
45
|
+
}
|
46
|
+
function change(val) {
|
47
|
+
const path = val.path;
|
48
|
+
const query = val.query;
|
49
|
+
if (isHttp(path)) {
|
50
|
+
// http(s):// 路径新窗口打开
|
51
|
+
const pindex = path.indexOf("http");
|
52
|
+
window.open(path.substr(pindex, path.length), "_blank");
|
53
|
+
} else {
|
54
|
+
if (query) {
|
55
|
+
router.push({ path: path, query: JSON.parse(query) });
|
56
|
+
} else {
|
57
|
+
router.push(path)
|
58
|
+
}
|
59
|
+
}
|
60
|
+
|
61
|
+
search.value = ''
|
62
|
+
options.value = []
|
63
|
+
nextTick(() => {
|
64
|
+
show.value = false
|
65
|
+
})
|
66
|
+
}
|
67
|
+
function initFuse(list) {
|
68
|
+
fuse.value = new Fuse(list, {
|
69
|
+
shouldSort: true,
|
70
|
+
threshold: 0.4,
|
71
|
+
location: 0,
|
72
|
+
distance: 100,
|
73
|
+
minMatchCharLength: 1,
|
74
|
+
keys: [{
|
75
|
+
name: 'title',
|
76
|
+
weight: 0.7
|
77
|
+
}, {
|
78
|
+
name: 'path',
|
79
|
+
weight: 0.3
|
80
|
+
}]
|
81
|
+
})
|
82
|
+
}
|
83
|
+
// Filter out the routes that can be displayed in the sidebar
|
84
|
+
// And generate the internationalized title
|
85
|
+
function generateRoutes(routes, basePath = '', prefixTitle = []) {
|
86
|
+
let res = []
|
87
|
+
|
88
|
+
for (const r of routes) {
|
89
|
+
// skip hidden router
|
90
|
+
if (r.hidden) { continue }
|
91
|
+
const p = r.path.length > 0 && r.path[0] === '/' ? r.path : '/' + r.path;
|
92
|
+
const data = {
|
93
|
+
path: !isHttp(r.path) ? getNormalPath(basePath + p) : r.path,
|
94
|
+
title: [...prefixTitle]
|
95
|
+
}
|
96
|
+
|
97
|
+
if (r.meta && r.meta.title) {
|
98
|
+
data.title = [...data.title, r.meta.title]
|
99
|
+
|
100
|
+
if (r.redirect !== 'noRedirect') {
|
101
|
+
// only push the routes with title
|
102
|
+
// special case: need to exclude parent router without redirect
|
103
|
+
res.push(data)
|
104
|
+
}
|
105
|
+
}
|
106
|
+
if (r.query) {
|
107
|
+
data.query = r.query
|
108
|
+
}
|
109
|
+
|
110
|
+
// recursive child routes
|
111
|
+
if (r.children) {
|
112
|
+
const tempRoutes = generateRoutes(r.children, data.path, data.title)
|
113
|
+
if (tempRoutes.length >= 1) {
|
114
|
+
res = [...res, ...tempRoutes]
|
115
|
+
}
|
116
|
+
}
|
117
|
+
}
|
118
|
+
return res
|
119
|
+
}
|
120
|
+
function querySearch(query) {
|
121
|
+
if (query !== '') {
|
122
|
+
options.value = fuse.value.search(query)
|
123
|
+
} else {
|
124
|
+
options.value = []
|
125
|
+
}
|
126
|
+
}
|
127
|
+
|
128
|
+
onMounted(() => {
|
129
|
+
searchPool.value = generateRoutes(routes.value);
|
130
|
+
})
|
131
|
+
|
132
|
+
watchEffect(() => {
|
133
|
+
searchPool.value = generateRoutes(routes.value)
|
134
|
+
})
|
135
|
+
|
136
|
+
watch(show, (value) => {
|
137
|
+
if (value) {
|
138
|
+
document.body.addEventListener('click', close)
|
139
|
+
} else {
|
140
|
+
document.body.removeEventListener('click', close)
|
141
|
+
}
|
142
|
+
})
|
143
|
+
|
144
|
+
watch(searchPool, (list) => {
|
145
|
+
initFuse(list)
|
146
|
+
})
|
147
|
+
</script>
|
148
|
+
|
149
|
+
<style lang='scss' scoped>
|
150
|
+
.header-search {
|
151
|
+
font-size: 0 !important;
|
152
|
+
|
153
|
+
.search-icon {
|
154
|
+
cursor: pointer;
|
155
|
+
font-size: 18px;
|
156
|
+
vertical-align: middle;
|
157
|
+
}
|
158
|
+
|
159
|
+
.header-search-select {
|
160
|
+
font-size: 18px;
|
161
|
+
transition: width 0.2s;
|
162
|
+
width: 0;
|
163
|
+
overflow: hidden;
|
164
|
+
background: transparent;
|
165
|
+
border-radius: 0;
|
166
|
+
display: inline-block;
|
167
|
+
vertical-align: middle;
|
168
|
+
|
169
|
+
:deep(.el-input__inner) {
|
170
|
+
border-radius: 0;
|
171
|
+
border: 0;
|
172
|
+
padding-left: 0;
|
173
|
+
padding-right: 0;
|
174
|
+
box-shadow: none !important;
|
175
|
+
border-bottom: 1px solid #d9d9d9;
|
176
|
+
vertical-align: middle;
|
177
|
+
}
|
178
|
+
}
|
179
|
+
|
180
|
+
&.show {
|
181
|
+
.header-search-select {
|
182
|
+
width: 210px;
|
183
|
+
margin-left: 10px;
|
184
|
+
}
|
185
|
+
}
|
186
|
+
}
|
187
|
+
</style>
|