hs-admin-ui 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/.env +11 -0
- package/.env.development +5 -0
- package/.env.production +5 -0
- package/.eslintignore +18 -0
- package/.eslintrc.js +104 -0
- package/.prettierrc.js +39 -0
- package/.vite/deps_temp_3669a513/chunk-FVXAE7ZR.js +11400 -0
- package/.vite/deps_temp_3669a513/chunk-ZS7NZCD4.js +36 -0
- package/.vite/deps_temp_3669a513/default-passive-events.js +25 -0
- package/.vite/deps_temp_3669a513/element-plus.js +65013 -0
- package/.vite/deps_temp_3669a513/lodash.js +5497 -0
- package/.vite/deps_temp_3669a513/package.json +3 -0
- package/.vite/deps_temp_3669a513/vue.js +324 -0
- package/.vite/deps_temp_3669a513/vxe-table.js +32336 -0
- package/CHANGELOG.md +1 -0
- package/LICENSE +21 -0
- package/README.md +0 -0
- package/directoryList.md +180 -0
- package/package.json +78 -0
- package/postcss.config.js +7 -0
- package/src/App.vue +88 -0
- package/src/api/fieldConfigController/index.ts +76 -0
- package/src/api/fieldConfigController/type.ts +44 -0
- package/src/api/login/index.ts +78 -0
- package/src/api/loginController/index.ts +74 -0
- package/src/api/menu/index.ts +34 -0
- package/src/api/menu/index2.ts +291 -0
- package/src/api/menuController/index.ts +189 -0
- package/src/api/systemController/index.ts +26 -0
- package/src/api/systemController/type.ts +16 -0
- package/src/api/test/index.ts +22 -0
- package/src/api/user/index.ts +30 -0
- package/src/assets/404.png +0 -0
- package/src/assets/logo-main.svg +12 -0
- package/src/assets/logo-mini.svg +12 -0
- package/src/components/base/hsAffix/src/hsAffix.vue +22 -0
- package/src/components/base/hsAlert/src/hsAlert.vue +15 -0
- package/src/components/base/hsAutocomplete/src/hsAutocomplete.vue +36 -0
- package/src/components/base/hsButton/src/hsButton.vue +26 -0
- package/src/components/base/hsButton/src/hsButtonGroup.vue +8 -0
- package/src/components/base/hsButton/useButtonEvents.ts +19 -0
- package/src/components/base/hsCalendar/src/hsCalendar.vue +36 -0
- package/src/components/base/hsCarousel/src/hsCarousel.vue +15 -0
- package/src/components/base/hsCarousel/src/hsCarouselItem.vue +15 -0
- package/src/components/base/hsCascader/src/hsCascader.vue +36 -0
- package/src/components/base/hsCascader/src/hsCascaderPanel.vue +29 -0
- package/src/components/base/hsCheckbox/src/hsCheckbox.vue +32 -0
- package/src/components/base/hsCheckbox/src/hsCheckboxButton.vue +18 -0
- package/src/components/base/hsCheckbox/src/hsCheckboxGroup.vue +32 -0
- package/src/components/base/hsCol/src/hsCol.vue +20 -0
- package/src/components/base/hsCollapse/src/hsCollapse.vue +36 -0
- package/src/components/base/hsCollapse/src/hsCollapseItem.vue +22 -0
- package/src/components/base/hsColorPicker/src/hsColorPicker.vue +32 -0
- package/src/components/base/hsDatePicker/src/hsDatePicker.vue +40 -0
- package/src/components/base/hsDialog/src/hsDialog.vue +36 -0
- package/src/components/base/hsDrawer/src/hsDrawer.vue +29 -0
- package/src/components/base/hsDropdown/src/hsDropdown.vue +15 -0
- package/src/components/base/hsDropdown/src/hsDropdownItem.vue +15 -0
- package/src/components/base/hsDropdown/src/hsDropdownMenu.vue +15 -0
- package/src/components/base/hsForm/src/hsForm.vue +23 -0
- package/src/components/base/hsForm/src/hsFormItem.vue +22 -0
- package/src/components/base/hsGetApi/src/hsGetApis.vue +231 -0
- package/src/components/base/hsGetApi/useGetApis.ts +158 -0
- package/src/components/base/hsInput/src/hsInput.vue +40 -0
- package/src/components/base/hsInput/useInputEvents.ts +52 -0
- package/src/components/base/hsInputNumber/src/hsInputNumber.vue +31 -0
- package/src/components/base/hsPopconfirm/src/hsPopconfirm.vue +15 -0
- package/src/components/base/hsPopover/src/hsPopover.vue +22 -0
- package/src/components/base/hsProgress/src/hsProgress.vue +15 -0
- package/src/components/base/hsRadio/src/hsRadio.vue +32 -0
- package/src/components/base/hsRadio/src/hsRadioButton.vue +18 -0
- package/src/components/base/hsRadio/src/hsRadioGroup.vue +32 -0
- package/src/components/base/hsRate/src/hsRate.vue +33 -0
- package/src/components/base/hsResult/src/hsResult.vue +15 -0
- package/src/components/base/hsRow/src/hsRow.vue +20 -0
- package/src/components/base/hsScrollbar/src/hsScrollbar.vue +22 -0
- package/src/components/base/hsSelect/src/hsOption.vue +8 -0
- package/src/components/base/hsSelect/src/hsOptionGroup.vue +8 -0
- package/src/components/base/hsSelect/src/hsSelect.vue +42 -0
- package/src/components/base/hsSelect/useSelectEvents.ts +60 -0
- package/src/components/base/hsSlider/src/hsSlider.vue +25 -0
- package/src/components/base/hsSteps/src/hsStep.vue +15 -0
- package/src/components/base/hsSteps/src/hsSteps.vue +15 -0
- package/src/components/base/hsSwitch/src/hsSwitch.vue +35 -0
- package/src/components/base/hsTable/hsBCTable.vue +116 -0
- package/src/components/base/hsTable/hsTable copy.vue +226 -0
- package/src/components/base/hsTable/hsTable.vue +213 -0
- package/src/components/base/hsTable/useHsTableConfig.ts +95 -0
- package/src/components/base/hsTable/useTableEvents.ts +118 -0
- package/src/components/base/hsTabs/src/hsTabPane.vue +15 -0
- package/src/components/base/hsTabs/src/hsTabs.vue +29 -0
- package/src/components/base/hsTag/src/hsCheckTag.vue +16 -0
- package/src/components/base/hsTag/src/hsTag.vue +15 -0
- package/src/components/base/hsTest/HsTest.vue +320 -0
- package/src/components/base/hsTooltip/src/hsTooltip.vue +22 -0
- package/src/components/base/hsTour/src/hsTour.vue +31 -0
- package/src/components/base/hsTour/src/hsTourStep.vue +15 -0
- package/src/components/base/hsTransfer/src/hsTransfer.vue +36 -0
- package/src/components/base/hsTree/src/hsTree.vue +24 -0
- package/src/components/base/hsTreeSelect/src/hsTreeSelect.vue +39 -0
- package/src/components/base/hsUpload/src/hsUpload.vue +32 -0
- package/src/components/base/hsWatermark/src/hsWatermark.vue +15 -0
- package/src/components/business/bcAutoComplete/bcAutoComplete.vue +38 -0
- package/src/components/business/bcAutoComplete/defaultData.ts +25 -0
- package/src/components/business/bcAutoComplete/useAutoComplete.ts +65 -0
- package/src/components/business/bcBtn/bcBtn.vue +40 -0
- package/src/components/business/bcForm/bcForm.vue +113 -0
- package/src/components/business/bcForm/bcFormDrag.vue +104 -0
- package/src/components/business/bcForm/bcFormSearch.vue +154 -0
- package/src/components/business/bcForm/components/sortForm/index.ts +18 -0
- package/src/components/business/bcForm/components/sortForm/sortForm.vue +92 -0
- package/src/components/business/bcFormConfig/bcFormConfig.vue +196 -0
- package/src/components/business/bcFormTable/bcFormTable.vue +91 -0
- package/src/components/business/bcFormTable/components/bcTabs/bcTabs.vue +53 -0
- package/src/components/business/bcFormTable/components/contextBody/contextBody.vue +67 -0
- package/src/components/business/bcFormTable/components/contextBody/useContextMenu.ts +53 -0
- package/src/components/business/bcFormTable/components/formSearchBtn/formSearchBtn.vue +21 -0
- package/src/components/business/bcFormTable/methods/cellDetailMethod.ts +5 -0
- package/src/components/business/bcFormTable/methods/filterAgeMethod.ts +5 -0
- package/src/components/business/bcFormTable/methods/footerMethod.ts +25 -0
- package/src/components/business/bcFormTable/methods/index.ts +10 -0
- package/src/components/business/bcFormTable/utils/onFormKey.ts +121 -0
- package/src/components/business/bcFormTable/utils/onTableKey.ts +119 -0
- package/src/components/business/bcFormTable/utils/parseTable.ts +201 -0
- package/src/components/business/bcFormTable/utils/useButon.ts +20 -0
- package/src/components/business/bcFormTable/utils/useTableHeight.ts +44 -0
- package/src/components/business/bcPageConfig/bcPageConfig.vue +79 -0
- package/src/components/business/bcPageConfig/components/hsBtn/src/hsAttrBtn.vue +39 -0
- package/src/components/business/bcPageConfig/components/hsBtn/src/hsBtnConfigList.vue +45 -0
- package/src/components/business/bcPageConfig/components/hsBtn/src/hsBtnItemConfig.vue +32 -0
- package/src/components/business/bcPageConfig/components/hsBtn/src/hsBtnPanel.vue +45 -0
- package/src/components/business/bcPageConfig/components/hsBtn/useAttrBtn.ts +58 -0
- package/src/components/business/bcPageConfig/components/hsBtn/useBtnConfigList.ts +71 -0
- package/src/components/business/bcPageConfig/components/hsBtn/useBtnItemConfig.ts +35 -0
- package/src/components/business/bcPageConfig/components/hsExpand/src/hsExpand.vue +33 -0
- package/src/components/business/bcPageConfig/components/hsExpand/useExpand.ts +9 -0
- package/src/components/business/bcPageConfig/components/hsForm/src/hsAttrForm.vue +54 -0
- package/src/components/business/bcPageConfig/components/hsForm/src/hsFormConfig.vue +180 -0
- package/src/components/business/bcPageConfig/components/hsForm/src/hsFormConfigList.vue +45 -0
- package/src/components/business/bcPageConfig/components/hsForm/src/hsFormPanel.vue +64 -0
- package/src/components/business/bcPageConfig/components/hsForm/src/hsFormParse.vue +24 -0
- package/src/components/business/bcPageConfig/components/hsForm/useAttrForm.ts +108 -0
- package/src/components/business/bcPageConfig/components/hsForm/useFormListConfig.ts +69 -0
- package/src/components/business/bcPageConfig/components/hsForm/useFormParse.ts +120 -0
- package/src/components/business/bcPageConfig/components/hsSaveForm/saveFormConfig.ts +66 -0
- package/src/components/business/bcPageConfig/components/hsSaveForm/src/saveForm.vue +48 -0
- package/src/components/business/bcPageConfig/components/hsSaveForm/useSaveForm.ts +148 -0
- package/src/components/business/bcPageConfig/components/hsTables/src/hsAttrTable.vue +122 -0
- package/src/components/business/bcPageConfig/components/hsTables/src/hsRecursionConfig.vue +36 -0
- package/src/components/business/bcPageConfig/components/hsTables/src/hsTableConfig.vue +51 -0
- package/src/components/business/bcPageConfig/components/hsTables/src/hsTableConfigList.vue +46 -0
- package/src/components/business/bcPageConfig/components/hsTables/src/hsTablePanel.vue +68 -0
- package/src/components/business/bcPageConfig/components/hsTables/src/hsTableParse.vue +24 -0
- package/src/components/business/bcPageConfig/components/hsTables/useAttrTable.ts +218 -0
- package/src/components/business/bcPageConfig/components/hsTables/useTableConfigList.ts +77 -0
- package/src/components/business/bcPageConfig/components/hsTables/useTableParse.ts +78 -0
- package/src/components/business/bcPageConfig/default/apis.json +24712 -0
- package/src/components/business/bcPageConfig/default/baseBtnConfig.ts +256 -0
- package/src/components/business/bcPageConfig/default/baseFormConfig.ts +380 -0
- package/src/components/business/bcPageConfig/default/baseTableConfig.ts +2399 -0
- package/src/components/business/bcPageConfig/usePageConfig.ts +469 -0
- package/src/components/business/bcSelect/bcSelect.vue +50 -0
- package/src/components/business/bcSwitchSystems/bcSwitchSystems.vue +36 -0
- package/src/components/business/bcSwitchSystems/useSwitchSystems.ts +74 -0
- package/src/components/business/bcTable/bcTable.vue +63 -0
- package/src/components/business/bcTable/components/sortColumn/index.ts +19 -0
- package/src/components/business/bcTable/components/sortColumn/sortColumn.vue +107 -0
- package/src/components/business/bcTable/useTable.ts +51 -0
- package/src/components/business/bcTable/useTableHeight.ts +24 -0
- package/src/components/business/bcTreeSelect/bcTreeSelect.vue +12 -0
- package/src/components/business/cardID/cardID.vue +24 -0
- package/src/components/business/cardID/type.ts +0 -0
- package/src/components/business/cardID/useCardID.ts +0 -0
- package/src/components/component.ts +188 -0
- package/src/components/config/autocompleteAttrConfig/autocompleteAttrConfig.vue +26 -0
- package/src/components/config/autocompleteAttrConfig/config.ts +170 -0
- package/src/components/config/baseForm.vue +175 -0
- package/src/components/config/buttonAttrConfig/buttonAttrConfig.vue +26 -0
- package/src/components/config/buttonAttrConfig/config.ts +261 -0
- package/src/components/config/cascaderAttrConfig/cascaderAttrConfig.vue +26 -0
- package/src/components/config/cascaderAttrConfig/config.ts +287 -0
- package/src/components/config/cascaderPanelAttrConfig/cascaderPanelAttrConfig.vue +26 -0
- package/src/components/config/cascaderPanelAttrConfig/config.ts +278 -0
- package/src/components/config/checkboxAttrConfig/checkboxAttrConfig.vue +26 -0
- package/src/components/config/checkboxAttrConfig/config.ts +301 -0
- package/src/components/config/datePickerAttrConfig/config.ts +256 -0
- package/src/components/config/datePickerAttrConfig/datePickerAttrConfig.vue +26 -0
- package/src/components/config/inputAttrConfig/config.ts +322 -0
- package/src/components/config/inputAttrConfig/inputAttrConfig.vue +33 -0
- package/src/components/config/inputAttrConfig/inputEventConfig.vue +35 -0
- package/src/components/config/inputNumberAttrConfig/config.ts +177 -0
- package/src/components/config/inputNumberAttrConfig/inputNumberAttrConfig.vue +26 -0
- package/src/components/config/radioAttrConfig/config.ts +212 -0
- package/src/components/config/radioAttrConfig/radioAttrConfig.vue +26 -0
- package/src/components/config/selectAttrConfig/config.ts +478 -0
- package/src/components/config/selectAttrConfig/selectAttrConfig.vue +26 -0
- package/src/components/config/switchAttrConfig/config.ts +195 -0
- package/src/components/config/switchAttrConfig/switchAttrConfig.vue +26 -0
- package/src/components/config/treeSelectAttrConfig/config.ts +625 -0
- package/src/components/config/treeSelectAttrConfig/treeSelectAttrConfig.vue +26 -0
- package/src/components/config/type/formType.ts +25 -0
- package/src/components/config/uploadAttrConfig/config.ts +250 -0
- package/src/components/config/uploadAttrConfig/uploadAttrConfig.vue +26 -0
- package/src/components/iconSelector/index.vue +247 -0
- package/src/components/iconSelector/list.vue +84 -0
- package/src/components/svgIcon/index.vue +61 -0
- package/src/directive/authDirective.ts +40 -0
- package/src/directive/customDirective.ts +178 -0
- package/src/directive/index.ts +18 -0
- package/src/hooks/useCrypto.ts +36 -0
- package/src/hooks/useExpose.ts +60 -0
- package/src/layout/component/aside.vue +160 -0
- package/src/layout/component/columnsAside.vue +299 -0
- package/src/layout/component/header.vue +18 -0
- package/src/layout/component/main.vue +65 -0
- package/src/layout/footer/index.vue +25 -0
- package/src/layout/index.vue +53 -0
- package/src/layout/lockScreen/index.vue +352 -0
- package/src/layout/logo/index.vue +75 -0
- package/src/layout/main/classic.vue +73 -0
- package/src/layout/main/columns.vue +73 -0
- package/src/layout/main/defaults.vue +73 -0
- package/src/layout/main/transverse.vue +60 -0
- package/src/layout/navBars/index.vue +35 -0
- package/src/layout/navBars/tagsView/contextmenu.vue +133 -0
- package/src/layout/navBars/tagsView/tagsView.vue +737 -0
- package/src/layout/navBars/topBar/breadcrumb.vue +146 -0
- package/src/layout/navBars/topBar/closeFull.vue +53 -0
- package/src/layout/navBars/topBar/index.vue +107 -0
- package/src/layout/navBars/topBar/search.vue +123 -0
- package/src/layout/navBars/topBar/setings.vue +789 -0
- package/src/layout/navBars/topBar/user.vue +222 -0
- package/src/layout/navBars/topBar/userNews.vue +107 -0
- package/src/layout/navMenu/horizontal.vue +138 -0
- package/src/layout/navMenu/subItem.vue +49 -0
- package/src/layout/navMenu/vertical.vue +100 -0
- package/src/layout/routerView/iframes.vue +101 -0
- package/src/layout/routerView/link.vue +93 -0
- package/src/layout/routerView/parent.vue +104 -0
- package/src/layout/upgrade/index.vue +147 -0
- package/src/main.ts +70 -0
- package/src/router/backEnd.ts +173 -0
- package/src/router/frontEnd.ts +155 -0
- package/src/router/index.ts +138 -0
- package/src/router/route.ts +94 -0
- package/src/stores/index.ts +8 -0
- package/src/stores/keepAliveNames.ts +38 -0
- package/src/stores/requestOldRoutes.ts +16 -0
- package/src/stores/routesList.ts +26 -0
- package/src/stores/tagsViewRoutes.ts +23 -0
- package/src/stores/themeConfig.ts +142 -0
- package/src/stores/userInfo.ts +65 -0
- package/src/style/index.scss +0 -0
- package/src/style/tailwind.css +29 -0
- package/src/theme/app.scss +333 -0
- package/src/theme/common/transition.scss +147 -0
- package/src/theme/dark.scss +255 -0
- package/src/theme/element.scss +321 -0
- package/src/theme/iconSelector.scss +31 -0
- package/src/theme/index.scss +8 -0
- package/src/theme/loading.scss +51 -0
- package/src/theme/media/chart.scss +94 -0
- package/src/theme/media/cityLinkage.scss +10 -0
- package/src/theme/media/date.scss +25 -0
- package/src/theme/media/dialog.scss +12 -0
- package/src/theme/media/error.scss +45 -0
- package/src/theme/media/form.scss +31 -0
- package/src/theme/media/home.scss +23 -0
- package/src/theme/media/index.scss +15 -0
- package/src/theme/media/layout.scss +63 -0
- package/src/theme/media/login.scss +74 -0
- package/src/theme/media/media.scss +13 -0
- package/src/theme/media/pagination.scss +15 -0
- package/src/theme/media/personal.scss +16 -0
- package/src/theme/media/scrollbar.scss +56 -0
- package/src/theme/media/tagsView.scss +11 -0
- package/src/theme/mixins/index.scss +56 -0
- package/src/theme/other.scss +36 -0
- package/src/theme/tableTool.scss +27 -0
- package/src/theme/waves.scss +101 -0
- package/src/types/auth.d.ts +44 -0
- package/src/types/axios.d.ts +13 -0
- package/src/types/components.d.ts +30 -0
- package/src/types/customData.d.ts +163 -0
- package/src/types/form.ts +68 -0
- package/src/types/formItem/autocomplete.ts +43 -0
- package/src/types/formItem/button.ts +39 -0
- package/src/types/formItem/input.ts +66 -0
- package/src/types/formItem/inputNumber.ts +42 -0
- package/src/types/formItem/selelct.ts +54 -0
- package/src/types/formItem/treeSelect.ts +37 -0
- package/src/types/formTable.d.ts +210 -0
- package/src/types/global.d.ts +118 -0
- package/src/types/layout.d.ts +59 -0
- package/src/types/mitt.d.ts +38 -0
- package/src/types/pinia.d.ts +92 -0
- package/src/types/views.d.ts +331 -0
- package/src/utils/arrayOperation.ts +65 -0
- package/src/utils/authFunction.ts +38 -0
- package/src/utils/build.ts +124 -0
- package/src/utils/commonFunction.ts +64 -0
- package/src/utils/formatTime.ts +137 -0
- package/src/utils/getDataType.ts +136 -0
- package/src/utils/getStyleSheets.ts +101 -0
- package/src/utils/loading.ts +44 -0
- package/src/utils/mitt.ts +8 -0
- package/src/utils/other.ts +214 -0
- package/src/utils/request.ts +82 -0
- package/src/utils/setIconfont.ts +48 -0
- package/src/utils/showMessage.ts +57 -0
- package/src/utils/showMessageBox.ts +39 -0
- package/src/utils/showNotification.ts +50 -0
- package/src/utils/showPopup.ts +81 -0
- package/src/utils/storage.ts +137 -0
- package/src/utils/theme.ts +65 -0
- package/src/utils/toolsValidate.ts +370 -0
- package/src/utils/watermark.ts +47 -0
- package/src/views/error/401.vue +88 -0
- package/src/views/error/404.vue +89 -0
- package/src/views/home/index.vue +62 -0
- package/src/views/login/component/account.vue +172 -0
- package/src/views/login/component/mobile.vue +72 -0
- package/src/views/login/component/scan.vue +63 -0
- package/src/views/login/index.vue +254 -0
- package/src/views/system/auth/index.vue +48 -0
- package/src/views/system/auth/list.ts +50 -0
- package/src/views/system/auth/useAuth.ts +34 -0
- package/src/views/system/dept/dialog.vue +167 -0
- package/src/views/system/dept/index.vue +135 -0
- package/src/views/system/dic/dialog.vue +150 -0
- package/src/views/system/dic/index.vue +132 -0
- package/src/views/system/form/data.json +360 -0
- package/src/views/system/form/index.vue +24 -0
- package/src/views/system/formSetting/components/hsBtn/src/hsAttrBtn.vue +58 -0
- package/src/views/system/formSetting/components/hsBtn/src/hsBtnConfigList.vue +45 -0
- package/src/views/system/formSetting/components/hsBtn/src/hsBtnPanel.vue +51 -0
- package/src/views/system/formSetting/components/hsBtn/useAttrBtn.ts +129 -0
- package/src/views/system/formSetting/components/hsBtn/useBtnConfigList.ts +73 -0
- package/src/views/system/formSetting/components/hsExpand/src/hsExpand.vue +27 -0
- package/src/views/system/formSetting/components/hsExpand/useExpand.ts +9 -0
- package/src/views/system/formSetting/components/hsForm/src/hsAttrForm.vue +124 -0
- package/src/views/system/formSetting/components/hsForm/src/hsFormConfig.vue +180 -0
- package/src/views/system/formSetting/components/hsForm/src/hsFormConfigList.vue +45 -0
- package/src/views/system/formSetting/components/hsForm/src/hsFormPanel.vue +152 -0
- package/src/views/system/formSetting/components/hsForm/src/hsFormParse.vue +33 -0
- package/src/views/system/formSetting/components/hsForm/useAttrForm.ts +109 -0
- package/src/views/system/formSetting/components/hsForm/useFormListConfig.ts +70 -0
- package/src/views/system/formSetting/components/hsPageTree/configData.ts +3700 -0
- package/src/views/system/formSetting/components/hsPageTree/src/hsPageTree.vue +30 -0
- package/src/views/system/formSetting/components/hsPageTree/usePageTree.ts +50 -0
- package/src/views/system/formSetting/components/hsSaveForm/saveFormConfig.ts +66 -0
- package/src/views/system/formSetting/components/hsSaveForm/src/saveForm.vue +47 -0
- package/src/views/system/formSetting/components/hsSaveForm/useSaveForm.ts +122 -0
- package/src/views/system/formSetting/components/hsTables/src/hsAttrTable.vue +91 -0
- package/src/views/system/formSetting/components/hsTables/src/hsRecursionConfig.vue +36 -0
- package/src/views/system/formSetting/components/hsTables/src/hsTableConfig.vue +39 -0
- package/src/views/system/formSetting/components/hsTables/src/hsTableConfigList.vue +45 -0
- package/src/views/system/formSetting/components/hsTables/src/hsTablePanel.vue +56 -0
- package/src/views/system/formSetting/components/hsTables/src/hsTableParse.vue +29 -0
- package/src/views/system/formSetting/components/hsTables/useAttrTable.ts +125 -0
- package/src/views/system/formSetting/components/hsTables/useTableConfigList.ts +77 -0
- package/src/views/system/formSetting/components/selectConfig/config.ts +476 -0
- package/src/views/system/formSetting/components/selectConfig/selectConfig.vue +30 -0
- package/src/views/system/formSetting/data.json +360 -0
- package/src/views/system/formSetting/default/baseBtnConfig.ts +216 -0
- package/src/views/system/formSetting/default/baseFormConfig.ts +567 -0
- package/src/views/system/formSetting/default/baseTableConfig.ts +2353 -0
- package/src/views/system/formSetting/formConfig.vue +108 -0
- package/src/views/system/formSetting/index.vue +35 -0
- package/src/views/system/formSetting/menuType.d.ts +12 -0
- package/src/views/system/formSetting/panelConfig.json +164 -0
- package/src/views/system/formSetting/useForm.ts +89 -0
- package/src/views/system/formSetting/useFormConfig.ts +192 -0
- package/src/views/system/menu/dialog.vue +285 -0
- package/src/views/system/menu/index.vue +180 -0
- package/src/views/system/page/components/hsPageTree/configData.ts +3700 -0
- package/src/views/system/page/components/hsPageTree/src/hsPageTree.vue +30 -0
- package/src/views/system/page/components/hsPageTree/usePageTree.ts +49 -0
- package/src/views/system/page/index.vue +32 -0
- package/src/views/system/page/menuType.d.ts +12 -0
- package/src/views/system/page/usePage.ts +125 -0
- package/src/views/system/role/dialog.vue +236 -0
- package/src/views/system/role/index.vue +146 -0
- package/src/views/system/table/data.json +747 -0
- package/src/views/system/table/formate.js +49 -0
- package/src/views/system/table/index.vue +53 -0
- package/src/views/system/user/dialog.vue +187 -0
- package/src/views/system/user/index.vue +161 -0
- package/src/views/test/test/components/hsBtn/src/hsAttrBtn.vue +58 -0
- package/src/views/test/test/components/hsBtn/src/hsBtnConfigList.vue +45 -0
- package/src/views/test/test/components/hsBtn/src/hsBtnPanel.vue +51 -0
- package/src/views/test/test/components/hsBtn/useAttrBtn.ts +129 -0
- package/src/views/test/test/components/hsBtn/useBtnConfigList.ts +73 -0
- package/src/views/test/test/components/hsExpand/src/hsExpand.vue +27 -0
- package/src/views/test/test/components/hsExpand/useExpand.ts +9 -0
- package/src/views/test/test/components/hsForm/src/hsAttrForm.vue +124 -0
- package/src/views/test/test/components/hsForm/src/hsFormConfig.vue +180 -0
- package/src/views/test/test/components/hsForm/src/hsFormConfigList.vue +45 -0
- package/src/views/test/test/components/hsForm/src/hsFormPanel.vue +152 -0
- package/src/views/test/test/components/hsForm/src/hsFormParse.vue +33 -0
- package/src/views/test/test/components/hsForm/useAttrForm.ts +109 -0
- package/src/views/test/test/components/hsForm/useFormListConfig.ts +70 -0
- package/src/views/test/test/components/hsSaveForm/saveFormConfig.ts +66 -0
- package/src/views/test/test/components/hsSaveForm/src/saveForm.vue +47 -0
- package/src/views/test/test/components/hsSaveForm/useSaveForm.ts +122 -0
- package/src/views/test/test/components/hsTables/src/hsAttrTable.vue +91 -0
- package/src/views/test/test/components/hsTables/src/hsRecursionConfig.vue +36 -0
- package/src/views/test/test/components/hsTables/src/hsTableConfig.vue +39 -0
- package/src/views/test/test/components/hsTables/src/hsTableConfigList.vue +45 -0
- package/src/views/test/test/components/hsTables/src/hsTablePanel.vue +56 -0
- package/src/views/test/test/components/hsTables/src/hsTableParse.vue +29 -0
- package/src/views/test/test/components/hsTables/useAttrTable.ts +125 -0
- package/src/views/test/test/components/hsTables/useTableConfigList.ts +77 -0
- package/src/views/test/test/components/selectConfig/config.ts +476 -0
- package/src/views/test/test/components/selectConfig/selectConfig.vue +30 -0
- package/src/views/test/test/data.json +360 -0
- package/src/views/test/test/default/baseBtnConfig.ts +216 -0
- package/src/views/test/test/default/baseFormConfig.ts +567 -0
- package/src/views/test/test/default/baseTableConfig.ts +2353 -0
- package/src/views/test/test/formConfig.vue +102 -0
- package/src/views/test/test/test.vue +28 -0
- package/src/views/test/test/test3.vue +24 -0
- package/src/views/test/test/test4.vue +107 -0
- package/src/views/test/test/test/345/211/257/346/234/254.vue +2424 -0
- package/src/views/test/test/useFormConfig.ts +192 -0
- package/src/views/test/test2/test2.vue +17 -0
- package/src/views/test/test3/test.vue +20 -0
- package/tailwind.config.js +12 -0
- package/tsconfig.json +75 -0
- package/vite.config.ts +123 -0
|
@@ -0,0 +1,352 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div v-show="state.isShowLockScreen">
|
|
3
|
+
<div class="layout-lock-screen-mask"></div>
|
|
4
|
+
<div class="layout-lock-screen-img" :class="{ 'layout-lock-screen-filter': state.isShowLoockLogin }"></div>
|
|
5
|
+
<div class="layout-lock-screen">
|
|
6
|
+
<div
|
|
7
|
+
class="layout-lock-screen-date"
|
|
8
|
+
ref="layoutLockScreenDateRef"
|
|
9
|
+
@mousedown="onDownPc"
|
|
10
|
+
@mousemove="onMovePc"
|
|
11
|
+
@mouseup="onEnd"
|
|
12
|
+
@touchstart.stop="onDownApp"
|
|
13
|
+
@touchmove.stop="onMoveApp"
|
|
14
|
+
@touchend.stop="onEnd"
|
|
15
|
+
>
|
|
16
|
+
<div class="layout-lock-screen-date-box">
|
|
17
|
+
<div class="layout-lock-screen-date-box-time">
|
|
18
|
+
{{ state.time.hm }}<span class="layout-lock-screen-date-box-minutes">{{ state.time.s }}</span>
|
|
19
|
+
</div>
|
|
20
|
+
<div class="layout-lock-screen-date-box-info">{{ state.time.mdq }}</div>
|
|
21
|
+
</div>
|
|
22
|
+
<div class="layout-lock-screen-date-top">
|
|
23
|
+
<SvgIcon name="ele-Top" />
|
|
24
|
+
<div class="layout-lock-screen-date-top-text">上滑解锁</div>
|
|
25
|
+
</div>
|
|
26
|
+
</div>
|
|
27
|
+
<transition name="el-zoom-in-center">
|
|
28
|
+
<div v-show="state.isShowLoockLogin" class="layout-lock-screen-login">
|
|
29
|
+
<div class="layout-lock-screen-login-box">
|
|
30
|
+
<div class="layout-lock-screen-login-box-img">
|
|
31
|
+
<img src="https://img2.baidu.com/it/u=1978192862,2048448374&fm=253&fmt=auto&app=138&f=JPEG?w=504&h=500" />
|
|
32
|
+
</div>
|
|
33
|
+
<div class="layout-lock-screen-login-box-name">Administrator</div>
|
|
34
|
+
<div class="layout-lock-screen-login-box-value">
|
|
35
|
+
<el-input
|
|
36
|
+
placeholder="请输入密码"
|
|
37
|
+
ref="layoutLockScreenInputRef"
|
|
38
|
+
v-model="state.lockScreenPassword"
|
|
39
|
+
@keyup.enter.native.stop="onLockScreenSubmit()"
|
|
40
|
+
>
|
|
41
|
+
<template #append>
|
|
42
|
+
<el-button @click="onLockScreenSubmit">
|
|
43
|
+
<el-icon class="el-input__icon">
|
|
44
|
+
<ele-Right />
|
|
45
|
+
</el-icon>
|
|
46
|
+
</el-button>
|
|
47
|
+
</template>
|
|
48
|
+
</el-input>
|
|
49
|
+
</div>
|
|
50
|
+
</div>
|
|
51
|
+
<div class="layout-lock-screen-login-icon">
|
|
52
|
+
<SvgIcon name="ele-Microphone" :size="20" />
|
|
53
|
+
<SvgIcon name="ele-AlarmClock" :size="20" />
|
|
54
|
+
<SvgIcon name="ele-SwitchButton" :size="20" />
|
|
55
|
+
</div>
|
|
56
|
+
</div>
|
|
57
|
+
</transition>
|
|
58
|
+
</div>
|
|
59
|
+
</div>
|
|
60
|
+
</template>
|
|
61
|
+
|
|
62
|
+
<script setup lang="ts" name="layoutLockScreen">
|
|
63
|
+
import { nextTick, onMounted, reactive, ref, onUnmounted } from 'vue';
|
|
64
|
+
import { formatDate } from '/@/utils/formatTime';
|
|
65
|
+
import { systemStore } from '/@/utils/storage';
|
|
66
|
+
import { storeToRefs } from 'pinia';
|
|
67
|
+
import { useThemeConfig } from '/@/stores/themeConfig';
|
|
68
|
+
|
|
69
|
+
// 定义变量内容
|
|
70
|
+
const layoutLockScreenDateRef = ref<HtmlType>();
|
|
71
|
+
const layoutLockScreenInputRef = ref();
|
|
72
|
+
const storesThemeConfig = useThemeConfig();
|
|
73
|
+
const { themeConfig } = storeToRefs(storesThemeConfig);
|
|
74
|
+
const state = reactive({
|
|
75
|
+
transparency: 1,
|
|
76
|
+
downClientY: 0,
|
|
77
|
+
moveDifference: 0,
|
|
78
|
+
isShowLoockLogin: false,
|
|
79
|
+
isFlags: false,
|
|
80
|
+
querySelectorEl: '' as HtmlType,
|
|
81
|
+
time: {
|
|
82
|
+
hm: '',
|
|
83
|
+
s: '',
|
|
84
|
+
mdq: '',
|
|
85
|
+
},
|
|
86
|
+
setIntervalTime: 0,
|
|
87
|
+
isShowLockScreen: false,
|
|
88
|
+
isShowLockScreenIntervalTime: 0,
|
|
89
|
+
lockScreenPassword: '',
|
|
90
|
+
});
|
|
91
|
+
|
|
92
|
+
// 鼠标按下 pc
|
|
93
|
+
const onDownPc = (down: MouseEvent) => {
|
|
94
|
+
state.isFlags = true;
|
|
95
|
+
state.downClientY = down.clientY;
|
|
96
|
+
};
|
|
97
|
+
// 鼠标按下 app
|
|
98
|
+
const onDownApp = (down: TouchEvent) => {
|
|
99
|
+
state.isFlags = true;
|
|
100
|
+
state.downClientY = down.touches[0].clientY;
|
|
101
|
+
};
|
|
102
|
+
// 鼠标移动 pc
|
|
103
|
+
const onMovePc = (move: MouseEvent) => {
|
|
104
|
+
state.moveDifference = move.clientY - state.downClientY;
|
|
105
|
+
onMove();
|
|
106
|
+
};
|
|
107
|
+
// 鼠标移动 app
|
|
108
|
+
const onMoveApp = (move: TouchEvent) => {
|
|
109
|
+
state.moveDifference = move.touches[0].clientY - state.downClientY;
|
|
110
|
+
onMove();
|
|
111
|
+
};
|
|
112
|
+
// 鼠标移动事件
|
|
113
|
+
function onMove() {
|
|
114
|
+
if (state.isFlags) {
|
|
115
|
+
const el = <HTMLElement>state.querySelectorEl;
|
|
116
|
+
const opacitys = (state.transparency -= 1 / 200);
|
|
117
|
+
if (state.moveDifference >= 0) return false;
|
|
118
|
+
el.setAttribute('style', `top:${state.moveDifference}px;cursor:pointer;opacity:${opacitys};`);
|
|
119
|
+
if (state.moveDifference < -400) {
|
|
120
|
+
el.setAttribute('style', `top:${-el.clientHeight}px;cursor:pointer;transition:all 0.3s ease;`);
|
|
121
|
+
state.moveDifference = -el.clientHeight;
|
|
122
|
+
setTimeout(() => {
|
|
123
|
+
el && el.parentNode?.removeChild(el);
|
|
124
|
+
}, 300);
|
|
125
|
+
}
|
|
126
|
+
if (state.moveDifference === -el.clientHeight) {
|
|
127
|
+
state.isShowLoockLogin = true;
|
|
128
|
+
layoutLockScreenInputRef.value.focus();
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
// 鼠标松开
|
|
133
|
+
const onEnd = () => {
|
|
134
|
+
state.isFlags = false;
|
|
135
|
+
state.transparency = 1;
|
|
136
|
+
if (state.moveDifference >= -400) {
|
|
137
|
+
(<HTMLElement>state.querySelectorEl).setAttribute('style', `top:0px;opacity:1;transition:all 0.3s ease;`);
|
|
138
|
+
}
|
|
139
|
+
};
|
|
140
|
+
// 获取要拖拽的初始元素
|
|
141
|
+
const initGetElement = () => {
|
|
142
|
+
nextTick(() => {
|
|
143
|
+
state.querySelectorEl = layoutLockScreenDateRef.value;
|
|
144
|
+
});
|
|
145
|
+
};
|
|
146
|
+
// 时间初始化
|
|
147
|
+
const initTime = () => {
|
|
148
|
+
state.time.hm = formatDate(new Date(), 'HH:MM');
|
|
149
|
+
state.time.s = formatDate(new Date(), 'SS');
|
|
150
|
+
state.time.mdq = formatDate(new Date(), 'mm月dd日,WWW');
|
|
151
|
+
};
|
|
152
|
+
// 时间初始化定时器
|
|
153
|
+
const initSetTime = () => {
|
|
154
|
+
initTime();
|
|
155
|
+
state.setIntervalTime = window.setInterval(() => {
|
|
156
|
+
initTime();
|
|
157
|
+
}, 1000);
|
|
158
|
+
};
|
|
159
|
+
// 锁屏时间定时器
|
|
160
|
+
const initLockScreen = () => {
|
|
161
|
+
if (themeConfig.value.isLockScreen) {
|
|
162
|
+
state.isShowLockScreenIntervalTime = window.setInterval(async () => {
|
|
163
|
+
if (themeConfig.value.lockScreenTime <= 1) {
|
|
164
|
+
state.isShowLockScreen = true;
|
|
165
|
+
await setLocalThemeConfig();
|
|
166
|
+
return false;
|
|
167
|
+
}
|
|
168
|
+
themeConfig.value.lockScreenTime--;
|
|
169
|
+
}, 1000);
|
|
170
|
+
} else {
|
|
171
|
+
clearInterval(state.isShowLockScreenIntervalTime);
|
|
172
|
+
}
|
|
173
|
+
};
|
|
174
|
+
// 存储布局配置
|
|
175
|
+
async function setLocalThemeConfig() {
|
|
176
|
+
themeConfig.value.isDrawer = false;
|
|
177
|
+
await systemStore.set('themeConfig', themeConfig.value);
|
|
178
|
+
}
|
|
179
|
+
// 密码输入点击事件
|
|
180
|
+
async function onLockScreenSubmit() {
|
|
181
|
+
themeConfig.value.isLockScreen = false;
|
|
182
|
+
themeConfig.value.lockScreenTime = 30;
|
|
183
|
+
await setLocalThemeConfig();
|
|
184
|
+
}
|
|
185
|
+
// 页面加载时
|
|
186
|
+
onMounted(() => {
|
|
187
|
+
initGetElement();
|
|
188
|
+
initSetTime();
|
|
189
|
+
initLockScreen();
|
|
190
|
+
});
|
|
191
|
+
// 页面卸载时
|
|
192
|
+
onUnmounted(() => {
|
|
193
|
+
window.clearInterval(state.setIntervalTime);
|
|
194
|
+
window.clearInterval(state.isShowLockScreenIntervalTime);
|
|
195
|
+
});
|
|
196
|
+
</script>
|
|
197
|
+
|
|
198
|
+
<style scoped lang="scss">
|
|
199
|
+
.layout-lock-screen-fixed {
|
|
200
|
+
position: fixed;
|
|
201
|
+
top: 0;
|
|
202
|
+
left: 0;
|
|
203
|
+
width: 100%;
|
|
204
|
+
height: 100%;
|
|
205
|
+
}
|
|
206
|
+
.layout-lock-screen-filter {
|
|
207
|
+
filter: blur(1px);
|
|
208
|
+
}
|
|
209
|
+
.layout-lock-screen-mask {
|
|
210
|
+
background: var(--el-color-white);
|
|
211
|
+
@extend .layout-lock-screen-fixed;
|
|
212
|
+
z-index: 9999990;
|
|
213
|
+
}
|
|
214
|
+
.layout-lock-screen-img {
|
|
215
|
+
@extend .layout-lock-screen-fixed;
|
|
216
|
+
background-image: url('https://i.hd-r.cn/e4a19d84364f185266666765ac21a5db.jpg');
|
|
217
|
+
background-size: 100% 100%;
|
|
218
|
+
z-index: 9999991;
|
|
219
|
+
}
|
|
220
|
+
.layout-lock-screen {
|
|
221
|
+
@extend .layout-lock-screen-fixed;
|
|
222
|
+
z-index: 9999992;
|
|
223
|
+
&-date {
|
|
224
|
+
position: absolute;
|
|
225
|
+
left: 0;
|
|
226
|
+
top: 0;
|
|
227
|
+
width: 100%;
|
|
228
|
+
height: 100%;
|
|
229
|
+
color: var(--el-color-white);
|
|
230
|
+
z-index: 9999993;
|
|
231
|
+
user-select: none;
|
|
232
|
+
&-box {
|
|
233
|
+
position: absolute;
|
|
234
|
+
left: 30px;
|
|
235
|
+
bottom: 50px;
|
|
236
|
+
&-time {
|
|
237
|
+
font-size: 100px;
|
|
238
|
+
color: var(--el-color-white);
|
|
239
|
+
}
|
|
240
|
+
&-info {
|
|
241
|
+
font-size: 40px;
|
|
242
|
+
color: var(--el-color-white);
|
|
243
|
+
}
|
|
244
|
+
&-minutes {
|
|
245
|
+
font-size: 16px;
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
&-top {
|
|
249
|
+
width: 40px;
|
|
250
|
+
height: 40px;
|
|
251
|
+
line-height: 40px;
|
|
252
|
+
border-radius: 100%;
|
|
253
|
+
border: 1px solid var(--el-border-color-light, #ebeef5);
|
|
254
|
+
background: rgba(255, 255, 255, 0.1);
|
|
255
|
+
color: var(--el-color-white);
|
|
256
|
+
opacity: 0.8;
|
|
257
|
+
position: absolute;
|
|
258
|
+
right: 30px;
|
|
259
|
+
bottom: 50px;
|
|
260
|
+
text-align: center;
|
|
261
|
+
overflow: hidden;
|
|
262
|
+
transition: all 0.3s ease;
|
|
263
|
+
i {
|
|
264
|
+
transition: all 0.3s ease;
|
|
265
|
+
}
|
|
266
|
+
&-text {
|
|
267
|
+
opacity: 0;
|
|
268
|
+
position: absolute;
|
|
269
|
+
top: 150%;
|
|
270
|
+
font-size: 12px;
|
|
271
|
+
color: var(--el-color-white);
|
|
272
|
+
left: 50%;
|
|
273
|
+
line-height: 1.2;
|
|
274
|
+
transform: translate(-50%, -50%);
|
|
275
|
+
transition: all 0.3s ease;
|
|
276
|
+
width: 35px;
|
|
277
|
+
}
|
|
278
|
+
&:hover {
|
|
279
|
+
border: 1px solid rgba(255, 255, 255, 0.5);
|
|
280
|
+
background: rgba(255, 255, 255, 0.2);
|
|
281
|
+
box-shadow: 0 0 12px 0 rgba(255, 255, 255, 0.5);
|
|
282
|
+
color: var(--el-color-white);
|
|
283
|
+
opacity: 1;
|
|
284
|
+
transition: all 0.3s ease;
|
|
285
|
+
i {
|
|
286
|
+
transform: translateY(-40px);
|
|
287
|
+
transition: all 0.3s ease;
|
|
288
|
+
}
|
|
289
|
+
.layout-lock-screen-date-top-text {
|
|
290
|
+
opacity: 1;
|
|
291
|
+
top: 50%;
|
|
292
|
+
transition: all 0.3s ease;
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
&-login {
|
|
298
|
+
position: relative;
|
|
299
|
+
z-index: 9999994;
|
|
300
|
+
width: 100%;
|
|
301
|
+
height: 100%;
|
|
302
|
+
left: 0;
|
|
303
|
+
top: 0;
|
|
304
|
+
display: flex;
|
|
305
|
+
flex-direction: column;
|
|
306
|
+
justify-content: center;
|
|
307
|
+
color: var(--el-color-white);
|
|
308
|
+
&-box {
|
|
309
|
+
text-align: center;
|
|
310
|
+
margin: auto;
|
|
311
|
+
&-img {
|
|
312
|
+
width: 180px;
|
|
313
|
+
height: 180px;
|
|
314
|
+
margin: auto;
|
|
315
|
+
img {
|
|
316
|
+
width: 100%;
|
|
317
|
+
height: 100%;
|
|
318
|
+
border-radius: 100%;
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
&-name {
|
|
322
|
+
font-size: 26px;
|
|
323
|
+
margin: 15px 0 30px;
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
&-icon {
|
|
327
|
+
position: absolute;
|
|
328
|
+
right: 30px;
|
|
329
|
+
bottom: 30px;
|
|
330
|
+
i {
|
|
331
|
+
font-size: 20px;
|
|
332
|
+
margin-left: 15px;
|
|
333
|
+
cursor: pointer;
|
|
334
|
+
opacity: 0.8;
|
|
335
|
+
&:hover {
|
|
336
|
+
opacity: 1;
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
:deep(.el-input-group__append) {
|
|
343
|
+
background: var(--el-color-white);
|
|
344
|
+
padding: 0px 15px;
|
|
345
|
+
}
|
|
346
|
+
:deep(.el-input__inner) {
|
|
347
|
+
border-right-color: var(--el-border-color-extra-light);
|
|
348
|
+
&:hover {
|
|
349
|
+
border-color: var(--el-border-color-extra-light);
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
</style>
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="layout-logo" v-if="setShowLogo" @click="onThemeConfigChange">
|
|
3
|
+
<img :src="logoMini" class="layout-logo-medium-img" />
|
|
4
|
+
<span>{{ themeConfig.globalTitle }}</span>
|
|
5
|
+
</div>
|
|
6
|
+
<div class="layout-logo-size" v-else @click="onThemeConfigChange">
|
|
7
|
+
<img :src="logoMini" class="layout-logo-size-img" />
|
|
8
|
+
</div>
|
|
9
|
+
</template>
|
|
10
|
+
|
|
11
|
+
<script setup lang="ts" name="layoutLogo">
|
|
12
|
+
import { computed } from 'vue';
|
|
13
|
+
import { storeToRefs } from 'pinia';
|
|
14
|
+
import { useThemeConfig } from '/@/stores/themeConfig';
|
|
15
|
+
import logoMini from '/@/assets/logo-mini.svg';
|
|
16
|
+
|
|
17
|
+
// 定义变量内容
|
|
18
|
+
const storesThemeConfig = useThemeConfig();
|
|
19
|
+
const { themeConfig } = storeToRefs(storesThemeConfig);
|
|
20
|
+
|
|
21
|
+
// 设置 logo 的显示。classic 经典布局默认显示 logo
|
|
22
|
+
const setShowLogo = computed(() => {
|
|
23
|
+
let { isCollapse, layout } = themeConfig.value;
|
|
24
|
+
return !isCollapse || layout === 'classic' || document.body.clientWidth < 1000;
|
|
25
|
+
});
|
|
26
|
+
// logo 点击实现菜单展开/收起
|
|
27
|
+
const onThemeConfigChange = () => {
|
|
28
|
+
if (themeConfig.value.layout === 'transverse') return false;
|
|
29
|
+
themeConfig.value.isCollapse = !themeConfig.value.isCollapse;
|
|
30
|
+
};
|
|
31
|
+
</script>
|
|
32
|
+
|
|
33
|
+
<style scoped lang="scss">
|
|
34
|
+
.layout-logo {
|
|
35
|
+
width: 220px;
|
|
36
|
+
height: 50px;
|
|
37
|
+
display: flex;
|
|
38
|
+
align-items: center;
|
|
39
|
+
justify-content: center;
|
|
40
|
+
box-shadow: rgb(0 21 41 / 2%) 0px 1px 4px;
|
|
41
|
+
color: var(--el-color-primary);
|
|
42
|
+
font-size: 16px;
|
|
43
|
+
cursor: pointer;
|
|
44
|
+
animation: logoAnimation 0.3s ease-in-out;
|
|
45
|
+
span {
|
|
46
|
+
white-space: nowrap;
|
|
47
|
+
display: inline-block;
|
|
48
|
+
}
|
|
49
|
+
&:hover {
|
|
50
|
+
span {
|
|
51
|
+
color: var(--color-primary-light-2);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
&-medium-img {
|
|
55
|
+
width: 20px;
|
|
56
|
+
margin-right: 5px;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
.layout-logo-size {
|
|
60
|
+
width: 100%;
|
|
61
|
+
height: 50px;
|
|
62
|
+
display: flex;
|
|
63
|
+
cursor: pointer;
|
|
64
|
+
animation: logoAnimation 0.3s ease-in-out;
|
|
65
|
+
&-img {
|
|
66
|
+
width: 20px;
|
|
67
|
+
margin: auto;
|
|
68
|
+
}
|
|
69
|
+
&:hover {
|
|
70
|
+
img {
|
|
71
|
+
animation: logoAnimation 0.3s ease-in-out;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
</style>
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<el-container class="layout-container flex-center">
|
|
3
|
+
<LayoutHeader />
|
|
4
|
+
<el-container class="layout-mian-height-50">
|
|
5
|
+
<LayoutAside />
|
|
6
|
+
<div class="flex-center layout-backtop">
|
|
7
|
+
<LayoutTagsView v-if="isTagsview" />
|
|
8
|
+
<LayoutMain ref="layoutMainRef" />
|
|
9
|
+
</div>
|
|
10
|
+
</el-container>
|
|
11
|
+
</el-container>
|
|
12
|
+
</template>
|
|
13
|
+
|
|
14
|
+
<script setup lang="ts" name="layoutClassic">
|
|
15
|
+
import { defineAsyncComponent, computed, ref, watch, nextTick, onMounted } from 'vue';
|
|
16
|
+
import { useRoute } from 'vue-router';
|
|
17
|
+
import { storeToRefs } from 'pinia';
|
|
18
|
+
import { useThemeConfig } from '/@/stores/themeConfig';
|
|
19
|
+
|
|
20
|
+
// 引入组件
|
|
21
|
+
const LayoutAside = defineAsyncComponent(() => import('/@/layout/component/aside.vue'));
|
|
22
|
+
const LayoutHeader = defineAsyncComponent(() => import('/@/layout/component/header.vue'));
|
|
23
|
+
const LayoutMain = defineAsyncComponent(() => import('/@/layout/component/main.vue'));
|
|
24
|
+
const LayoutTagsView = defineAsyncComponent(() => import('/@/layout/navBars/tagsView/tagsView.vue'));
|
|
25
|
+
|
|
26
|
+
// 定义变量内容
|
|
27
|
+
const layoutMainRef = ref<InstanceType<typeof LayoutMain>>();
|
|
28
|
+
const route = useRoute();
|
|
29
|
+
const storesThemeConfig = useThemeConfig();
|
|
30
|
+
const { themeConfig } = storeToRefs(storesThemeConfig);
|
|
31
|
+
|
|
32
|
+
// 判断是否显示 tasgview
|
|
33
|
+
const isTagsview = computed(() => {
|
|
34
|
+
return themeConfig.value.isTagsview;
|
|
35
|
+
});
|
|
36
|
+
// 重置滚动条高度,更新子级 scrollbar
|
|
37
|
+
const updateScrollbar = () => {
|
|
38
|
+
layoutMainRef.value?.layoutMainScrollbarRef.update();
|
|
39
|
+
};
|
|
40
|
+
// 重置滚动条高度,由于组件是异步引入的
|
|
41
|
+
const initScrollBarHeight = () => {
|
|
42
|
+
nextTick(() => {
|
|
43
|
+
setTimeout(() => {
|
|
44
|
+
updateScrollbar();
|
|
45
|
+
// '!' not null 断言操作符,不执行运行时检查
|
|
46
|
+
if (layoutMainRef.value) layoutMainRef.value!.layoutMainScrollbarRef.wrapRef.scrollTop = 0;
|
|
47
|
+
}, 500);
|
|
48
|
+
});
|
|
49
|
+
};
|
|
50
|
+
// 页面加载时
|
|
51
|
+
onMounted(() => {
|
|
52
|
+
initScrollBarHeight();
|
|
53
|
+
});
|
|
54
|
+
// 监听路由的变化,切换界面时,滚动条置顶
|
|
55
|
+
watch(
|
|
56
|
+
() => route.path,
|
|
57
|
+
() => {
|
|
58
|
+
initScrollBarHeight();
|
|
59
|
+
}
|
|
60
|
+
);
|
|
61
|
+
// 监听 themeConfig isTagsview 配置文件的变化,更新菜单 el-scrollbar 的高度
|
|
62
|
+
watch(
|
|
63
|
+
() => themeConfig.value.isTagsview,
|
|
64
|
+
() => {
|
|
65
|
+
nextTick(() => {
|
|
66
|
+
updateScrollbar();
|
|
67
|
+
});
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
deep: true,
|
|
71
|
+
}
|
|
72
|
+
);
|
|
73
|
+
</script>
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<el-container class="layout-container">
|
|
3
|
+
<ColumnsAside />
|
|
4
|
+
<el-container class="layout-columns-warp layout-container-view h100">
|
|
5
|
+
<LayoutAside />
|
|
6
|
+
<el-scrollbar ref="layoutScrollbarRef" class="layout-backtop">
|
|
7
|
+
<LayoutHeader />
|
|
8
|
+
<LayoutMain ref="layoutMainRef" />
|
|
9
|
+
</el-scrollbar>
|
|
10
|
+
</el-container>
|
|
11
|
+
</el-container>
|
|
12
|
+
</template>
|
|
13
|
+
|
|
14
|
+
<script setup lang="ts" name="layoutColumns">
|
|
15
|
+
import { defineAsyncComponent, watch, onMounted, nextTick, ref } from 'vue';
|
|
16
|
+
import { useRoute } from 'vue-router';
|
|
17
|
+
import { storeToRefs } from 'pinia';
|
|
18
|
+
import { useThemeConfig } from '/@/stores/themeConfig';
|
|
19
|
+
|
|
20
|
+
// 引入组件
|
|
21
|
+
const LayoutAside = defineAsyncComponent(() => import('/@/layout/component/aside.vue'));
|
|
22
|
+
const LayoutHeader = defineAsyncComponent(() => import('/@/layout/component/header.vue'));
|
|
23
|
+
const LayoutMain = defineAsyncComponent(() => import('/@/layout/component/main.vue'));
|
|
24
|
+
const ColumnsAside = defineAsyncComponent(() => import('/@/layout/component/columnsAside.vue'));
|
|
25
|
+
|
|
26
|
+
// 定义变量内容
|
|
27
|
+
const layoutScrollbarRef = ref<RefType>('');
|
|
28
|
+
const layoutMainRef = ref<InstanceType<typeof LayoutMain>>();
|
|
29
|
+
const route = useRoute();
|
|
30
|
+
const storesThemeConfig = useThemeConfig();
|
|
31
|
+
const { themeConfig } = storeToRefs(storesThemeConfig);
|
|
32
|
+
|
|
33
|
+
// 重置滚动条高度
|
|
34
|
+
const updateScrollbar = () => {
|
|
35
|
+
// 更新父级 scrollbar
|
|
36
|
+
layoutScrollbarRef.value.update();
|
|
37
|
+
// 更新子级 scrollbar
|
|
38
|
+
layoutMainRef.value && layoutMainRef.value!.layoutMainScrollbarRef.update();
|
|
39
|
+
};
|
|
40
|
+
// 重置滚动条高度,由于组件是异步引入的
|
|
41
|
+
const initScrollBarHeight = () => {
|
|
42
|
+
nextTick(() => {
|
|
43
|
+
setTimeout(() => {
|
|
44
|
+
updateScrollbar();
|
|
45
|
+
layoutScrollbarRef.value.wrapRef.scrollTop = 0;
|
|
46
|
+
layoutMainRef.value!.layoutMainScrollbarRef.wrapRef.scrollTop = 0;
|
|
47
|
+
}, 500);
|
|
48
|
+
});
|
|
49
|
+
};
|
|
50
|
+
// 页面加载时
|
|
51
|
+
onMounted(() => {
|
|
52
|
+
initScrollBarHeight();
|
|
53
|
+
});
|
|
54
|
+
// 监听路由的变化,切换界面时,滚动条置顶
|
|
55
|
+
watch(
|
|
56
|
+
() => route.path,
|
|
57
|
+
() => {
|
|
58
|
+
initScrollBarHeight();
|
|
59
|
+
}
|
|
60
|
+
);
|
|
61
|
+
// 监听 themeConfig 配置文件的变化,更新菜单 el-scrollbar 的高度
|
|
62
|
+
watch(
|
|
63
|
+
() => [themeConfig.value.isTagsview, themeConfig.value.isFixedHeader],
|
|
64
|
+
() => {
|
|
65
|
+
nextTick(() => {
|
|
66
|
+
updateScrollbar();
|
|
67
|
+
});
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
deep: true,
|
|
71
|
+
}
|
|
72
|
+
);
|
|
73
|
+
</script>
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<el-container class="layout-container">
|
|
3
|
+
<LayoutAside />
|
|
4
|
+
<el-container class="layout-container-view h100">
|
|
5
|
+
<el-scrollbar ref="layoutScrollbarRef" class="layout-backtop">
|
|
6
|
+
<LayoutHeader />
|
|
7
|
+
<LayoutMain ref="layoutMainRef" />
|
|
8
|
+
</el-scrollbar>
|
|
9
|
+
</el-container>
|
|
10
|
+
</el-container>
|
|
11
|
+
</template>
|
|
12
|
+
|
|
13
|
+
<script setup lang="ts" name="layoutDefaults">
|
|
14
|
+
import { defineAsyncComponent, watch, onMounted, nextTick, ref } from 'vue';
|
|
15
|
+
import { useRoute } from 'vue-router';
|
|
16
|
+
import { storeToRefs } from 'pinia';
|
|
17
|
+
import { useThemeConfig } from '/@/stores/themeConfig';
|
|
18
|
+
import { NextLoading } from '/@/utils/loading';
|
|
19
|
+
|
|
20
|
+
// 引入组件
|
|
21
|
+
const LayoutAside = defineAsyncComponent(() => import('/@/layout/component/aside.vue'));
|
|
22
|
+
const LayoutHeader = defineAsyncComponent(() => import('/@/layout/component/header.vue'));
|
|
23
|
+
const LayoutMain = defineAsyncComponent(() => import('/@/layout/component/main.vue'));
|
|
24
|
+
|
|
25
|
+
// 定义变量内容
|
|
26
|
+
const layoutScrollbarRef = ref<RefType>('');
|
|
27
|
+
const layoutMainRef = ref<InstanceType<typeof LayoutMain>>();
|
|
28
|
+
const route = useRoute();
|
|
29
|
+
const storesThemeConfig = useThemeConfig();
|
|
30
|
+
const { themeConfig } = storeToRefs(storesThemeConfig);
|
|
31
|
+
|
|
32
|
+
// 重置滚动条高度
|
|
33
|
+
const updateScrollbar = () => {
|
|
34
|
+
// 更新父级 scrollbar
|
|
35
|
+
layoutScrollbarRef.value.update();
|
|
36
|
+
// 更新子级 scrollbar
|
|
37
|
+
layoutMainRef.value!.layoutMainScrollbarRef.update();
|
|
38
|
+
};
|
|
39
|
+
// 重置滚动条高度,由于组件是异步引入的
|
|
40
|
+
const initScrollBarHeight = () => {
|
|
41
|
+
nextTick(() => {
|
|
42
|
+
setTimeout(() => {
|
|
43
|
+
updateScrollbar();
|
|
44
|
+
layoutScrollbarRef.value.wrapRef.scrollTop = 0;
|
|
45
|
+
layoutMainRef.value!.layoutMainScrollbarRef.wrapRef.scrollTop = 0;
|
|
46
|
+
}, 500);
|
|
47
|
+
});
|
|
48
|
+
};
|
|
49
|
+
// 页面加载时
|
|
50
|
+
onMounted(() => {
|
|
51
|
+
initScrollBarHeight();
|
|
52
|
+
NextLoading.done(600);
|
|
53
|
+
});
|
|
54
|
+
// 监听路由的变化,切换界面时,滚动条置顶
|
|
55
|
+
watch(
|
|
56
|
+
() => route.path,
|
|
57
|
+
() => {
|
|
58
|
+
initScrollBarHeight();
|
|
59
|
+
}
|
|
60
|
+
);
|
|
61
|
+
// 监听 themeConfig 配置文件的变化,更新菜单 el-scrollbar 的高度
|
|
62
|
+
watch(
|
|
63
|
+
() => [themeConfig.value.isTagsview, themeConfig.value.isFixedHeader],
|
|
64
|
+
() => {
|
|
65
|
+
nextTick(() => {
|
|
66
|
+
updateScrollbar();
|
|
67
|
+
});
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
deep: true,
|
|
71
|
+
}
|
|
72
|
+
);
|
|
73
|
+
</script>
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<el-container class="layout-container flex-center layout-backtop">
|
|
3
|
+
<LayoutHeader />
|
|
4
|
+
<LayoutMain ref="layoutMainRef" />
|
|
5
|
+
</el-container>
|
|
6
|
+
</template>
|
|
7
|
+
|
|
8
|
+
<script setup lang="ts" name="layoutTransverse">
|
|
9
|
+
import { defineAsyncComponent, ref, watch, nextTick, onMounted } from 'vue';
|
|
10
|
+
import { useRoute } from 'vue-router';
|
|
11
|
+
import { storeToRefs } from 'pinia';
|
|
12
|
+
import { useThemeConfig } from '/@/stores/themeConfig';
|
|
13
|
+
|
|
14
|
+
// 引入组件
|
|
15
|
+
const LayoutHeader = defineAsyncComponent(() => import('/@/layout/component/header.vue'));
|
|
16
|
+
const LayoutMain = defineAsyncComponent(() => import('/@/layout/component/main.vue'));
|
|
17
|
+
|
|
18
|
+
// 定义变量内容
|
|
19
|
+
const layoutMainRef = ref<InstanceType<typeof LayoutMain>>();
|
|
20
|
+
const storesThemeConfig = useThemeConfig();
|
|
21
|
+
const { themeConfig } = storeToRefs(storesThemeConfig);
|
|
22
|
+
const route = useRoute();
|
|
23
|
+
|
|
24
|
+
// 重置滚动条高度,更新子级 scrollbar
|
|
25
|
+
const updateScrollbar = () => {
|
|
26
|
+
layoutMainRef.value!.layoutMainScrollbarRef.update();
|
|
27
|
+
};
|
|
28
|
+
// 重置滚动条高度,由于组件是异步引入的
|
|
29
|
+
const initScrollBarHeight = () => {
|
|
30
|
+
nextTick(() => {
|
|
31
|
+
setTimeout(() => {
|
|
32
|
+
updateScrollbar();
|
|
33
|
+
layoutMainRef.value!.layoutMainScrollbarRef.wrapRef.scrollTop = 0;
|
|
34
|
+
}, 500);
|
|
35
|
+
});
|
|
36
|
+
};
|
|
37
|
+
// 页面加载时
|
|
38
|
+
onMounted(() => {
|
|
39
|
+
initScrollBarHeight();
|
|
40
|
+
});
|
|
41
|
+
// 监听路由的变化,切换界面时,滚动条置顶
|
|
42
|
+
watch(
|
|
43
|
+
() => route.path,
|
|
44
|
+
() => {
|
|
45
|
+
initScrollBarHeight();
|
|
46
|
+
}
|
|
47
|
+
);
|
|
48
|
+
// 监听 themeConfig 配置文件的变化,更新菜单 el-scrollbar 的高度
|
|
49
|
+
watch(
|
|
50
|
+
() => themeConfig.value.isTagsview,
|
|
51
|
+
() => {
|
|
52
|
+
nextTick(() => {
|
|
53
|
+
updateScrollbar();
|
|
54
|
+
});
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
deep: true,
|
|
58
|
+
}
|
|
59
|
+
);
|
|
60
|
+
</script>
|