@utogether/udp-core 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/index.ts +90 -0
- package/build/plugins.ts +26 -0
- package/dist/403-B1R-4vXw.js +64 -0
- package/dist/404-fXPl8csw.js +64 -0
- package/dist/500-eI5842YB.js +66 -0
- package/dist/AuthorityInfo-CfVH6PaB.js +4 -0
- package/dist/AuthorityInfo.vue_vue_type_style_index_0_lang-DbK-f8jH.js +102 -0
- package/dist/AuthorityPanel-BaLMwMgW.js +4 -0
- package/dist/AuthorityPanel.vue_vue_type_style_index_0_lang-C_bkqLD9.js +107 -0
- package/dist/Company-CYC9Avfz.js +25 -0
- package/dist/CompanyPanel-B4MzoqN_.js +206 -0
- package/dist/DataSet-DT-rGICv.js +147 -0
- package/dist/Department-B4BNSiYx.js +25 -0
- package/dist/DepartmentPanel-zJO89L2O.js +224 -0
- package/dist/DesignPanel-S8P0J97f.js +4 -0
- package/dist/DesignPanel.vue_vue_type_style_index_0_lang-DW-_Vqrr.js +1015 -0
- package/dist/DictView-bIS5-rK-.js +95 -0
- package/dist/InvOrganization-MuM2jtsG.js +66 -0
- package/dist/Org-kXHSjsgJ.js +35 -0
- package/dist/Preview-CRyiwUIR.js +48 -0
- package/dist/ReportDefine-WZYIx8Sm.js +10 -0
- package/dist/ReportDesign-D-7GKgpb.js +165 -0
- package/dist/ReportQuery-BIIJny6w.js +75 -0
- package/dist/ReportQueryFrom-OoUl7N2O.js +4 -0
- package/dist/ReportQueryFrom.vue_vue_type_style_index_0_lang-B878fgj8.js +177 -0
- package/dist/ReportTemplate-Cfeq9US-.js +161 -0
- package/dist/Role-BwTV2QMH.js +25 -0
- package/dist/RoleAssign-De1JjOun.js +26 -0
- package/dist/RolePanel-E3RcdByM.js +4 -0
- package/dist/RolePanel-pUBXsqCM.js +4 -0
- package/dist/RolePanel.vue_vue_type_script_setup_true_lang-B2pQwHb0.js +148 -0
- package/dist/RolePanel.vue_vue_type_script_setup_true_lang-CTIad9_Q.js +126 -0
- package/dist/ScrollPanel.vue_vue_type_style_index_0_lang-vMR1fBi0.js +100 -0
- package/dist/Staff-Czm7A8vI.js +25 -0
- package/dist/StaffInfo-DJzvBuxy.js +4 -0
- package/dist/StaffInfo.vue_vue_type_style_index_0_lang-DMTL7KCh.js +108 -0
- package/dist/StaffPanel-CHk60LEz.js +4 -0
- package/dist/StaffPanel.vue_vue_type_script_setup_true_lang-iPKLb5wG.js +114 -0
- package/dist/SysUser-BGwbttRn.js +15 -0
- package/dist/SysUserPanel-BCbKoLKt.js +4 -0
- package/dist/SysUserPanel.vue_vue_type_script_setup_true_lang-0QUjnhjF.js +289 -0
- package/dist/SystemMenu-BkqZSDKl.js +151 -0
- package/dist/UserInfo-BsyAcT2d.js +4 -0
- package/dist/UserInfo.vue_vue_type_style_index_0_lang-D0-KDxAh.js +158 -0
- package/dist/await-to-js.es5-BtRbN2QH.js +10 -0
- package/dist/childView-CF83nhxb.js +4 -0
- package/dist/childView-CyuLTUqC.js +4 -0
- package/dist/childView.vue_vue_type_style_index_0_lang-CNSgGda3.js +187 -0
- package/dist/childView.vue_vue_type_style_index_0_lang-Cch4lE-i.js +144 -0
- package/dist/code-rule-Bz-gnktN.js +147 -0
- package/dist/core.es.js +13 -0
- package/dist/core.umd.js +173 -0
- package/dist/cron-task-CIifSUdW.js +135 -0
- package/dist/frameView-_d2mqjjQ.js +43 -0
- package/dist/img/l_img.svg +1 -0
- package/dist/img/minicolors.png +0 -0
- package/dist/img/v_img.svg +1 -0
- package/dist/index-BKIw8tSn.js +9195 -0
- package/dist/layoutView-DLKVepB8.js +3317 -0
- package/dist/log-in-e7D5Ss1P.js +110 -0
- package/dist/log-out--RRncZhN.js +120 -0
- package/dist/login-LREiDfFU.js +251 -0
- package/dist/login-log-CvVnyGi3.js +68 -0
- package/dist/lov-view-DDrIVILB.js +97 -0
- package/dist/menuInfo-B1FUV-Sk.js +4 -0
- package/dist/menuInfo.vue_vue_type_style_index_0_lang-Cnk3vdtD.js +338 -0
- package/dist/pda-app-CRhVGijN.js +2209 -0
- package/dist/redirect-DiaNDu8F.js +15 -0
- package/dist/resource-BCwx9fEv.js +97 -0
- package/dist/su-welcome-189A7N4r.js +526 -0
- package/dist/sys-config-BZ3sejow.js +277 -0
- package/dist/udp-core.css +9 -0
- package/dist/utogether-r08LNiIZ.js +182 -0
- package/index.ts +36 -0
- package/package.json +16 -0
- package/public/img/l_img.svg +1 -0
- package/public/img/minicolors.png +0 -0
- package/public/img/v_img.svg +1 -0
- package/src/App.vue +70 -0
- package/src/api/http.ts +50 -0
- package/src/api/index.ts +31 -0
- package/src/api/mock.ts +20 -0
- package/src/api/user.ts +43 -0
- package/src/assets/images/avatars.jpg +0 -0
- package/src/assets/images/empty.png +0 -0
- package/src/assets/images/login.png +0 -0
- package/src/assets/images/logo.png +0 -0
- package/src/assets/images/mask-text.jpg +0 -0
- package/src/assets/images/minicolors.png +0 -0
- package/src/assets/images/utogether.png +0 -0
- package/src/assets/images/welcome.png +0 -0
- package/src/assets/status/403.svg +1 -0
- package/src/assets/status/404.svg +1 -0
- package/src/assets/status/500.svg +1 -0
- package/src/assets/svg/back_top.svg +1 -0
- package/src/assets/svg/bg.svg +1 -0
- package/src/assets/svg/close.svg +1 -0
- package/src/assets/svg/close_all.svg +1 -0
- package/src/assets/svg/close_left.svg +1 -0
- package/src/assets/svg/close_other.svg +1 -0
- package/src/assets/svg/close_right.svg +1 -0
- package/src/assets/svg/dark.svg +1 -0
- package/src/assets/svg/day.svg +1 -0
- package/src/assets/svg/enter_outlined.svg +1 -0
- package/src/assets/svg/exit_screen.svg +1 -0
- package/src/assets/svg/full_screen.svg +1 -0
- package/src/assets/svg/globalization.svg +1 -0
- package/src/assets/svg/loading.svg +17 -0
- package/src/assets/svg/mdi_keyboard_esc.svg +1 -0
- package/src/assets/svg/refresh.svg +1 -0
- package/src/assets/svg/system.svg +1 -0
- package/src/components/ReCountTo/README.md +2 -0
- package/src/components/ReCountTo/index.ts +18 -0
- package/src/components/ReCountTo/src/normal/index.tsx +165 -0
- package/src/components/ReCountTo/src/normal/props.ts +37 -0
- package/src/components/ReCountTo/src/rebound/index.tsx +67 -0
- package/src/components/ReCountTo/src/rebound/props.ts +14 -0
- package/src/components/ReCountTo/src/rebound/rebound.css +77 -0
- package/src/components/ReCropper/index.ts +14 -0
- package/src/components/ReCropper/src/index.tsx +141 -0
- package/src/components/ReFlicker/index.css +39 -0
- package/src/components/ReFlicker/index.ts +50 -0
- package/src/components/ReFlop/index.ts +14 -0
- package/src/components/ReFlop/src/Filpper.tsx +99 -0
- package/src/components/ReFlop/src/filpper.css +184 -0
- package/src/components/ReFlop/src/index.vue +126 -0
- package/src/components/ReFlowChart/index.ts +24 -0
- package/src/components/ReFlowChart/src/Control.vue +139 -0
- package/src/components/ReFlowChart/src/DataDialog.vue +12 -0
- package/src/components/ReFlowChart/src/NodePanel.vue +151 -0
- package/src/components/ReFlowChart/src/adpterForTurbo.ts +160 -0
- package/src/components/ReFlowChart/src/assets/iconfont/iconfont.css +49 -0
- package/src/components/ReFlowChart/src/assets/iconfont/iconfont.eot +0 -0
- package/src/components/ReFlowChart/src/assets/iconfont/iconfont.js +61 -0
- package/src/components/ReFlowChart/src/assets/iconfont/iconfont.json +58 -0
- package/src/components/ReFlowChart/src/assets/iconfont/iconfont.svg +47 -0
- package/src/components/ReFlowChart/src/assets/iconfont/iconfont.ttf +0 -0
- package/src/components/ReFlowChart/src/assets/iconfont/iconfont.woff +0 -0
- package/src/components/ReFlowChart/src/assets/iconfont/iconfont.woff2 +0 -0
- package/src/components/ReFlowChart/src/config.ts +62 -0
- package/src/components/ReIcon/index.ts +12 -0
- package/src/components/ReIcon/src/Icon.vue +81 -0
- package/src/components/ReIcon/src/hooks.ts +63 -0
- package/src/components/ReIcon/src/iconfont.ts +45 -0
- package/src/components/ReIcon/src/iconifyIconOffline.ts +36 -0
- package/src/components/ReIcon/src/iconifyIconOnline.ts +28 -0
- package/src/components/ReIcon/src/offlineIcon.ts +64 -0
- package/src/components/ReIcon/src/types.ts +20 -0
- package/src/components/ReSplitPane/index.css +49 -0
- package/src/components/ReSplitPane/index.tsx +119 -0
- package/src/components/ReSplitPane/resizer.css +45 -0
- package/src/components/ReSplitPane/resizer.tsx +30 -0
- package/src/components/SuCharts/index.ts +36 -0
- package/src/components/SuCharts/src/EchartBar.vue +134 -0
- package/src/components/SuCharts/src/UserInfo.vue +78 -0
- package/src/components/SuCharts/src/echart-line.vue +85 -0
- package/src/components/SuCharts/src/echart-pie.vue +95 -0
- package/src/components/SuCommon/card/components/Card.vue +148 -0
- package/src/components/SuCommon/card/components/DialogForm.vue +127 -0
- package/src/components/SuCommon/card/index.vue +142 -0
- package/src/components/SuCommon/icon-select/index.vue +241 -0
- package/src/components/SuCommon/table/index.vue +208 -0
- package/src/components/SuCommon/utils/index.ts +103 -0
- package/src/components/SuCommon/utils/slot.tsx +50 -0
- package/src/components/SuFloatButton/index.vue +159 -0
- package/src/components/SuQrcode/index.ts +14 -0
- package/src/components/SuQrcode/src/index.scss +9 -0
- package/src/components/SuQrcode/src/index.tsx +236 -0
- package/src/components/SuScrollTree/ScrollPanel.vue +175 -0
- package/src/components/SuTable/SuTable.vue +334 -0
- package/src/components/SuTypeit/index.ts +51 -0
- package/src/config/index.ts +35 -0
- package/src/contant/index.ts +20 -0
- package/src/directives/elResizeDetector/index.ts +33 -0
- package/src/directives/index.ts +11 -0
- package/src/directives/permission/index.ts +29 -0
- package/src/layout/components/lay-chrome/index.vue +30 -0
- package/src/layout/components/lay-content/index.vue +143 -0
- package/src/layout/components/lay-navbar/index.vue +237 -0
- package/src/layout/components/lay-notice/data.ts +59 -0
- package/src/layout/components/lay-notice/index.vue +83 -0
- package/src/layout/components/lay-notice/noticeItem.vue +160 -0
- package/src/layout/components/lay-notice/noticeList.vue +19 -0
- package/src/layout/components/lay-panel/index.vue +150 -0
- package/src/layout/components/lay-search/components/SearchFooter.vue +67 -0
- package/src/layout/components/lay-search/components/SearchModal.vue +189 -0
- package/src/layout/components/lay-search/components/SearchResult.vue +132 -0
- package/src/layout/components/lay-search/components/index.ts +10 -0
- package/src/layout/components/lay-search/index.vue +25 -0
- package/src/layout/components/lay-select-org/index.vue +69 -0
- package/src/layout/components/lay-setting/index.vue +510 -0
- package/src/layout/components/lay-sidebar/breadCrumb.vue +131 -0
- package/src/layout/components/lay-sidebar/extraIcon.vue +25 -0
- package/src/layout/components/lay-sidebar/hamBurger.vue +72 -0
- package/src/layout/components/lay-sidebar/horizontal.vue +191 -0
- package/src/layout/components/lay-sidebar/mixNav.vue +258 -0
- package/src/layout/components/lay-sidebar/sidebar-logo.vue +98 -0
- package/src/layout/components/lay-sidebar/sidebarItem.vue +205 -0
- package/src/layout/components/lay-sidebar/vertical.vue +94 -0
- package/src/layout/components/lay-tag/index.scss +375 -0
- package/src/layout/components/lay-tag/index.vue +625 -0
- package/src/layout/frameView.vue +71 -0
- package/src/layout/hooks/useBoolean.ts +33 -0
- package/src/layout/hooks/useDataThemeChange.ts +142 -0
- package/src/layout/hooks/useLayout.ts +65 -0
- package/src/layout/hooks/useNav.ts +173 -0
- package/src/layout/hooks/useTag.ts +233 -0
- package/src/layout/hooks/useTranslationLang.ts +51 -0
- package/src/layout/layoutView.vue +215 -0
- package/src/layout/redirect.vue +30 -0
- package/src/layout/routerView/parent.vue +23 -0
- package/src/layout/types.ts +92 -0
- package/src/main.ts +108 -0
- package/src/plugins/echarts/index.ts +58 -0
- package/src/plugins/echarts/theme.json +394 -0
- package/src/plugins/i18n/en.ts +289 -0
- package/src/plugins/i18n/index.ts +76 -0
- package/src/plugins/i18n/module/u-report.ts +64 -0
- package/src/plugins/i18n/module/u-workflow.ts +71 -0
- package/src/plugins/i18n/module/umsg.ts +28 -0
- package/src/plugins/i18n/zh.ts +337 -0
- package/src/plugins/vxe-table/index.ts +46 -0
- package/src/plugins/vxe-table/render.tsx +397 -0
- package/src/router/createComponent.tsx +25 -0
- package/src/router/index.ts +183 -0
- package/src/router/modules/error.ts +32 -0
- package/src/router/modules/home.ts +32 -0
- package/src/router/modules/nested.ts +93 -0
- package/src/router/modules/remaining.ts +83 -0
- package/src/router/modules/tabs.ts +55 -0
- package/src/router/utils.ts +377 -0
- package/src/store/index.ts +9 -0
- package/src/store/modules/app.ts +69 -0
- package/src/store/modules/epTheme.ts +49 -0
- package/src/store/modules/multiTags.ts +109 -0
- package/src/store/modules/permission.ts +103 -0
- package/src/store/modules/settings.ts +40 -0
- package/src/store/modules/system.ts +180 -0
- package/src/store/modules/types.ts +49 -0
- package/src/style/button.scss +78 -0
- package/src/style/clear-mixin.scss +28 -0
- package/src/style/dark.scss +218 -0
- package/src/style/element-plus.scss +206 -0
- package/src/style/index.scss +76 -0
- package/src/style/login.css +336 -0
- package/src/style/login2.css +106 -0
- package/src/style/print-lock.css +375 -0
- package/src/style/reset.scss +272 -0
- package/src/style/sidebar.scss +770 -0
- package/src/style/suprint.css +985 -0
- package/src/style/tailwind.css +68 -0
- package/src/style/theme.scss +143 -0
- package/src/style/transition.scss +42 -0
- package/src/style/vxetable.scss +256 -0
- package/src/utils/authority/index.ts +29 -0
- package/src/utils/browers.ts +59 -0
- package/src/utils/dataFormat/index.ts +223 -0
- package/src/utils/http/index.ts +297 -0
- package/src/utils/http/types.d.ts +46 -0
- package/src/utils/index.ts +47 -0
- package/src/utils/lifecycle.ts +20 -0
- package/src/utils/mitt.ts +19 -0
- package/src/utils/propTypes.ts +47 -0
- package/src/utils/storage/index.ts +51 -0
- package/src/views/components/contextmenu/basic.vue +74 -0
- package/src/views/components/contextmenu/context-menu.vue +40 -0
- package/src/views/components/contextmenu/menuDynamic.vue +99 -0
- package/src/views/components/contextmenu/menuGroup.vue +71 -0
- package/src/views/components/count-to/index.vue +43 -0
- package/src/views/components/cropping/index.vue +59 -0
- package/src/views/components/cropping/picture.jpeg +0 -0
- package/src/views/components/split-pane/index.vue +82 -0
- package/src/views/components/video/index.vue +57 -0
- package/src/views/error/403.vue +50 -0
- package/src/views/error/404.vue +50 -0
- package/src/views/error/500.vue +52 -0
- package/src/views/login/login-view.vue +314 -0
- package/src/views/login/utils/motion.ts +47 -0
- package/src/views/login/utils/rule.ts +70 -0
- package/src/views/login/utils/verifyCode.ts +52 -0
- package/src/views/organization/company/Company.vue +56 -0
- package/src/views/organization/company/CompanyPanel.vue +259 -0
- package/src/views/organization/department/Department.vue +58 -0
- package/src/views/organization/department/DepartmentPanel.vue +283 -0
- package/src/views/organization/inv-org/InvOrganization.vue +53 -0
- package/src/views/organization/org/Org.vue +43 -0
- package/src/views/organization/staff/Staff.vue +58 -0
- package/src/views/organization/staff/StaffInfo.vue +163 -0
- package/src/views/organization/staff/StaffPanel.vue +144 -0
- package/src/views/system/cron/cron-task.vue +157 -0
- package/src/views/system/menu/AuthorityPanel.vue +140 -0
- package/src/views/system/menu/SystemMenu.vue +191 -0
- package/src/views/system/menu/menuInfo.vue +368 -0
- package/src/views/system/role/AuthorityInfo.vue +147 -0
- package/src/views/system/role/Role.vue +57 -0
- package/src/views/system/role/RolePanel.vue +191 -0
- package/src/views/system/role/UserInfo.vue +193 -0
- package/src/views/system/role-assign/RoleAssign.vue +57 -0
- package/src/views/system/role-assign/RolePanel.vue +136 -0
- package/src/views/system/sys/sys-config.vue +291 -0
- package/src/views/system/sysUser/SysUser.vue +45 -0
- package/src/views/system/sysUser/SysUserPanel.vue +278 -0
- package/src/views/uapp/pda/pda-app.vue +176 -0
- package/src/views/udev/coderule/code-rule.vue +121 -0
- package/src/views/udev/dict/DictView.vue +106 -0
- package/src/views/udev/dict/childView.vue +222 -0
- package/src/views/udev/lov/childView.vue +180 -0
- package/src/views/udev/lov/lov-view.vue +91 -0
- package/src/views/ufile/aggregation/File.vue +87 -0
- package/src/views/ufile/file/water-mark.vue +103 -0
- package/src/views/uhome/components/menu-favorite.vue +331 -0
- package/src/views/uhome/su-welcome.vue +339 -0
- package/src/views/ulogin/login.vue +316 -0
- package/src/views/umsg/monitor/msg-monitor.vue +36 -0
- package/src/views/umsg/msg/TemplateContent.vue +103 -0
- package/src/views/umsg/msg/msg-template.vue +66 -0
- package/src/views/umsg/send/childView.vue +142 -0
- package/src/views/umsg/send/msg-send.vue +95 -0
- package/src/views/upms/interface/log-in.vue +106 -0
- package/src/views/upms/interface/log-out.vue +107 -0
- package/src/views/upms/user/login-log.vue +60 -0
- package/src/views/urpt/dataSet/DataSet.vue +139 -0
- package/src/views/urpt/design/DesignPanel.vue +526 -0
- package/src/views/urpt/design/Preview.vue +65 -0
- package/src/views/urpt/design/ReportDesign.vue +249 -0
- package/src/views/urpt/design/bg.png +0 -0
- package/src/views/urpt/design/panel.ts +841 -0
- package/src/views/urpt/design/print-data.ts +59 -0
- package/src/views/urpt/query/ReportQuery.vue +122 -0
- package/src/views/urpt/query/ReportQueryFrom.vue +252 -0
- package/src/views/urpt/report-request/ReportDefine.vue +10 -0
- package/src/views/urpt/static-resource/resource.vue +116 -0
- package/src/views/urpt/template/ReportTemplate.vue +198 -0
- package/tsconfig.json +30 -0
- package/types/env.d.ts +1 -0
- package/types/global-components.d.ts +12 -0
- package/types/global.d.ts +236 -0
- package/types/image.d.ts +7 -0
- package/types/index.d.ts +73 -0
- package/types/router.d.ts +107 -0
- package/types/shims-tsx.d.ts +22 -0
- package/types/shims-vue.d.ts +20 -0
- package/vite.config.ts +73 -0
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* @Author: wei.li
|
|
3
|
+
* @Date: 2021-11-17 16:02:30
|
|
4
|
+
* @LastEditors: wei.li
|
|
5
|
+
* @LastEditTime: 2024-07-02 14:35:39
|
|
6
|
+
* @Description: file content
|
|
7
|
+
*/
|
|
8
|
+
// 响应式storage
|
|
9
|
+
import type { App } from 'vue';
|
|
10
|
+
import Storage from 'responsive-storage';
|
|
11
|
+
import { routerArrays } from '../../layout/types';
|
|
12
|
+
import { responsiveStorageNameSpace } from '../../config';
|
|
13
|
+
|
|
14
|
+
export const injectResponsiveStorage = (app: App, config: ServerConfigs) => {
|
|
15
|
+
const nameSpace = responsiveStorageNameSpace();
|
|
16
|
+
const configObj = Object.assign(
|
|
17
|
+
{
|
|
18
|
+
// 国际化 默认中文zh
|
|
19
|
+
locale: Storage.getData('locale', nameSpace) ?? {
|
|
20
|
+
locale: config.Locale ?? 'zh'
|
|
21
|
+
},
|
|
22
|
+
// layout模式以及主题
|
|
23
|
+
layout: Storage.getData('layout', nameSpace) ?? {
|
|
24
|
+
layout: config.Layout ?? 'vertical',
|
|
25
|
+
theme: config.Theme ?? 'default',
|
|
26
|
+
darkMode: config.DarkMode ?? false,
|
|
27
|
+
sidebarStatus: config.SidebarStatus ?? true,
|
|
28
|
+
epThemeColor: config.EpThemeColor ?? '#409EFF',
|
|
29
|
+
themeColor: config.Theme ?? 'light', // 主题色(对应项目配置中的主题色,与theme不同的是它不会受到浅色、深色整体风格切换的影响,只会在手动点击主题色时改变)
|
|
30
|
+
overallStyle: config.OverallStyle ?? 'light' // 整体风格(浅色:light、深色:dark、自动:system)
|
|
31
|
+
},
|
|
32
|
+
configure: Storage.getData('configure', nameSpace) ?? {
|
|
33
|
+
grey: config.Grey ?? false,
|
|
34
|
+
weak: config.Weak ?? false,
|
|
35
|
+
hideTabs: config.HideTabs ?? false,
|
|
36
|
+
showLogo: config.ShowLogo ?? true,
|
|
37
|
+
showModel: config.ShowModel ?? 'smart',
|
|
38
|
+
multiTagsCache: config.MultiTagsCache ?? false
|
|
39
|
+
},
|
|
40
|
+
cnd: Storage.getData('cnd', nameSpace) ?? {}
|
|
41
|
+
},
|
|
42
|
+
config.MultiTagsCache
|
|
43
|
+
? {
|
|
44
|
+
// 默认显示首页tag
|
|
45
|
+
tags: Storage.getData('tags', nameSpace) ?? routerArrays
|
|
46
|
+
}
|
|
47
|
+
: {}
|
|
48
|
+
);
|
|
49
|
+
|
|
50
|
+
app.use(Storage, { nameSpace, memory: configObj });
|
|
51
|
+
};
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<h1>基本使用</h1>
|
|
4
|
+
<div v-contextmenu:contextmenu class="wrapper">
|
|
5
|
+
<code>右键点击此区域</code>
|
|
6
|
+
</div>
|
|
7
|
+
|
|
8
|
+
<v-contextmenu ref="contextmenu">
|
|
9
|
+
<v-contextmenu-item>GitHub</v-contextmenu-item>
|
|
10
|
+
<v-contextmenu-item>GitLab</v-contextmenu-item>
|
|
11
|
+
|
|
12
|
+
<v-contextmenu-divider />
|
|
13
|
+
|
|
14
|
+
<v-contextmenu-submenu title="蔬菜菜">
|
|
15
|
+
<v-contextmenu-item>土豆</v-contextmenu-item>
|
|
16
|
+
|
|
17
|
+
<v-contextmenu-submenu title="青菜">
|
|
18
|
+
<v-contextmenu-item>小油菜</v-contextmenu-item>
|
|
19
|
+
<v-contextmenu-item>空心菜</v-contextmenu-item>
|
|
20
|
+
</v-contextmenu-submenu>
|
|
21
|
+
|
|
22
|
+
<v-contextmenu-item>黄瓜</v-contextmenu-item>
|
|
23
|
+
</v-contextmenu-submenu>
|
|
24
|
+
|
|
25
|
+
<v-contextmenu-item disabled>菠萝蜜</v-contextmenu-item>
|
|
26
|
+
|
|
27
|
+
<v-contextmenu-divider />
|
|
28
|
+
|
|
29
|
+
<v-contextmenu-item>哈密瓜</v-contextmenu-item>
|
|
30
|
+
</v-contextmenu>
|
|
31
|
+
</div>
|
|
32
|
+
</template>
|
|
33
|
+
|
|
34
|
+
<script lang="ts">
|
|
35
|
+
import { defineComponent } from 'vue';
|
|
36
|
+
|
|
37
|
+
import {
|
|
38
|
+
directive,
|
|
39
|
+
Contextmenu,
|
|
40
|
+
ContextmenuItem,
|
|
41
|
+
ContextmenuDivider,
|
|
42
|
+
ContextmenuSubmenu,
|
|
43
|
+
ContextmenuGroup
|
|
44
|
+
} from 'v-contextmenu';
|
|
45
|
+
|
|
46
|
+
export default defineComponent({
|
|
47
|
+
name: 'ExampleSimple',
|
|
48
|
+
|
|
49
|
+
components: {
|
|
50
|
+
[Contextmenu.name]: Contextmenu,
|
|
51
|
+
[ContextmenuItem.name]: ContextmenuItem,
|
|
52
|
+
[ContextmenuDivider.name]: ContextmenuDivider,
|
|
53
|
+
[ContextmenuSubmenu.name]: ContextmenuSubmenu,
|
|
54
|
+
[ContextmenuGroup.name]: ContextmenuGroup
|
|
55
|
+
},
|
|
56
|
+
|
|
57
|
+
directives: {
|
|
58
|
+
contextmenu: directive
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
</script>
|
|
62
|
+
|
|
63
|
+
<style scoped>
|
|
64
|
+
.wrapper {
|
|
65
|
+
display: flex;
|
|
66
|
+
align-items: center;
|
|
67
|
+
justify-content: center;
|
|
68
|
+
width: 300px;
|
|
69
|
+
height: 200px;
|
|
70
|
+
background-color: rgb(90 167 164 / 20%);
|
|
71
|
+
border: 3px dashed rgb(90 167 164 / 90%);
|
|
72
|
+
border-radius: 8px;
|
|
73
|
+
}
|
|
74
|
+
</style>
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
* @Author: wei.li
|
|
3
|
+
* @Date: 2022-10-17 11:26:28
|
|
4
|
+
* @LastEditors: wei.li
|
|
5
|
+
* @LastEditTime: 2022-11-30 07:58:05
|
|
6
|
+
* @Description: file content
|
|
7
|
+
-->
|
|
8
|
+
<script setup lang="ts">
|
|
9
|
+
import basic from './basic.vue';
|
|
10
|
+
import menuGroup from './menuGroup.vue';
|
|
11
|
+
import menuDynamic from './menuDynamic.vue';
|
|
12
|
+
import 'v-contextmenu/dist/themes/default.css';
|
|
13
|
+
defineOptions({
|
|
14
|
+
name: 'ContextMenu'
|
|
15
|
+
});
|
|
16
|
+
</script>
|
|
17
|
+
|
|
18
|
+
<template>
|
|
19
|
+
<el-card>
|
|
20
|
+
<template #header>
|
|
21
|
+
<div class="card-header">
|
|
22
|
+
<span class="font-medium">右键菜单组件</span>
|
|
23
|
+
</div>
|
|
24
|
+
</template>
|
|
25
|
+
<el-row :gutter="24">
|
|
26
|
+
<el-col :xs="24" :sm="10" :md="10" :lg="8" :xl="10">
|
|
27
|
+
<!-- 基本使用 -->
|
|
28
|
+
<basic />
|
|
29
|
+
</el-col>
|
|
30
|
+
<el-col :xs="24" :sm="10" :md="10" :lg="8" :xl="10">
|
|
31
|
+
<!-- 按钮组 -->
|
|
32
|
+
<menuGroup />
|
|
33
|
+
</el-col>
|
|
34
|
+
<el-col :xs="24" :sm="10" :md="10" :lg="8" :xl="10">
|
|
35
|
+
<!-- 动态菜单 -->
|
|
36
|
+
<menuDynamic />
|
|
37
|
+
</el-col>
|
|
38
|
+
</el-row>
|
|
39
|
+
</el-card>
|
|
40
|
+
</template>
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<h1>动态菜单</h1>
|
|
4
|
+
<div v-contextmenu:contextmenu class="wrapper">
|
|
5
|
+
<code>右键点击此区域</code>
|
|
6
|
+
</div>
|
|
7
|
+
|
|
8
|
+
<v-contextmenu ref="contextmenu">
|
|
9
|
+
<v-contextmenu-group title="操作">
|
|
10
|
+
<v-contextmenu-item :hide-on-click="false" @click="extra.push('item')"
|
|
11
|
+
>添加菜单</v-contextmenu-item
|
|
12
|
+
>
|
|
13
|
+
<v-contextmenu-item :hide-on-click="false" @click="extra.push('group')"
|
|
14
|
+
>添加菜单组</v-contextmenu-item
|
|
15
|
+
>
|
|
16
|
+
<v-contextmenu-item :hide-on-click="false" @click="extra.push('submenu')"
|
|
17
|
+
>添加子菜单</v-contextmenu-item
|
|
18
|
+
>
|
|
19
|
+
<v-contextmenu-item :hide-on-click="false" @click="extra.pop()">删除</v-contextmenu-item>
|
|
20
|
+
</v-contextmenu-group>
|
|
21
|
+
|
|
22
|
+
<template v-for="(item, index) of extra" :key="index">
|
|
23
|
+
<v-contextmenu-divider />
|
|
24
|
+
|
|
25
|
+
<v-contextmenu-group v-if="item === 'group'" :title="`菜单组 ${index + 1}`">
|
|
26
|
+
<v-contextmenu-item>菜单1</v-contextmenu-item>
|
|
27
|
+
<v-contextmenu-item>菜单2</v-contextmenu-item>
|
|
28
|
+
<v-contextmenu-item>菜单3</v-contextmenu-item>
|
|
29
|
+
</v-contextmenu-group>
|
|
30
|
+
|
|
31
|
+
<v-contextmenu-submenu v-else-if="item === 'submenu'" :title="`子菜单 ${index + 1}`">
|
|
32
|
+
<v-contextmenu-item>菜单1</v-contextmenu-item>
|
|
33
|
+
<v-contextmenu-item>菜单2</v-contextmenu-item>
|
|
34
|
+
<v-contextmenu-item>菜单3</v-contextmenu-item>
|
|
35
|
+
</v-contextmenu-submenu>
|
|
36
|
+
|
|
37
|
+
<v-contextmenu-item v-else>菜单 {{ index + 1 }}</v-contextmenu-item>
|
|
38
|
+
</template>
|
|
39
|
+
</v-contextmenu>
|
|
40
|
+
</div>
|
|
41
|
+
</template>
|
|
42
|
+
|
|
43
|
+
<script lang="ts">
|
|
44
|
+
import { defineComponent } from 'vue';
|
|
45
|
+
|
|
46
|
+
import {
|
|
47
|
+
directive,
|
|
48
|
+
Contextmenu,
|
|
49
|
+
ContextmenuItem,
|
|
50
|
+
ContextmenuDivider,
|
|
51
|
+
ContextmenuSubmenu,
|
|
52
|
+
ContextmenuGroup
|
|
53
|
+
} from 'v-contextmenu';
|
|
54
|
+
|
|
55
|
+
export default defineComponent({
|
|
56
|
+
name: 'ExampleDynamic',
|
|
57
|
+
|
|
58
|
+
components: {
|
|
59
|
+
[Contextmenu.name]: Contextmenu,
|
|
60
|
+
[ContextmenuItem.name]: ContextmenuItem,
|
|
61
|
+
[ContextmenuDivider.name]: ContextmenuDivider,
|
|
62
|
+
[ContextmenuSubmenu.name]: ContextmenuSubmenu,
|
|
63
|
+
[ContextmenuGroup.name]: ContextmenuGroup
|
|
64
|
+
},
|
|
65
|
+
|
|
66
|
+
directives: {
|
|
67
|
+
contextmenu: directive
|
|
68
|
+
},
|
|
69
|
+
|
|
70
|
+
data() {
|
|
71
|
+
return {
|
|
72
|
+
extra: []
|
|
73
|
+
};
|
|
74
|
+
},
|
|
75
|
+
|
|
76
|
+
methods: {
|
|
77
|
+
addItem(type = 'item') {
|
|
78
|
+
this.extra.push(type);
|
|
79
|
+
},
|
|
80
|
+
removeItem() {
|
|
81
|
+
this.extra.pop();
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
});
|
|
85
|
+
</script>
|
|
86
|
+
|
|
87
|
+
<style scoped>
|
|
88
|
+
.wrapper {
|
|
89
|
+
display: flex;
|
|
90
|
+
align-items: center;
|
|
91
|
+
justify-content: center;
|
|
92
|
+
width: 300px;
|
|
93
|
+
height: 200px;
|
|
94
|
+
margin-bottom: 30px;
|
|
95
|
+
background-color: rgb(90 167 164 / 20%);
|
|
96
|
+
border: 3px dashed rgb(90 167 164 / 90%);
|
|
97
|
+
border-radius: 8px;
|
|
98
|
+
}
|
|
99
|
+
</style>
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<h1>按钮组</h1>
|
|
4
|
+
<div v-contextmenu:contextmenu class="wrapper">
|
|
5
|
+
<code>右键点击此区域</code>
|
|
6
|
+
</div>
|
|
7
|
+
|
|
8
|
+
<v-contextmenu ref="contextmenu">
|
|
9
|
+
<v-contextmenu-item>菜单</v-contextmenu-item>
|
|
10
|
+
|
|
11
|
+
<v-contextmenu-group>
|
|
12
|
+
<v-contextmenu-item>Github</v-contextmenu-item>
|
|
13
|
+
<v-contextmenu-item>Codepen</v-contextmenu-item>
|
|
14
|
+
<v-contextmenu-item disabled>Alipay</v-contextmenu-item>
|
|
15
|
+
<v-contextmenu-item>Wechat</v-contextmenu-item>
|
|
16
|
+
</v-contextmenu-group>
|
|
17
|
+
|
|
18
|
+
<v-contextmenu-divider />
|
|
19
|
+
|
|
20
|
+
<v-contextmenu-group title="按钮组">
|
|
21
|
+
<v-contextmenu-item>菜单1</v-contextmenu-item>
|
|
22
|
+
<v-contextmenu-item>菜单2</v-contextmenu-item>
|
|
23
|
+
<v-contextmenu-item disabled>菜单3</v-contextmenu-item>
|
|
24
|
+
</v-contextmenu-group>
|
|
25
|
+
</v-contextmenu>
|
|
26
|
+
</div>
|
|
27
|
+
</template>
|
|
28
|
+
|
|
29
|
+
<script lang="ts">
|
|
30
|
+
import { defineComponent } from 'vue';
|
|
31
|
+
|
|
32
|
+
import {
|
|
33
|
+
directive,
|
|
34
|
+
Contextmenu,
|
|
35
|
+
ContextmenuItem,
|
|
36
|
+
ContextmenuDivider,
|
|
37
|
+
ContextmenuSubmenu,
|
|
38
|
+
ContextmenuGroup
|
|
39
|
+
} from 'v-contextmenu';
|
|
40
|
+
|
|
41
|
+
const ExampleSFC = defineComponent({
|
|
42
|
+
name: 'ExampleSFC',
|
|
43
|
+
|
|
44
|
+
components: {
|
|
45
|
+
[Contextmenu.name]: Contextmenu,
|
|
46
|
+
[ContextmenuItem.name]: ContextmenuItem,
|
|
47
|
+
[ContextmenuDivider.name]: ContextmenuDivider,
|
|
48
|
+
[ContextmenuSubmenu.name]: ContextmenuSubmenu,
|
|
49
|
+
[ContextmenuGroup.name]: ContextmenuGroup
|
|
50
|
+
},
|
|
51
|
+
|
|
52
|
+
directives: {
|
|
53
|
+
contextmenu: directive
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
export default ExampleSFC;
|
|
58
|
+
</script>
|
|
59
|
+
|
|
60
|
+
<style scoped>
|
|
61
|
+
.wrapper {
|
|
62
|
+
display: flex;
|
|
63
|
+
align-items: center;
|
|
64
|
+
justify-content: center;
|
|
65
|
+
width: 300px;
|
|
66
|
+
height: 200px;
|
|
67
|
+
background-color: rgb(90 167 164 / 20%);
|
|
68
|
+
border: 3px dashed rgb(90 167 164 / 90%);
|
|
69
|
+
border-radius: 8px;
|
|
70
|
+
}
|
|
71
|
+
</style>
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { ReNormalCountTo, ReboundCountTo } from '@/components/ReCountTo';
|
|
3
|
+
</script>
|
|
4
|
+
|
|
5
|
+
<template>
|
|
6
|
+
<el-card>
|
|
7
|
+
<template #header>
|
|
8
|
+
<div class="card-header">
|
|
9
|
+
<span class="font-medium">数字动画组件</span>
|
|
10
|
+
</div>
|
|
11
|
+
</template>
|
|
12
|
+
<div class="flex items-center">
|
|
13
|
+
<ReNormalCountTo
|
|
14
|
+
prefix="$"
|
|
15
|
+
:duration="1000"
|
|
16
|
+
:color="'#409EFF'"
|
|
17
|
+
:fontSize="'2em'"
|
|
18
|
+
:startVal="1"
|
|
19
|
+
:endVal="1000"
|
|
20
|
+
/>
|
|
21
|
+
<ul class="flex ml-8">
|
|
22
|
+
<ReboundCountTo
|
|
23
|
+
v-for="(num, inx) of [1, 6, 6, 6]"
|
|
24
|
+
:key="inx"
|
|
25
|
+
:i="num"
|
|
26
|
+
:blur="inx"
|
|
27
|
+
:delay="inx + 1"
|
|
28
|
+
/>
|
|
29
|
+
</ul>
|
|
30
|
+
</div>
|
|
31
|
+
</el-card>
|
|
32
|
+
</template>
|
|
33
|
+
|
|
34
|
+
<style lang="scss" scoped>
|
|
35
|
+
.flex {
|
|
36
|
+
display: flex;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
:deep(.el-card) {
|
|
40
|
+
margin-bottom: 10px;
|
|
41
|
+
text-align: center;
|
|
42
|
+
}
|
|
43
|
+
</style>
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { ref, nextTick, getCurrentInstance } from 'vue';
|
|
3
|
+
import Cropper from '@/components/ReCropper';
|
|
4
|
+
import img from './picture.jpeg';
|
|
5
|
+
|
|
6
|
+
let info = ref<object>(null);
|
|
7
|
+
let cropperImg = ref<string>('');
|
|
8
|
+
const instance = getCurrentInstance();
|
|
9
|
+
|
|
10
|
+
const onCropper = (): void => {
|
|
11
|
+
nextTick(() => {
|
|
12
|
+
// @ts-expect-error
|
|
13
|
+
instance.refs.refCropper.cropper.getCroppedCanvas().toBlob(blob => {
|
|
14
|
+
let fileReader: FileReader = new FileReader();
|
|
15
|
+
fileReader.onloadend = (e: ProgressEvent) => {
|
|
16
|
+
// @ts-ignore
|
|
17
|
+
cropperImg.value = e.target.result;
|
|
18
|
+
// @ts-expect-error
|
|
19
|
+
info.value = instance.refs.refCropper.cropper.getData();
|
|
20
|
+
};
|
|
21
|
+
fileReader.readAsDataURL(blob);
|
|
22
|
+
}, 'image/jpeg');
|
|
23
|
+
});
|
|
24
|
+
};
|
|
25
|
+
</script>
|
|
26
|
+
|
|
27
|
+
<template>
|
|
28
|
+
<el-card>
|
|
29
|
+
<template #header>
|
|
30
|
+
<div class="card-header">
|
|
31
|
+
<span class="font-medium">图片裁剪组件</span>
|
|
32
|
+
</div>
|
|
33
|
+
</template>
|
|
34
|
+
<div class="cropper-container">
|
|
35
|
+
<Cropper ref="refCropper" :width="'40vw'" :src="img" />
|
|
36
|
+
<img v-if="cropperImg" :src="cropperImg" class="croppered" />
|
|
37
|
+
</div>
|
|
38
|
+
<el-button type="primary" @click="onCropper">裁剪</el-button>
|
|
39
|
+
<p v-if="cropperImg">裁剪后图片信息:{{ info }}</p>
|
|
40
|
+
</el-card>
|
|
41
|
+
</template>
|
|
42
|
+
|
|
43
|
+
<style scoped>
|
|
44
|
+
.cropper-container {
|
|
45
|
+
display: flex;
|
|
46
|
+
align-items: center;
|
|
47
|
+
justify-content: space-between;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.el-button {
|
|
51
|
+
margin-top: 10px;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.croppered {
|
|
55
|
+
display: block;
|
|
56
|
+
width: 45%;
|
|
57
|
+
height: 360px;
|
|
58
|
+
}
|
|
59
|
+
</style>
|
|
Binary file
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import splitpane, { ContextProps } from '@/components/ReSplitPane';
|
|
3
|
+
import { reactive } from 'vue';
|
|
4
|
+
|
|
5
|
+
const settingLR: ContextProps = reactive({
|
|
6
|
+
minPercent: 20,
|
|
7
|
+
defaultPercent: 40,
|
|
8
|
+
split: 'vertical'
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
const settingTB: ContextProps = reactive({
|
|
12
|
+
minPercent: 20,
|
|
13
|
+
defaultPercent: 40,
|
|
14
|
+
split: 'horizontal'
|
|
15
|
+
});
|
|
16
|
+
</script>
|
|
17
|
+
|
|
18
|
+
<template>
|
|
19
|
+
<el-card>
|
|
20
|
+
<!-- <template #header>
|
|
21
|
+
<div class="card-header">
|
|
22
|
+
<span class="font-medium">切割面板组件</span>
|
|
23
|
+
</div>
|
|
24
|
+
</template> -->
|
|
25
|
+
<div class="split-pane">
|
|
26
|
+
<splitpane :split-set="settingLR">
|
|
27
|
+
<!-- #paneL 表示指定该组件为左侧面板 -->
|
|
28
|
+
<template #paneL>
|
|
29
|
+
<!-- 自定义左侧面板的内容 -->
|
|
30
|
+
<div class="dv-a">A</div>
|
|
31
|
+
</template>
|
|
32
|
+
<!-- #paneR 表示指定该组件为右侧面板 -->
|
|
33
|
+
<template #paneR>
|
|
34
|
+
<!-- 再次将右侧面板进行拆分 -->
|
|
35
|
+
<splitpane :split-set="settingTB">
|
|
36
|
+
<template #paneL>
|
|
37
|
+
<div class="dv-b">B</div>
|
|
38
|
+
</template>
|
|
39
|
+
<template #paneR>
|
|
40
|
+
<div class="dv-c">C</div>
|
|
41
|
+
</template>
|
|
42
|
+
</splitpane>
|
|
43
|
+
</template>
|
|
44
|
+
</splitpane>
|
|
45
|
+
</div>
|
|
46
|
+
</el-card>
|
|
47
|
+
</template>
|
|
48
|
+
|
|
49
|
+
<style lang="scss" scoped>
|
|
50
|
+
$W: 100%;
|
|
51
|
+
$H: 70vh;
|
|
52
|
+
|
|
53
|
+
.split-pane {
|
|
54
|
+
width: $W;
|
|
55
|
+
height: $H;
|
|
56
|
+
font-size: 50px;
|
|
57
|
+
color: #fff;
|
|
58
|
+
text-align: center;
|
|
59
|
+
|
|
60
|
+
.dv-a,
|
|
61
|
+
.dv-b,
|
|
62
|
+
.dv-c {
|
|
63
|
+
width: $W;
|
|
64
|
+
height: $W;
|
|
65
|
+
line-height: $H;
|
|
66
|
+
background: rgba($color: dodgerblue, $alpha: 80%);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.dv-b,
|
|
70
|
+
.dv-c {
|
|
71
|
+
line-height: 250px;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.dv-b {
|
|
75
|
+
background: rgba($color: #000, $alpha: 80%);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.dv-c {
|
|
79
|
+
background: rgba($color: #ce272d, $alpha: 80%);
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
</style>
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
* @Author: wei.li
|
|
3
|
+
* @Date: 2022-03-04 18:18:51
|
|
4
|
+
* @LastEditors: wei.li
|
|
5
|
+
* @LastEditTime: 2022-09-06 14:45:11
|
|
6
|
+
* @Description: file content
|
|
7
|
+
-->
|
|
8
|
+
<script setup lang="ts">
|
|
9
|
+
// import { onMounted } from 'vue';
|
|
10
|
+
// import Player from 'xgplayer/dist/simple_player';
|
|
11
|
+
// import volume from 'xgplayer/es/controls/volume';
|
|
12
|
+
// import screenShot from 'xgplayer/es/controls/screenShot';
|
|
13
|
+
// import { deviceDetection } from '@utogether/utils';
|
|
14
|
+
// import playbackRate from 'xgplayer/es/controls/playbackRate';
|
|
15
|
+
import { useRenderIcon } from '@/components/ReIcon/src/hooks';
|
|
16
|
+
|
|
17
|
+
// onMounted(() => {
|
|
18
|
+
// new Player({
|
|
19
|
+
// id: 'mse',
|
|
20
|
+
// // 默认静音
|
|
21
|
+
// volume: 0,
|
|
22
|
+
// autoplay: false,
|
|
23
|
+
// screenShot: true,
|
|
24
|
+
// url: 'https://sf1-hscdn-tos.pstatp.com/obj/media-fe/xgplayer_doc_video/mp4/xgplayer-demo-720p.mp4',
|
|
25
|
+
// poster: 'https://s2.pstatp.com/cdn/expire-1-M/byted-player-videos/1.0.0/poster.jpg',
|
|
26
|
+
// fluid: deviceDetection(),
|
|
27
|
+
// controlPlugins: [volume, playbackRate, screenShot],
|
|
28
|
+
// //传入倍速可选数组
|
|
29
|
+
// playbackRate: [0.5, 0.75, 1, 1.5, 2]
|
|
30
|
+
// });
|
|
31
|
+
// });
|
|
32
|
+
</script>
|
|
33
|
+
|
|
34
|
+
<template>
|
|
35
|
+
<el-card>
|
|
36
|
+
<template #header>
|
|
37
|
+
<div class="card-header">
|
|
38
|
+
<span class="font-medium"
|
|
39
|
+
>视频组件,采用开源的<el-link
|
|
40
|
+
href="https://v2.h5player.bytedance.com"
|
|
41
|
+
target="_blank"
|
|
42
|
+
:icon="useRenderIcon('video-play')"
|
|
43
|
+
style="margin: 0 4px 5px; font-size: 16px"
|
|
44
|
+
>西瓜播放器</el-link
|
|
45
|
+
></span
|
|
46
|
+
>
|
|
47
|
+
</div>
|
|
48
|
+
</template>
|
|
49
|
+
<div id="mse" />
|
|
50
|
+
</el-card>
|
|
51
|
+
</template>
|
|
52
|
+
|
|
53
|
+
<style scoped>
|
|
54
|
+
#mse {
|
|
55
|
+
flex: auto;
|
|
56
|
+
}
|
|
57
|
+
</style>
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
* @Author: wei.li
|
|
3
|
+
* @Date: 2022-03-07 15:54:28
|
|
4
|
+
* @LastEditors: wei.li
|
|
5
|
+
* @LastEditTime: 2022-10-25 11:29:52
|
|
6
|
+
* @Description: 无权限页面
|
|
7
|
+
-->
|
|
8
|
+
<script setup lang="ts">
|
|
9
|
+
import { useRouter, useRoute } from 'vue-router';
|
|
10
|
+
import { delCurrentRoute } from '../../router/utils';
|
|
11
|
+
import noAccess from '../../assets/status/403.svg?component';
|
|
12
|
+
const router = useRouter();
|
|
13
|
+
const route = useRoute();
|
|
14
|
+
const goHome = () => {
|
|
15
|
+
delCurrentRoute(route, false);
|
|
16
|
+
router.push('/');
|
|
17
|
+
};
|
|
18
|
+
</script>
|
|
19
|
+
|
|
20
|
+
<template>
|
|
21
|
+
<div style="width: 100%; height: 100%" class="flex justify-center items-center bg-[#fff]">
|
|
22
|
+
<noAccess />
|
|
23
|
+
<div class="ml-12">
|
|
24
|
+
<p
|
|
25
|
+
v-motion
|
|
26
|
+
class="font-medium text-4xl mb-4 dark:text-white"
|
|
27
|
+
:initial="{ opacity: 0, y: 100 }"
|
|
28
|
+
:enter="{ opacity: 1, y: 0, transition: { delay: 100 } }"
|
|
29
|
+
>
|
|
30
|
+
403
|
|
31
|
+
</p>
|
|
32
|
+
<p
|
|
33
|
+
v-motion
|
|
34
|
+
class="mb-4 text-gray-500"
|
|
35
|
+
:initial="{ opacity: 0, y: 100 }"
|
|
36
|
+
:enter="{ opacity: 1, y: 0, transition: { delay: 300 } }"
|
|
37
|
+
>
|
|
38
|
+
抱歉,你无权访问该页面
|
|
39
|
+
</p>
|
|
40
|
+
<el-button
|
|
41
|
+
v-motion
|
|
42
|
+
:initial="{ opacity: 0, y: 100 }"
|
|
43
|
+
:enter="{ opacity: 1, y: 0, transition: { delay: 500 } }"
|
|
44
|
+
type="primary"
|
|
45
|
+
@click="goHome"
|
|
46
|
+
>返回首页</el-button
|
|
47
|
+
>
|
|
48
|
+
</div>
|
|
49
|
+
</div>
|
|
50
|
+
</template>
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
* @Author: wei.li
|
|
3
|
+
* @Date: 2022-03-07 15:54:28
|
|
4
|
+
* @LastEditors: wei.li
|
|
5
|
+
* @LastEditTime: 2022-10-25 11:31:33
|
|
6
|
+
* @Description: 404页面
|
|
7
|
+
-->
|
|
8
|
+
<script setup lang="ts">
|
|
9
|
+
import { useRouter, useRoute } from 'vue-router';
|
|
10
|
+
import { delCurrentRoute } from '../../router/utils';
|
|
11
|
+
import noExist from '../../assets/status/404.svg?component';
|
|
12
|
+
const router = useRouter();
|
|
13
|
+
const route = useRoute();
|
|
14
|
+
const goHome = () => {
|
|
15
|
+
delCurrentRoute(route, false);
|
|
16
|
+
router.push('/');
|
|
17
|
+
};
|
|
18
|
+
</script>
|
|
19
|
+
|
|
20
|
+
<template>
|
|
21
|
+
<div style="width: 100%; height: 100%" class="flex justify-center items-center bg-[#fff]">
|
|
22
|
+
<noExist />
|
|
23
|
+
<div class="ml-12">
|
|
24
|
+
<p
|
|
25
|
+
v-motion
|
|
26
|
+
class="font-medium text-4xl mb-4 dark:text-white"
|
|
27
|
+
:initial="{ opacity: 0, y: 100 }"
|
|
28
|
+
:enter="{ opacity: 1, y: 0, transition: { delay: 100 } }"
|
|
29
|
+
>
|
|
30
|
+
404
|
|
31
|
+
</p>
|
|
32
|
+
<p
|
|
33
|
+
v-motion
|
|
34
|
+
class="mb-4 text-gray-500"
|
|
35
|
+
:initial="{ opacity: 0, y: 100 }"
|
|
36
|
+
:enter="{ opacity: 1, y: 0, transition: { delay: 300 } }"
|
|
37
|
+
>
|
|
38
|
+
抱歉,你访问的页面不存在
|
|
39
|
+
</p>
|
|
40
|
+
<el-button
|
|
41
|
+
v-motion
|
|
42
|
+
:initial="{ opacity: 0, y: 100 }"
|
|
43
|
+
:enter="{ opacity: 1, y: 0, transition: { delay: 500 } }"
|
|
44
|
+
type="primary"
|
|
45
|
+
@click="goHome"
|
|
46
|
+
>返回首页</el-button
|
|
47
|
+
>
|
|
48
|
+
</div>
|
|
49
|
+
</div>
|
|
50
|
+
</template>
|