@antdv-vue/pro-layout 0.0.0-stage → 2.0.3
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/CHANGELOG.md +266 -0
- package/README.md +111 -2
- package/dist/BasicLayout.d.ts +255 -0
- package/dist/BasicLayout.js +895 -0
- package/dist/ProLayout.d.ts +334 -0
- package/dist/ProLayout.js +548 -0
- package/dist/RenderTypings.d.ts +116 -0
- package/dist/RenderTypings.js +1 -0
- package/dist/WrapContent.d.ts +23 -0
- package/dist/WrapContent.js +73 -0
- package/dist/assert/Logo.d.ts +6 -0
- package/dist/assert/Logo.js +102 -0
- package/dist/components/AppsLogoComponents/AppsLogo.d.ts +10 -0
- package/dist/components/AppsLogoComponents/AppsLogo.js +17 -0
- package/dist/components/AppsLogoComponents/DefaultContent.d.ts +22 -0
- package/dist/components/AppsLogoComponents/DefaultContent.js +42 -0
- package/dist/components/AppsLogoComponents/SimpleContent.d.ts +12 -0
- package/dist/components/AppsLogoComponents/SimpleContent.js +44 -0
- package/dist/components/AppsLogoComponents/index.d.ts +22 -0
- package/dist/components/AppsLogoComponents/index.js +85 -0
- package/dist/components/AppsLogoComponents/style/default.d.ts +7 -0
- package/dist/components/AppsLogoComponents/style/default.js +72 -0
- package/dist/components/AppsLogoComponents/style/index.d.ts +8 -0
- package/dist/components/AppsLogoComponents/style/index.js +69 -0
- package/dist/components/AppsLogoComponents/style/simple.d.ts +7 -0
- package/dist/components/AppsLogoComponents/style/simple.js +85 -0
- package/dist/components/AppsLogoComponents/typing.d.ts +14 -0
- package/dist/components/AppsLogoComponents/typing.js +1 -0
- package/dist/components/CollapsedIcon/index.d.ts +9 -0
- package/dist/components/CollapsedIcon/index.js +6 -0
- package/dist/components/Footer/index.d.ts +18 -0
- package/dist/components/Footer/index.js +25 -0
- package/dist/components/FooterToolbar/index.d.ts +21 -0
- package/dist/components/FooterToolbar/index.js +85 -0
- package/dist/components/FooterToolbar/style/index.d.ts +8 -0
- package/dist/components/FooterToolbar/style/index.js +35 -0
- package/dist/components/FooterToolbar/style/stylish.d.ts +13 -0
- package/dist/components/FooterToolbar/style/stylish.js +12 -0
- package/dist/components/GlobalFooter/index.d.ts +17 -0
- package/dist/components/GlobalFooter/index.js +46 -0
- package/dist/components/GlobalFooter/style/index.d.ts +8 -0
- package/dist/components/GlobalFooter/style/index.js +33 -0
- package/dist/components/GlobalHeader/ActionsContent.d.ts +30 -0
- package/dist/components/GlobalHeader/ActionsContent.js +88 -0
- package/dist/components/GlobalHeader/index.d.ts +146 -0
- package/dist/components/GlobalHeader/index.js +289 -0
- package/dist/components/GlobalHeader/style/index.d.ts +8 -0
- package/dist/components/GlobalHeader/style/index.js +62 -0
- package/dist/components/GlobalHeader/style/rightContentStyle.d.ts +8 -0
- package/dist/components/GlobalHeader/style/rightContentStyle.js +99 -0
- package/dist/components/GridContent/index.d.ts +19 -0
- package/dist/components/GridContent/index.js +40 -0
- package/dist/components/GridContent/style/index.d.ts +8 -0
- package/dist/components/GridContent/style/index.js +17 -0
- package/dist/components/Header/index.d.ts +106 -0
- package/dist/components/Header/index.js +330 -0
- package/dist/components/Header/style/header.d.ts +8 -0
- package/dist/components/Header/style/header.js +39 -0
- package/dist/components/Header/style/stylish.d.ts +17 -0
- package/dist/components/Header/style/stylish.js +12 -0
- package/dist/components/Help/AsyncContentPanel.d.ts +11 -0
- package/dist/components/Help/AsyncContentPanel.js +51 -0
- package/dist/components/Help/HelpProvide.d.ts +206 -0
- package/dist/components/Help/HelpProvide.js +20 -0
- package/dist/components/Help/ProHelpContentPanel.d.ts +19 -0
- package/dist/components/Help/ProHelpContentPanel.js +120 -0
- package/dist/components/Help/ProHelpDrawer.d.ts +13 -0
- package/dist/components/Help/ProHelpDrawer.js +108 -0
- package/dist/components/Help/ProHelpModal.d.ts +19 -0
- package/dist/components/Help/ProHelpModal.js +105 -0
- package/dist/components/Help/ProHelpPanel.d.ts +95 -0
- package/dist/components/Help/ProHelpPanel.js +245 -0
- package/dist/components/Help/ProHelpPopover.d.ts +61 -0
- package/dist/components/Help/ProHelpPopover.js +183 -0
- package/dist/components/Help/ProHelpSearch.d.ts +14 -0
- package/dist/components/Help/ProHelpSearch.js +530 -0
- package/dist/components/Help/RenderContentPanel.d.ts +11 -0
- package/dist/components/Help/RenderContentPanel.js +90 -0
- package/dist/components/Help/index.d.ts +43 -0
- package/dist/components/Help/index.js +31 -0
- package/dist/components/Help/style/index.d.ts +10 -0
- package/dist/components/Help/style/index.js +96 -0
- package/dist/components/MultiTab/index.d.ts +71 -0
- package/dist/components/MultiTab/index.js +303 -0
- package/dist/components/MultiTab/style/index.d.ts +8 -0
- package/dist/components/MultiTab/style/index.js +67 -0
- package/dist/components/PageContainer/PageContainerBase.d.ts +155 -0
- package/dist/components/PageContainer/PageContainerBase.js +349 -0
- package/dist/components/PageContainer/index.d.ts +57 -0
- package/dist/components/PageContainer/index.js +234 -0
- package/dist/components/PageContainer/style/index.d.ts +8 -0
- package/dist/components/PageContainer/style/index.js +63 -0
- package/dist/components/PageContainer/style/stylish.d.ts +13 -0
- package/dist/components/PageContainer/style/stylish.js +12 -0
- package/dist/components/PageHeader/index.d.ts +37 -0
- package/dist/components/PageHeader/index.js +221 -0
- package/dist/components/PageHeader/style/index.d.ts +17 -0
- package/dist/components/PageHeader/style/index.js +132 -0
- package/dist/components/PageLoading/index.d.ts +9 -0
- package/dist/components/PageLoading/index.js +15 -0
- package/dist/components/SettingDrawer/BlockCheckbox.d.ts +18 -0
- package/dist/components/SettingDrawer/BlockCheckbox.js +25 -0
- package/dist/components/SettingDrawer/LayoutChange.d.ts +28 -0
- package/dist/components/SettingDrawer/LayoutChange.js +127 -0
- package/dist/components/SettingDrawer/RegionalChange.d.ts +15 -0
- package/dist/components/SettingDrawer/RegionalChange.js +35 -0
- package/dist/components/SettingDrawer/ThemeColor.d.ts +28 -0
- package/dist/components/SettingDrawer/ThemeColor.js +30 -0
- package/dist/components/SettingDrawer/icon/group.d.ts +10 -0
- package/dist/components/SettingDrawer/icon/group.js +190 -0
- package/dist/components/SettingDrawer/icon/sub.d.ts +10 -0
- package/dist/components/SettingDrawer/icon/sub.js +187 -0
- package/dist/components/SettingDrawer/index.d.ts +42 -0
- package/dist/components/SettingDrawer/index.js +510 -0
- package/dist/components/SettingDrawer/style/index.d.ts +9 -0
- package/dist/components/SettingDrawer/style/index.js +236 -0
- package/dist/components/SiderMenu/BaseMenu.d.ts +133 -0
- package/dist/components/SiderMenu/BaseMenu.js +583 -0
- package/dist/components/SiderMenu/SiderMenu.d.ts +326 -0
- package/dist/components/SiderMenu/SiderMenu.js +756 -0
- package/dist/components/SiderMenu/index.d.ts +72 -0
- package/dist/components/SiderMenu/index.js +507 -0
- package/dist/components/SiderMenu/style/index.d.ts +20 -0
- package/dist/components/SiderMenu/style/index.js +301 -0
- package/dist/components/SiderMenu/style/menu.d.ts +10 -0
- package/dist/components/SiderMenu/style/menu.js +23 -0
- package/dist/components/SiderMenu/style/stylish.d.ts +20 -0
- package/dist/components/SiderMenu/style/stylish.js +15 -0
- package/dist/components/TopNavHeader/index.d.ts +86 -0
- package/dist/components/TopNavHeader/index.js +536 -0
- package/dist/components/TopNavHeader/style/index.d.ts +8 -0
- package/dist/components/TopNavHeader/style/index.js +71 -0
- package/dist/context/RouteContext.d.ts +39 -0
- package/dist/context/RouteContext.js +9 -0
- package/dist/defaultSettings.d.ts +115 -0
- package/dist/defaultSettings.js +16 -0
- package/dist/getPageTitle.d.ts +31 -0
- package/dist/getPageTitle.js +55 -0
- package/dist/index.d.ts +21 -0
- package/dist/index.js +17 -0
- package/dist/locales/ar-EG/help.d.ts +6 -0
- package/dist/locales/ar-EG/help.js +4 -0
- package/dist/locales/ar-EG/multiTab.d.ts +6 -0
- package/dist/locales/ar-EG/multiTab.js +10 -0
- package/dist/locales/ar-EG/settingDrawer.d.ts +6 -0
- package/dist/locales/ar-EG/settingDrawer.js +50 -0
- package/dist/locales/ar-EG.d.ts +56 -0
- package/dist/locales/ar-EG.js +11 -0
- package/dist/locales/ca-ES/help.d.ts +6 -0
- package/dist/locales/ca-ES/help.js +4 -0
- package/dist/locales/ca-ES/multiTab.d.ts +6 -0
- package/dist/locales/ca-ES/multiTab.js +10 -0
- package/dist/locales/ca-ES/settingDrawer.d.ts +6 -0
- package/dist/locales/ca-ES/settingDrawer.js +50 -0
- package/dist/locales/ca-ES.d.ts +56 -0
- package/dist/locales/ca-ES.js +11 -0
- package/dist/locales/cs-CZ/help.d.ts +6 -0
- package/dist/locales/cs-CZ/help.js +4 -0
- package/dist/locales/cs-CZ/multiTab.d.ts +6 -0
- package/dist/locales/cs-CZ/multiTab.js +10 -0
- package/dist/locales/cs-CZ/settingDrawer.d.ts +6 -0
- package/dist/locales/cs-CZ/settingDrawer.js +50 -0
- package/dist/locales/cs-CZ.d.ts +56 -0
- package/dist/locales/cs-CZ.js +11 -0
- package/dist/locales/de-DE/help.d.ts +6 -0
- package/dist/locales/de-DE/help.js +4 -0
- package/dist/locales/de-DE/multiTab.d.ts +6 -0
- package/dist/locales/de-DE/multiTab.js +10 -0
- package/dist/locales/de-DE/settingDrawer.d.ts +6 -0
- package/dist/locales/de-DE/settingDrawer.js +50 -0
- package/dist/locales/de-DE.d.ts +56 -0
- package/dist/locales/de-DE.js +11 -0
- package/dist/locales/en-GB/help.d.ts +6 -0
- package/dist/locales/en-GB/help.js +4 -0
- package/dist/locales/en-GB/multiTab.d.ts +6 -0
- package/dist/locales/en-GB/multiTab.js +10 -0
- package/dist/locales/en-GB/settingDrawer.d.ts +6 -0
- package/dist/locales/en-GB/settingDrawer.js +50 -0
- package/dist/locales/en-GB.d.ts +56 -0
- package/dist/locales/en-GB.js +11 -0
- package/dist/locales/en-US/help.d.ts +6 -0
- package/dist/locales/en-US/help.js +4 -0
- package/dist/locales/en-US/multiTab.d.ts +6 -0
- package/dist/locales/en-US/multiTab.js +10 -0
- package/dist/locales/en-US/settingDrawer.d.ts +6 -0
- package/dist/locales/en-US/settingDrawer.js +50 -0
- package/dist/locales/en-US.d.ts +56 -0
- package/dist/locales/en-US.js +11 -0
- package/dist/locales/es-ES/help.d.ts +6 -0
- package/dist/locales/es-ES/help.js +4 -0
- package/dist/locales/es-ES/multiTab.d.ts +6 -0
- package/dist/locales/es-ES/multiTab.js +10 -0
- package/dist/locales/es-ES/settingDrawer.d.ts +6 -0
- package/dist/locales/es-ES/settingDrawer.js +50 -0
- package/dist/locales/es-ES.d.ts +56 -0
- package/dist/locales/es-ES.js +11 -0
- package/dist/locales/fa-IR/help.d.ts +6 -0
- package/dist/locales/fa-IR/help.js +4 -0
- package/dist/locales/fa-IR/multiTab.d.ts +6 -0
- package/dist/locales/fa-IR/multiTab.js +10 -0
- package/dist/locales/fa-IR/settingDrawer.d.ts +6 -0
- package/dist/locales/fa-IR/settingDrawer.js +50 -0
- package/dist/locales/fa-IR.d.ts +56 -0
- package/dist/locales/fa-IR.js +11 -0
- package/dist/locales/fr-FR/help.d.ts +6 -0
- package/dist/locales/fr-FR/help.js +4 -0
- package/dist/locales/fr-FR/multiTab.d.ts +6 -0
- package/dist/locales/fr-FR/multiTab.js +10 -0
- package/dist/locales/fr-FR/settingDrawer.d.ts +6 -0
- package/dist/locales/fr-FR/settingDrawer.js +50 -0
- package/dist/locales/fr-FR.d.ts +56 -0
- package/dist/locales/fr-FR.js +11 -0
- package/dist/locales/he-IL/help.d.ts +6 -0
- package/dist/locales/he-IL/help.js +4 -0
- package/dist/locales/he-IL/multiTab.d.ts +6 -0
- package/dist/locales/he-IL/multiTab.js +10 -0
- package/dist/locales/he-IL/settingDrawer.d.ts +6 -0
- package/dist/locales/he-IL/settingDrawer.js +50 -0
- package/dist/locales/he-IL.d.ts +56 -0
- package/dist/locales/he-IL.js +11 -0
- package/dist/locales/hr-HR/help.d.ts +6 -0
- package/dist/locales/hr-HR/help.js +4 -0
- package/dist/locales/hr-HR/multiTab.d.ts +6 -0
- package/dist/locales/hr-HR/multiTab.js +10 -0
- package/dist/locales/hr-HR/settingDrawer.d.ts +6 -0
- package/dist/locales/hr-HR/settingDrawer.js +50 -0
- package/dist/locales/hr-HR.d.ts +56 -0
- package/dist/locales/hr-HR.js +11 -0
- package/dist/locales/id-ID/help.d.ts +6 -0
- package/dist/locales/id-ID/help.js +4 -0
- package/dist/locales/id-ID/multiTab.d.ts +6 -0
- package/dist/locales/id-ID/multiTab.js +10 -0
- package/dist/locales/id-ID/settingDrawer.d.ts +6 -0
- package/dist/locales/id-ID/settingDrawer.js +50 -0
- package/dist/locales/id-ID.d.ts +56 -0
- package/dist/locales/id-ID.js +11 -0
- package/dist/locales/index.d.ts +1756 -0
- package/dist/locales/index.js +86 -0
- package/dist/locales/it-IT/help.d.ts +6 -0
- package/dist/locales/it-IT/help.js +4 -0
- package/dist/locales/it-IT/multiTab.d.ts +6 -0
- package/dist/locales/it-IT/multiTab.js +10 -0
- package/dist/locales/it-IT/settingDrawer.d.ts +6 -0
- package/dist/locales/it-IT/settingDrawer.js +50 -0
- package/dist/locales/it-IT.d.ts +56 -0
- package/dist/locales/it-IT.js +11 -0
- package/dist/locales/ja-JP/help.d.ts +6 -0
- package/dist/locales/ja-JP/help.js +4 -0
- package/dist/locales/ja-JP/multiTab.d.ts +6 -0
- package/dist/locales/ja-JP/multiTab.js +10 -0
- package/dist/locales/ja-JP/settingDrawer.d.ts +6 -0
- package/dist/locales/ja-JP/settingDrawer.js +50 -0
- package/dist/locales/ja-JP.d.ts +56 -0
- package/dist/locales/ja-JP.js +11 -0
- package/dist/locales/ko-KR/help.d.ts +6 -0
- package/dist/locales/ko-KR/help.js +4 -0
- package/dist/locales/ko-KR/multiTab.d.ts +6 -0
- package/dist/locales/ko-KR/multiTab.js +10 -0
- package/dist/locales/ko-KR/settingDrawer.d.ts +6 -0
- package/dist/locales/ko-KR/settingDrawer.js +50 -0
- package/dist/locales/ko-KR.d.ts +56 -0
- package/dist/locales/ko-KR.js +11 -0
- package/dist/locales/mn-MN/help.d.ts +6 -0
- package/dist/locales/mn-MN/help.js +4 -0
- package/dist/locales/mn-MN/multiTab.d.ts +6 -0
- package/dist/locales/mn-MN/multiTab.js +10 -0
- package/dist/locales/mn-MN/settingDrawer.d.ts +6 -0
- package/dist/locales/mn-MN/settingDrawer.js +50 -0
- package/dist/locales/mn-MN.d.ts +56 -0
- package/dist/locales/mn-MN.js +11 -0
- package/dist/locales/ms-MY/help.d.ts +6 -0
- package/dist/locales/ms-MY/help.js +4 -0
- package/dist/locales/ms-MY/multiTab.d.ts +6 -0
- package/dist/locales/ms-MY/multiTab.js +10 -0
- package/dist/locales/ms-MY/settingDrawer.d.ts +6 -0
- package/dist/locales/ms-MY/settingDrawer.js +50 -0
- package/dist/locales/ms-MY.d.ts +56 -0
- package/dist/locales/ms-MY.js +11 -0
- package/dist/locales/nl-NL/help.d.ts +6 -0
- package/dist/locales/nl-NL/help.js +4 -0
- package/dist/locales/nl-NL/multiTab.d.ts +6 -0
- package/dist/locales/nl-NL/multiTab.js +10 -0
- package/dist/locales/nl-NL/settingDrawer.d.ts +6 -0
- package/dist/locales/nl-NL/settingDrawer.js +50 -0
- package/dist/locales/nl-NL.d.ts +56 -0
- package/dist/locales/nl-NL.js +11 -0
- package/dist/locales/pl-PL/help.d.ts +6 -0
- package/dist/locales/pl-PL/help.js +4 -0
- package/dist/locales/pl-PL/multiTab.d.ts +6 -0
- package/dist/locales/pl-PL/multiTab.js +10 -0
- package/dist/locales/pl-PL/settingDrawer.d.ts +6 -0
- package/dist/locales/pl-PL/settingDrawer.js +50 -0
- package/dist/locales/pl-PL.d.ts +56 -0
- package/dist/locales/pl-PL.js +11 -0
- package/dist/locales/pt-BR/help.d.ts +6 -0
- package/dist/locales/pt-BR/help.js +4 -0
- package/dist/locales/pt-BR/multiTab.d.ts +6 -0
- package/dist/locales/pt-BR/multiTab.js +10 -0
- package/dist/locales/pt-BR/settingDrawer.d.ts +6 -0
- package/dist/locales/pt-BR/settingDrawer.js +50 -0
- package/dist/locales/pt-BR.d.ts +56 -0
- package/dist/locales/pt-BR.js +11 -0
- package/dist/locales/ro-RO/help.d.ts +6 -0
- package/dist/locales/ro-RO/help.js +4 -0
- package/dist/locales/ro-RO/multiTab.d.ts +6 -0
- package/dist/locales/ro-RO/multiTab.js +10 -0
- package/dist/locales/ro-RO/settingDrawer.d.ts +6 -0
- package/dist/locales/ro-RO/settingDrawer.js +50 -0
- package/dist/locales/ro-RO.d.ts +56 -0
- package/dist/locales/ro-RO.js +11 -0
- package/dist/locales/ru-RU/help.d.ts +6 -0
- package/dist/locales/ru-RU/help.js +4 -0
- package/dist/locales/ru-RU/multiTab.d.ts +6 -0
- package/dist/locales/ru-RU/multiTab.js +10 -0
- package/dist/locales/ru-RU/settingDrawer.d.ts +6 -0
- package/dist/locales/ru-RU/settingDrawer.js +50 -0
- package/dist/locales/ru-RU.d.ts +56 -0
- package/dist/locales/ru-RU.js +11 -0
- package/dist/locales/sk-SK/help.d.ts +6 -0
- package/dist/locales/sk-SK/help.js +4 -0
- package/dist/locales/sk-SK/multiTab.d.ts +6 -0
- package/dist/locales/sk-SK/multiTab.js +9 -0
- package/dist/locales/sk-SK/settingDrawer.d.ts +6 -0
- package/dist/locales/sk-SK/settingDrawer.js +50 -0
- package/dist/locales/sk-SK.d.ts +56 -0
- package/dist/locales/sk-SK.js +11 -0
- package/dist/locales/sr-RS/help.d.ts +6 -0
- package/dist/locales/sr-RS/help.js +4 -0
- package/dist/locales/sr-RS/multiTab.d.ts +6 -0
- package/dist/locales/sr-RS/multiTab.js +10 -0
- package/dist/locales/sr-RS/settingDrawer.d.ts +6 -0
- package/dist/locales/sr-RS/settingDrawer.js +50 -0
- package/dist/locales/sr-RS.d.ts +56 -0
- package/dist/locales/sr-RS.js +11 -0
- package/dist/locales/sv-SE/help.d.ts +6 -0
- package/dist/locales/sv-SE/help.js +4 -0
- package/dist/locales/sv-SE/multiTab.d.ts +6 -0
- package/dist/locales/sv-SE/multiTab.js +10 -0
- package/dist/locales/sv-SE/settingDrawer.d.ts +6 -0
- package/dist/locales/sv-SE/settingDrawer.js +50 -0
- package/dist/locales/sv-SE.d.ts +56 -0
- package/dist/locales/sv-SE.js +11 -0
- package/dist/locales/th-TH/help.d.ts +6 -0
- package/dist/locales/th-TH/help.js +4 -0
- package/dist/locales/th-TH/multiTab.d.ts +6 -0
- package/dist/locales/th-TH/multiTab.js +10 -0
- package/dist/locales/th-TH/settingDrawer.d.ts +6 -0
- package/dist/locales/th-TH/settingDrawer.js +50 -0
- package/dist/locales/th-TH.d.ts +56 -0
- package/dist/locales/th-TH.js +11 -0
- package/dist/locales/tr-TR/help.d.ts +6 -0
- package/dist/locales/tr-TR/help.js +4 -0
- package/dist/locales/tr-TR/multiTab.d.ts +6 -0
- package/dist/locales/tr-TR/multiTab.js +10 -0
- package/dist/locales/tr-TR/settingDrawer.d.ts +6 -0
- package/dist/locales/tr-TR/settingDrawer.js +50 -0
- package/dist/locales/tr-TR.d.ts +56 -0
- package/dist/locales/tr-TR.js +11 -0
- package/dist/locales/uk-UA/help.d.ts +6 -0
- package/dist/locales/uk-UA/help.js +4 -0
- package/dist/locales/uk-UA/multiTab.d.ts +6 -0
- package/dist/locales/uk-UA/multiTab.js +10 -0
- package/dist/locales/uk-UA/settingDrawer.d.ts +6 -0
- package/dist/locales/uk-UA/settingDrawer.js +50 -0
- package/dist/locales/uk-UA.d.ts +56 -0
- package/dist/locales/uk-UA.js +11 -0
- package/dist/locales/uz-UZ/help.d.ts +6 -0
- package/dist/locales/uz-UZ/help.js +4 -0
- package/dist/locales/uz-UZ/multiTab.d.ts +6 -0
- package/dist/locales/uz-UZ/multiTab.js +10 -0
- package/dist/locales/uz-UZ/settingDrawer.d.ts +6 -0
- package/dist/locales/uz-UZ/settingDrawer.js +50 -0
- package/dist/locales/uz-UZ.d.ts +56 -0
- package/dist/locales/uz-UZ.js +11 -0
- package/dist/locales/vi-VN/help.d.ts +6 -0
- package/dist/locales/vi-VN/help.js +4 -0
- package/dist/locales/vi-VN/multiTab.d.ts +6 -0
- package/dist/locales/vi-VN/multiTab.js +10 -0
- package/dist/locales/vi-VN/settingDrawer.d.ts +6 -0
- package/dist/locales/vi-VN/settingDrawer.js +50 -0
- package/dist/locales/vi-VN.d.ts +56 -0
- package/dist/locales/vi-VN.js +11 -0
- package/dist/locales/zh-CN/help.d.ts +8 -0
- package/dist/locales/zh-CN/help.js +4 -0
- package/dist/locales/zh-CN/multiTab.d.ts +19 -0
- package/dist/locales/zh-CN/multiTab.js +17 -0
- package/dist/locales/zh-CN/settingDrawer.d.ts +52 -0
- package/dist/locales/zh-CN/settingDrawer.js +50 -0
- package/dist/locales/zh-CN.d.ts +56 -0
- package/dist/locales/zh-CN.js +11 -0
- package/dist/locales/zh-HK/help.d.ts +6 -0
- package/dist/locales/zh-HK/help.js +4 -0
- package/dist/locales/zh-HK/multiTab.d.ts +6 -0
- package/dist/locales/zh-HK/multiTab.js +10 -0
- package/dist/locales/zh-HK/settingDrawer.d.ts +6 -0
- package/dist/locales/zh-HK/settingDrawer.js +50 -0
- package/dist/locales/zh-HK.d.ts +56 -0
- package/dist/locales/zh-HK.js +11 -0
- package/dist/locales/zh-TW/help.d.ts +6 -0
- package/dist/locales/zh-TW/help.js +4 -0
- package/dist/locales/zh-TW/multiTab.d.ts +6 -0
- package/dist/locales/zh-TW/multiTab.js +10 -0
- package/dist/locales/zh-TW/settingDrawer.d.ts +6 -0
- package/dist/locales/zh-TW/settingDrawer.js +50 -0
- package/dist/locales/zh-TW.d.ts +56 -0
- package/dist/locales/zh-TW.js +11 -0
- package/dist/pro-layout.esm.js +11423 -0
- package/dist/style/index.d.ts +30 -0
- package/dist/style/index.js +120 -0
- package/dist/typing.d.ts +63 -0
- package/dist/typing.js +1 -0
- package/dist/utils/getBreadcrumbProps.d.ts +34 -0
- package/dist/utils/getBreadcrumbProps.js +91 -0
- package/dist/utils/getMenuData.d.ts +13 -0
- package/dist/utils/getMenuData.js +19 -0
- package/dist/utils/index.d.ts +30 -0
- package/dist/utils/index.js +55 -0
- package/dist/utils/siderWidth.d.ts +29 -0
- package/dist/utils/siderWidth.js +20 -0
- package/dist/utils/useCurrentMenuLayoutProps.d.ts +10 -0
- package/dist/utils/useCurrentMenuLayoutProps.js +28 -0
- package/dist/utils/useProLayoutLocation.d.ts +8 -0
- package/dist/utils/useProLayoutLocation.js +14 -0
- package/dist/utils/useProLayoutRender.d.ts +25 -0
- package/dist/utils/useProLayoutRender.js +42 -0
- package/package.json +61 -3
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import * as _$vue from "vue";
|
|
2
|
+
import { ProAliasCssVarToken } from "@antdv-vue/pro-provider";
|
|
3
|
+
|
|
4
|
+
//#region src/style/index.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* 全局滚动条 CSS 变量。
|
|
7
|
+
* 业务可在任意祖先层覆盖这些变量来定制主内容区的滚动条外观。
|
|
8
|
+
* 侧边栏有独立的 `--pro-layout-sider-scrollbar-*` 系列。
|
|
9
|
+
*/
|
|
10
|
+
declare const proLayoutScrollbarVar: {
|
|
11
|
+
readonly thumb: "--pro-layout-scrollbar-thumb";
|
|
12
|
+
readonly thumbHover: "--pro-layout-scrollbar-thumb-hover";
|
|
13
|
+
readonly track: "--pro-layout-scrollbar-track";
|
|
14
|
+
readonly size: "--pro-layout-scrollbar-size";
|
|
15
|
+
readonly radius: "--pro-layout-scrollbar-radius";
|
|
16
|
+
};
|
|
17
|
+
declare function getLayoutScrollbar(): Record<string, unknown>;
|
|
18
|
+
/**
|
|
19
|
+
* ProLayout 全局 CSS 变量。
|
|
20
|
+
* 业务可通过 CSS 覆盖对应变量自行调整。
|
|
21
|
+
*/
|
|
22
|
+
declare const proLayoutVar: {
|
|
23
|
+
/** 顶栏 `top` + `contentWidth=Fixed` 时的内容区最大宽度 */readonly contentFixedMaxWidth: "--pro-layout-content-fixed-max-width"; /** Header 高度 */
|
|
24
|
+
readonly headerHeight: "--pro-layout-header-height"; /** fixed header 左侧偏移(跨组件几何同步用) */
|
|
25
|
+
readonly fixedHeaderStart: "--pro-layout-fixed-header-start";
|
|
26
|
+
};
|
|
27
|
+
interface ProLayoutToken extends ProAliasCssVarToken {}
|
|
28
|
+
declare const _default: (prefixCls: _$vue.Ref<string>, rootCls?: _$vue.Ref<string | undefined>) => readonly [_$vue.Ref<string, string>, _$vue.ComputedRef<string | undefined>];
|
|
29
|
+
//#endregion
|
|
30
|
+
export { ProLayoutToken, _default as default, getLayoutScrollbar, proLayoutScrollbarVar, proLayoutVar };
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import { useStyle } from "@antdv-vue/pro-provider";
|
|
2
|
+
import { mergeToken } from "@antdv-next/cssinjs";
|
|
3
|
+
//#region src/style/index.ts
|
|
4
|
+
/**
|
|
5
|
+
* 全局滚动条 CSS 变量。
|
|
6
|
+
* 业务可在任意祖先层覆盖这些变量来定制主内容区的滚动条外观。
|
|
7
|
+
* 侧边栏有独立的 `--pro-layout-sider-scrollbar-*` 系列。
|
|
8
|
+
*/
|
|
9
|
+
const proLayoutScrollbarVar = {
|
|
10
|
+
thumb: "--pro-layout-scrollbar-thumb",
|
|
11
|
+
thumbHover: "--pro-layout-scrollbar-thumb-hover",
|
|
12
|
+
track: "--pro-layout-scrollbar-track",
|
|
13
|
+
size: "--pro-layout-scrollbar-size",
|
|
14
|
+
radius: "--pro-layout-scrollbar-radius"
|
|
15
|
+
};
|
|
16
|
+
function sv(k) {
|
|
17
|
+
return `var(${proLayoutScrollbarVar[k]})`;
|
|
18
|
+
}
|
|
19
|
+
function getLayoutScrollbar() {
|
|
20
|
+
return {
|
|
21
|
+
scrollbarWidth: "thin",
|
|
22
|
+
scrollbarColor: "transparent transparent",
|
|
23
|
+
"&:hover": { scrollbarColor: `${sv("thumb")} transparent` },
|
|
24
|
+
"&::-webkit-scrollbar": {
|
|
25
|
+
width: sv("size"),
|
|
26
|
+
height: sv("size"),
|
|
27
|
+
backgroundColor: "transparent"
|
|
28
|
+
},
|
|
29
|
+
"&::-webkit-scrollbar-track": { backgroundColor: sv("track") },
|
|
30
|
+
"&::-webkit-scrollbar-thumb": {
|
|
31
|
+
backgroundColor: "transparent",
|
|
32
|
+
borderRadius: sv("radius"),
|
|
33
|
+
transition: "background-color 0.3s ease"
|
|
34
|
+
},
|
|
35
|
+
"&:hover::-webkit-scrollbar-thumb": { backgroundColor: sv("thumb") },
|
|
36
|
+
"&::-webkit-scrollbar-thumb:hover": { backgroundColor: sv("thumbHover") },
|
|
37
|
+
"@media (pointer: coarse)": {
|
|
38
|
+
scrollbarWidth: "none",
|
|
39
|
+
"&::-webkit-scrollbar": { display: "none" }
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* ProLayout 全局 CSS 变量。
|
|
45
|
+
* 业务可通过 CSS 覆盖对应变量自行调整。
|
|
46
|
+
*/
|
|
47
|
+
const proLayoutVar = {
|
|
48
|
+
/** 顶栏 `top` + `contentWidth=Fixed` 时的内容区最大宽度 */
|
|
49
|
+
contentFixedMaxWidth: "--pro-layout-content-fixed-max-width",
|
|
50
|
+
/** Header 高度 */
|
|
51
|
+
headerHeight: "--pro-layout-header-height",
|
|
52
|
+
/** fixed header 左侧偏移(跨组件几何同步用) */
|
|
53
|
+
fixedHeaderStart: "--pro-layout-fixed-header-start"
|
|
54
|
+
};
|
|
55
|
+
const genProLayoutStyle = (token) => {
|
|
56
|
+
const { componentCls } = token;
|
|
57
|
+
return { [componentCls]: {
|
|
58
|
+
[proLayoutVar.contentFixedMaxWidth]: 1152,
|
|
59
|
+
[proLayoutVar.headerHeight]: token.calc(token.proLayoutHeaderHeightLayoutHeader || 56).equal(),
|
|
60
|
+
[proLayoutScrollbarVar.thumb]: token.colorFill,
|
|
61
|
+
[proLayoutScrollbarVar.thumbHover]: token.colorFillSecondary,
|
|
62
|
+
[proLayoutScrollbarVar.track]: "transparent",
|
|
63
|
+
[proLayoutScrollbarVar.size]: 4,
|
|
64
|
+
[proLayoutScrollbarVar.radius]: token.borderRadiusSM,
|
|
65
|
+
"&-colorWeak": { filter: "invert(80%)" },
|
|
66
|
+
"&-realDark": { [`${token.antCls}-layout`]: { background: "#2a2c2c" } },
|
|
67
|
+
boxSizing: "border-box",
|
|
68
|
+
"*, *::before, *::after": { boxSizing: "border-box" },
|
|
69
|
+
[`&${token.antCls}-layout`]: {
|
|
70
|
+
display: "flex",
|
|
71
|
+
width: "100%",
|
|
72
|
+
height: "100%"
|
|
73
|
+
},
|
|
74
|
+
"&-bg-list": {
|
|
75
|
+
pointerEvents: "none",
|
|
76
|
+
position: "fixed",
|
|
77
|
+
overflow: "hidden",
|
|
78
|
+
insetBlockStart: 0,
|
|
79
|
+
insetInlineStart: 0,
|
|
80
|
+
zIndex: 0,
|
|
81
|
+
height: "100%",
|
|
82
|
+
width: "100%",
|
|
83
|
+
background: token?.proLayoutBgLayout
|
|
84
|
+
},
|
|
85
|
+
[`${token.componentCls}-content`]: {
|
|
86
|
+
display: "flex",
|
|
87
|
+
flexDirection: "column",
|
|
88
|
+
width: "100%",
|
|
89
|
+
backgroundColor: token.proLayoutPageContainerColorBgPageContainer || "transparent",
|
|
90
|
+
position: "relative",
|
|
91
|
+
paddingBlock: token.proLayoutPageContainerPaddingBlockPageContainerContent,
|
|
92
|
+
paddingInline: token.proLayoutPageContainerPaddingInlinePageContainerContent,
|
|
93
|
+
"&-has-page-container": { padding: 0 }
|
|
94
|
+
},
|
|
95
|
+
[`${token.componentCls}-container`]: {
|
|
96
|
+
width: "100%",
|
|
97
|
+
display: "flex",
|
|
98
|
+
flexDirection: "column",
|
|
99
|
+
minWidth: 0,
|
|
100
|
+
minHeight: 0,
|
|
101
|
+
backgroundColor: "transparent"
|
|
102
|
+
},
|
|
103
|
+
[`${token.componentCls}-wrap`]: {
|
|
104
|
+
display: "flex",
|
|
105
|
+
flexDirection: "column",
|
|
106
|
+
width: "100%"
|
|
107
|
+
},
|
|
108
|
+
"&&-fixed-header": { [`${token.componentCls}-container`]: {
|
|
109
|
+
height: "100vh",
|
|
110
|
+
overflowY: "auto",
|
|
111
|
+
overflowX: "hidden",
|
|
112
|
+
...getLayoutScrollbar()
|
|
113
|
+
} }
|
|
114
|
+
} };
|
|
115
|
+
};
|
|
116
|
+
var style_default = useStyle("ProLayout", (token) => {
|
|
117
|
+
return [genProLayoutStyle(mergeToken(token, {}))];
|
|
118
|
+
});
|
|
119
|
+
//#endregion
|
|
120
|
+
export { style_default as default, getLayoutScrollbar, proLayoutScrollbarVar, proLayoutVar };
|
package/dist/typing.d.ts
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { DefineSetupFnComponent } from "vue";
|
|
2
|
+
import { VueNode } from "antdv-next/dist/_util/type";
|
|
3
|
+
|
|
4
|
+
//#region src/typing.d.ts
|
|
5
|
+
type TargetType = '_blank' | '_self' | unknown;
|
|
6
|
+
interface MetaRecord {
|
|
7
|
+
/** @name hideChildrenInMenu 在菜单中隐藏子节点 */
|
|
8
|
+
hideChildrenInMenu?: boolean;
|
|
9
|
+
/** @name hideInMenu 在菜单中隐藏自己和子节点 */
|
|
10
|
+
hideInMenu?: boolean;
|
|
11
|
+
/** @name icon 菜单的icon */
|
|
12
|
+
icon?: VueNode | DefineSetupFnComponent<Record<string, any>>;
|
|
13
|
+
/** @name title 菜单的名字 */
|
|
14
|
+
title?: string;
|
|
15
|
+
/** @name locale 自定义菜单的国际化 key */
|
|
16
|
+
locale?: string | false;
|
|
17
|
+
/** @name flatMenu 隐藏自己,并且将子节点提升到与自己平级 */
|
|
18
|
+
flatMenu?: boolean;
|
|
19
|
+
/** @name target 指定外链打开形式,同a标签 */
|
|
20
|
+
target?: TargetType;
|
|
21
|
+
/**
|
|
22
|
+
* @name tooltip menuItem 的 tooltip 显示的路径
|
|
23
|
+
*/
|
|
24
|
+
tooltip?: string;
|
|
25
|
+
/**
|
|
26
|
+
* @name disable 菜单选项
|
|
27
|
+
*/
|
|
28
|
+
disabled?: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* @name disable menu 的 tooltip 菜单选项
|
|
31
|
+
*/
|
|
32
|
+
disabledTooltip?: boolean;
|
|
33
|
+
[key: string]: any;
|
|
34
|
+
}
|
|
35
|
+
interface MenuDataItem {
|
|
36
|
+
/** @name children 子菜单 */
|
|
37
|
+
children?: MenuDataItem[];
|
|
38
|
+
/** @name name 菜单的名字 */
|
|
39
|
+
name?: string | symbol;
|
|
40
|
+
/** @name meta 路由元信息 */
|
|
41
|
+
meta?: MetaRecord;
|
|
42
|
+
/** @name key 用于标定选中的值,默认是 path */
|
|
43
|
+
key?: string;
|
|
44
|
+
/** @name path 路径,可以设定为网页链接 */
|
|
45
|
+
path: string;
|
|
46
|
+
[key: string]: any;
|
|
47
|
+
}
|
|
48
|
+
interface RouterTypes {
|
|
49
|
+
route?: MenuDataItem;
|
|
50
|
+
/**
|
|
51
|
+
* Manually override current route location. ProLayout reads `$route` from the Vue app instance when a router plugin provides it.
|
|
52
|
+
*/
|
|
53
|
+
location?: {
|
|
54
|
+
path?: string;
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
interface MessageDescriptor {
|
|
58
|
+
id: any;
|
|
59
|
+
description?: string;
|
|
60
|
+
defaultMessage?: string;
|
|
61
|
+
}
|
|
62
|
+
//#endregion
|
|
63
|
+
export { MenuDataItem, MessageDescriptor, MetaRecord, RouterTypes, TargetType };
|
package/dist/typing.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { ProSettings } from "../defaultSettings.js";
|
|
2
|
+
import { MenuDataItem, MessageDescriptor } from "../typing.js";
|
|
3
|
+
import { ProLayoutProps } from "../ProLayout.js";
|
|
4
|
+
import { WithFalse } from "@antdv-vue/pro-utils";
|
|
5
|
+
import { BreadcrumbProps } from "antdv-next";
|
|
6
|
+
|
|
7
|
+
//#region src/utils/getBreadcrumbProps.d.ts
|
|
8
|
+
declare function getVersion(): any;
|
|
9
|
+
interface BreadcrumbProLayoutProps {
|
|
10
|
+
home?: string;
|
|
11
|
+
location?: {
|
|
12
|
+
path?: string;
|
|
13
|
+
};
|
|
14
|
+
menu?: ProSettings['menu'];
|
|
15
|
+
breadcrumbMap?: Map<string, MenuDataItem>;
|
|
16
|
+
formatMessage?: (message: MessageDescriptor) => string | undefined;
|
|
17
|
+
breadcrumbRender?: WithFalse<(routes: BreadcrumbProps['items']) => BreadcrumbProps['items']>;
|
|
18
|
+
itemRender?: BreadcrumbProps['itemRender'];
|
|
19
|
+
}
|
|
20
|
+
declare function urlToList(url?: string): string[];
|
|
21
|
+
declare function getBreadcrumb(breadcrumbMap: Map<string, MenuDataItem>, url: string): MenuDataItem;
|
|
22
|
+
declare function getBreadcrumbFromProps(props: BreadcrumbProLayoutProps): {
|
|
23
|
+
location: BreadcrumbProLayoutProps['location'];
|
|
24
|
+
breadcrumbMap: BreadcrumbProLayoutProps['breadcrumbMap'];
|
|
25
|
+
};
|
|
26
|
+
type BreadcrumbListReturn = Pick<BreadcrumbProps, Extract<keyof BreadcrumbProps, 'items' | 'itemRender'>>;
|
|
27
|
+
/** 将参数转化为面包屑 Convert parameters into breadcrumbs */
|
|
28
|
+
declare function genBreadcrumbProps(props: BreadcrumbProLayoutProps): BreadcrumbProps['items'];
|
|
29
|
+
declare function getBreadcrumbProps(props: Omit<BreadcrumbProLayoutProps, 'breadcrumbRender'> & {
|
|
30
|
+
breadcrumbRender?: WithFalse<(routes: BreadcrumbProps['items']) => BreadcrumbProps['items']>;
|
|
31
|
+
breadcrumbProps?: BreadcrumbProps;
|
|
32
|
+
}, layoutProps: ProLayoutProps): BreadcrumbListReturn;
|
|
33
|
+
//#endregion
|
|
34
|
+
export { BreadcrumbListReturn, BreadcrumbProLayoutProps, genBreadcrumbProps, getBreadcrumb, getBreadcrumbFromProps, getBreadcrumbProps, getVersion, urlToList };
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { createVNode, h, isVNode, resolveComponent } from "vue";
|
|
2
|
+
import { match } from "@antdv-vue/route-utils";
|
|
3
|
+
import { version } from "antdv-next";
|
|
4
|
+
//#region src/utils/getBreadcrumbProps.tsx
|
|
5
|
+
function getVersion() {
|
|
6
|
+
if (typeof process === "undefined" || typeof import.meta === "undefined") return version;
|
|
7
|
+
return process?.env?.ANTD_VERSION || import.meta.env?.ANTD_VERSION || version;
|
|
8
|
+
}
|
|
9
|
+
function urlToList(url) {
|
|
10
|
+
if (!url || url === "/") return ["/"];
|
|
11
|
+
const urlList = url.split("/").filter((i) => i);
|
|
12
|
+
return ["/"].concat(urlList.map((_, index) => `/${urlList.slice(0, index + 1).join("/")}`));
|
|
13
|
+
}
|
|
14
|
+
const defaultItemRender = (route, _, routes) => {
|
|
15
|
+
if (isVNode(route)) return route;
|
|
16
|
+
const { title, path, onClick } = route;
|
|
17
|
+
return routes.findIndex((i) => i.path === route.path) === routes.length - 1 ? createVNode("span", null, [title]) : onClick ? createVNode("span", {
|
|
18
|
+
"onClick": onClick,
|
|
19
|
+
"style": { cursor: "pointer" }
|
|
20
|
+
}, [title]) : h(resolveComponent("RouterLink"), { to: path }, () => title);
|
|
21
|
+
};
|
|
22
|
+
function renderItemLocal({ meta }, props) {
|
|
23
|
+
const { formatMessage, menu } = props;
|
|
24
|
+
if (meta?.locale && formatMessage && menu?.locale !== false) return formatMessage({
|
|
25
|
+
id: meta.locale,
|
|
26
|
+
defaultMessage: meta.title
|
|
27
|
+
});
|
|
28
|
+
return meta?.title;
|
|
29
|
+
}
|
|
30
|
+
function getBreadcrumb(breadcrumbMap, url) {
|
|
31
|
+
let breadcrumbItem = breadcrumbMap.get(url);
|
|
32
|
+
if (!breadcrumbItem) {
|
|
33
|
+
const targetPath = (Array.from(breadcrumbMap.keys()) || []).find((path) => {
|
|
34
|
+
try {
|
|
35
|
+
if (path?.startsWith("http")) return false;
|
|
36
|
+
return match(path.replace("?", ""))(url);
|
|
37
|
+
} catch (error) {
|
|
38
|
+
return false;
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
if (targetPath) breadcrumbItem = breadcrumbMap.get(targetPath);
|
|
42
|
+
}
|
|
43
|
+
return breadcrumbItem || { path: "" };
|
|
44
|
+
}
|
|
45
|
+
function getBreadcrumbFromProps(props) {
|
|
46
|
+
const { location, breadcrumbMap } = props;
|
|
47
|
+
return {
|
|
48
|
+
location,
|
|
49
|
+
breadcrumbMap
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
function conversionFromRoute(location, breadcrumbMap, props) {
|
|
53
|
+
return urlToList(location?.path).map((url) => {
|
|
54
|
+
const currentBreadcrumb = getBreadcrumb(breadcrumbMap, url);
|
|
55
|
+
const title = renderItemLocal(currentBreadcrumb, props);
|
|
56
|
+
const { meta } = currentBreadcrumb;
|
|
57
|
+
return title && !meta?.hideInBreadcrumb ? {
|
|
58
|
+
path: url,
|
|
59
|
+
title
|
|
60
|
+
} : {
|
|
61
|
+
path: "",
|
|
62
|
+
title
|
|
63
|
+
};
|
|
64
|
+
}).filter((item) => item && item.path);
|
|
65
|
+
}
|
|
66
|
+
/** 将参数转化为面包屑 Convert parameters into breadcrumbs */
|
|
67
|
+
function genBreadcrumbProps(props) {
|
|
68
|
+
const { location, breadcrumbMap } = getBreadcrumbFromProps(props);
|
|
69
|
+
if (location && location.path && breadcrumbMap) return conversionFromRoute(location, breadcrumbMap, props);
|
|
70
|
+
return [];
|
|
71
|
+
}
|
|
72
|
+
function getBreadcrumbProps(props, layoutProps) {
|
|
73
|
+
const { breadcrumbRender, itemRender: propsItemRender } = props;
|
|
74
|
+
const { minLength = 2 } = layoutProps.breadcrumbProps || {};
|
|
75
|
+
const routesArray = genBreadcrumbProps(props);
|
|
76
|
+
const itemRender = (route, ...rest) => {
|
|
77
|
+
return (propsItemRender || defaultItemRender)?.({
|
|
78
|
+
...route,
|
|
79
|
+
onClick: props.breadcrumbProps?.onClickItem ? (e) => props.breadcrumbProps?.onClickItem?.(route, e) : void 0
|
|
80
|
+
}, ...rest);
|
|
81
|
+
};
|
|
82
|
+
let items = routesArray;
|
|
83
|
+
if (breadcrumbRender) items = breadcrumbRender(items || []) || void 0;
|
|
84
|
+
if (items && items.length < minLength || breadcrumbRender === false) items = void 0;
|
|
85
|
+
return {
|
|
86
|
+
items,
|
|
87
|
+
itemRender
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
//#endregion
|
|
91
|
+
export { genBreadcrumbProps, getBreadcrumb, getBreadcrumbFromProps, getBreadcrumbProps, getVersion, urlToList };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { MenuDataItem, MessageDescriptor } from "../typing.js";
|
|
2
|
+
import * as _$_antdv_vue_route_utils0 from "@antdv-vue/route-utils";
|
|
3
|
+
|
|
4
|
+
//#region src/utils/getMenuData.d.ts
|
|
5
|
+
declare function getMenuData(routes: MenuDataItem[], menu?: {
|
|
6
|
+
locale?: boolean;
|
|
7
|
+
}, formatMessage?: (message: MessageDescriptor) => string | undefined, menuDataRender?: (menuData: MenuDataItem[]) => MenuDataItem[]): {
|
|
8
|
+
breadcrumb: Record<string, _$_antdv_vue_route_utils0.MenuDataItem>;
|
|
9
|
+
breadcrumbMap: Map<string, _$_antdv_vue_route_utils0.MenuDataItem>;
|
|
10
|
+
menuData: _$_antdv_vue_route_utils0.MenuDataItem[];
|
|
11
|
+
};
|
|
12
|
+
//#endregion
|
|
13
|
+
export { getMenuData };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { transformRoute } from "@antdv-vue/route-utils";
|
|
2
|
+
//#region src/utils/getMenuData.ts
|
|
3
|
+
function fromEntries(iterable) {
|
|
4
|
+
return [...iterable].reduce((obj, [key, val]) => {
|
|
5
|
+
obj[key] = val;
|
|
6
|
+
return obj;
|
|
7
|
+
}, {});
|
|
8
|
+
}
|
|
9
|
+
function getMenuData(routes, menu, formatMessage, menuDataRender) {
|
|
10
|
+
const { menuData, breadcrumb } = transformRoute(routes || [], menu?.locale || false, formatMessage);
|
|
11
|
+
if (!menuDataRender) return {
|
|
12
|
+
breadcrumb: fromEntries(breadcrumb),
|
|
13
|
+
breadcrumbMap: breadcrumb,
|
|
14
|
+
menuData
|
|
15
|
+
};
|
|
16
|
+
return getMenuData(menuDataRender(menuData), menu, formatMessage, void 0);
|
|
17
|
+
}
|
|
18
|
+
//#endregion
|
|
19
|
+
export { getMenuData };
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { MenuDataItem } from "../typing.js";
|
|
2
|
+
|
|
3
|
+
//#region src/utils/index.d.ts
|
|
4
|
+
declare function getOpenKeysFromMenuData(menuData?: MenuDataItem[]): string[];
|
|
5
|
+
declare const themeConfig: {
|
|
6
|
+
techBlue: string;
|
|
7
|
+
daybreak: string;
|
|
8
|
+
dust: string;
|
|
9
|
+
volcano: string;
|
|
10
|
+
sunset: string;
|
|
11
|
+
cyan: string;
|
|
12
|
+
green: string;
|
|
13
|
+
geekblue: string;
|
|
14
|
+
purple: string;
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* Daybreak-> #1890ff
|
|
18
|
+
*
|
|
19
|
+
* @param val
|
|
20
|
+
*/
|
|
21
|
+
declare function genStringToTheme(val?: keyof typeof themeConfig): string;
|
|
22
|
+
declare function clearMenuItem(menusData: MenuDataItem[]): MenuDataItem[];
|
|
23
|
+
/**
|
|
24
|
+
* Creates an object composed of the picked object properties.
|
|
25
|
+
* @param obj The source object
|
|
26
|
+
* @param paths The property paths to pick
|
|
27
|
+
*/
|
|
28
|
+
declare function pick<T, K extends keyof T>(obj: T, paths: K[]): Pick<T, K>;
|
|
29
|
+
//#endregion
|
|
30
|
+
export { clearMenuItem, genStringToTheme, getOpenKeysFromMenuData, pick, themeConfig };
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
//#region src/utils/index.ts
|
|
2
|
+
function getOpenKeysFromMenuData(menuData) {
|
|
3
|
+
return (menuData || []).reduce((pre, item) => {
|
|
4
|
+
if (item.key) pre.push(item.key);
|
|
5
|
+
if (item.children) return [...pre.concat(getOpenKeysFromMenuData(item.children) || [])];
|
|
6
|
+
return pre;
|
|
7
|
+
}, []);
|
|
8
|
+
}
|
|
9
|
+
const themeConfig = {
|
|
10
|
+
techBlue: "#1677FF",
|
|
11
|
+
daybreak: "#1890FF",
|
|
12
|
+
dust: "#F5222D",
|
|
13
|
+
volcano: "#FA541C",
|
|
14
|
+
sunset: "#FAAD14",
|
|
15
|
+
cyan: "#13C2C2",
|
|
16
|
+
green: "#52C41A",
|
|
17
|
+
geekblue: "#2F54EB",
|
|
18
|
+
purple: "#722ED1"
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* Daybreak-> #1890ff
|
|
22
|
+
*
|
|
23
|
+
* @param val
|
|
24
|
+
*/
|
|
25
|
+
function genStringToTheme(val) {
|
|
26
|
+
return val && themeConfig[val] ? themeConfig[val] : val || "";
|
|
27
|
+
}
|
|
28
|
+
function clearMenuItem(menusData) {
|
|
29
|
+
return menusData.map((item) => {
|
|
30
|
+
const children = item.children || [];
|
|
31
|
+
const finalItem = { ...item };
|
|
32
|
+
if (!finalItem.meta?.title || finalItem.meta?.hideInMenu) return null;
|
|
33
|
+
if (finalItem && finalItem?.children) {
|
|
34
|
+
if (!finalItem.meta?.hideChildrenInMenu && children.some((child) => child.meta?.title && !child.meta?.hideInMenu)) return {
|
|
35
|
+
...item,
|
|
36
|
+
children: clearMenuItem(children)
|
|
37
|
+
};
|
|
38
|
+
Reflect.deleteProperty(finalItem, "children");
|
|
39
|
+
}
|
|
40
|
+
return finalItem;
|
|
41
|
+
}).filter((item) => item);
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Creates an object composed of the picked object properties.
|
|
45
|
+
* @param obj The source object
|
|
46
|
+
* @param paths The property paths to pick
|
|
47
|
+
*/
|
|
48
|
+
function pick(obj, paths) {
|
|
49
|
+
return { ...paths.reduce((mem, key) => ({
|
|
50
|
+
...mem,
|
|
51
|
+
[key]: obj[key]
|
|
52
|
+
}), {}) };
|
|
53
|
+
}
|
|
54
|
+
//#endregion
|
|
55
|
+
export { clearMenuItem, genStringToTheme, getOpenKeysFromMenuData, pick, themeConfig };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
//#region src/utils/siderWidth.d.ts
|
|
2
|
+
type SiderLayout = 'side' | 'top' | 'mix' | 'left' | undefined;
|
|
3
|
+
interface SiderWidthOptions {
|
|
4
|
+
layout: SiderLayout;
|
|
5
|
+
siderWidth: number;
|
|
6
|
+
collapsedWidth: number;
|
|
7
|
+
firstMenuWidth: number;
|
|
8
|
+
}
|
|
9
|
+
declare function getCollapsedSiderWidth({
|
|
10
|
+
layout,
|
|
11
|
+
siderWidth,
|
|
12
|
+
collapsedWidth,
|
|
13
|
+
firstMenuWidth
|
|
14
|
+
}: SiderWidthOptions): number;
|
|
15
|
+
declare function getSiderMenuWidth({
|
|
16
|
+
collapsed,
|
|
17
|
+
hasMenu,
|
|
18
|
+
...options
|
|
19
|
+
}: SiderWidthOptions & {
|
|
20
|
+
collapsed?: boolean;
|
|
21
|
+
hasMenu?: boolean;
|
|
22
|
+
}): number;
|
|
23
|
+
declare function getLeftSecondarySiderCollapsedWidth({
|
|
24
|
+
siderWidth,
|
|
25
|
+
collapsedWidth,
|
|
26
|
+
firstMenuWidth
|
|
27
|
+
}: Omit<SiderWidthOptions, 'layout'>): number;
|
|
28
|
+
//#endregion
|
|
29
|
+
export { SiderLayout, SiderWidthOptions, getCollapsedSiderWidth, getLeftSecondarySiderCollapsedWidth, getSiderMenuWidth };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
//#region src/utils/siderWidth.ts
|
|
2
|
+
function getCollapsedSiderWidth({ layout, siderWidth, collapsedWidth, firstMenuWidth }) {
|
|
3
|
+
if (layout === "left") return Math.min(siderWidth, collapsedWidth + firstMenuWidth);
|
|
4
|
+
return collapsedWidth;
|
|
5
|
+
}
|
|
6
|
+
function getSiderMenuWidth({ collapsed, hasMenu = true, ...options }) {
|
|
7
|
+
if (options.layout === "left" && !hasMenu) return options.firstMenuWidth;
|
|
8
|
+
if (collapsed) return getCollapsedSiderWidth(options);
|
|
9
|
+
return options.siderWidth;
|
|
10
|
+
}
|
|
11
|
+
function getLeftSecondarySiderCollapsedWidth({ siderWidth, collapsedWidth, firstMenuWidth }) {
|
|
12
|
+
return Math.max(0, getCollapsedSiderWidth({
|
|
13
|
+
layout: "left",
|
|
14
|
+
siderWidth,
|
|
15
|
+
collapsedWidth,
|
|
16
|
+
firstMenuWidth
|
|
17
|
+
}) - firstMenuWidth);
|
|
18
|
+
}
|
|
19
|
+
//#endregion
|
|
20
|
+
export { getCollapsedSiderWidth, getLeftSecondarySiderCollapsedWidth, getSiderMenuWidth };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ProSettings } from "../defaultSettings.js";
|
|
2
|
+
import { MenuDataItem } from "../typing.js";
|
|
3
|
+
import { Ref } from "vue";
|
|
4
|
+
|
|
5
|
+
//#region src/utils/useCurrentMenuLayoutProps.d.ts
|
|
6
|
+
declare function useCurrentMenuLayoutProps(currentMenu: Ref<MenuDataItem & {
|
|
7
|
+
meta: Pick<MenuDataItem, 'meta'> & ProSettings;
|
|
8
|
+
}>): Ref<Pick<ProSettings, "navTheme" | "layout" | "fixedSiderbar" | "menuHeaderRender" | "headerRender" | "menuRender" | "footerRender">, Pick<ProSettings, "navTheme" | "layout" | "fixedSiderbar" | "menuHeaderRender" | "headerRender" | "menuRender" | "footerRender">>;
|
|
9
|
+
//#endregion
|
|
10
|
+
export { useCurrentMenuLayoutProps as default };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { omitUndefined, useEffect, useState } from "@antdv-vue/pro-utils";
|
|
2
|
+
//#region src/utils/useCurrentMenuLayoutProps.ts
|
|
3
|
+
function useCurrentMenuLayoutProps(currentMenu) {
|
|
4
|
+
const [currentMenuLayoutProps, setCurrentMenuLayoutProps] = useState({});
|
|
5
|
+
useEffect(() => {
|
|
6
|
+
const menuLayoutProps = omitUndefined({
|
|
7
|
+
layout: typeof (currentMenu.value.meta || {}).layout !== "object" ? (currentMenu.value.meta || {}).layout : void 0,
|
|
8
|
+
navTheme: (currentMenu.value.meta || {}).navTheme,
|
|
9
|
+
menuRender: (currentMenu.value.meta || {}).menuRender,
|
|
10
|
+
footerRender: (currentMenu.value.meta || {}).footerRender,
|
|
11
|
+
menuHeaderRender: (currentMenu.value.meta || {}).menuHeaderRender,
|
|
12
|
+
headerRender: (currentMenu.value.meta || {}).headerRender,
|
|
13
|
+
fixedSiderbar: (currentMenu.value.meta || {}).fixedSiderbar
|
|
14
|
+
});
|
|
15
|
+
if (menuLayoutProps) setCurrentMenuLayoutProps(menuLayoutProps);
|
|
16
|
+
}, [
|
|
17
|
+
() => (currentMenu.value.meta || {})?.layout,
|
|
18
|
+
() => (currentMenu.value.meta || {})?.navTheme,
|
|
19
|
+
() => (currentMenu.value.meta || {})?.menuRender,
|
|
20
|
+
() => (currentMenu.value.meta || {})?.footerRender,
|
|
21
|
+
() => (currentMenu.value.meta || {})?.menuHeaderRender,
|
|
22
|
+
() => (currentMenu.value.meta || {})?.headerRender,
|
|
23
|
+
() => (currentMenu.value.meta || {})?.fixedSiderbar
|
|
24
|
+
]);
|
|
25
|
+
return currentMenuLayoutProps;
|
|
26
|
+
}
|
|
27
|
+
//#endregion
|
|
28
|
+
export { useCurrentMenuLayoutProps as default };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { RouterTypes } from "../typing.js";
|
|
2
|
+
import { ComputedRef } from "vue";
|
|
3
|
+
|
|
4
|
+
//#region src/utils/useProLayoutLocation.d.ts
|
|
5
|
+
type ProLayoutLocation = NonNullable<RouterTypes['location']>;
|
|
6
|
+
declare function useProLayoutLocation(getLocation: () => RouterTypes['location'] | undefined): ComputedRef<ProLayoutLocation>;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { useProLayoutLocation };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { computed, getCurrentInstance } from "vue";
|
|
2
|
+
//#region src/utils/useProLayoutLocation.ts
|
|
3
|
+
function useProLayoutLocation(getLocation) {
|
|
4
|
+
const instance = getCurrentInstance();
|
|
5
|
+
return computed(() => {
|
|
6
|
+
const location = getLocation();
|
|
7
|
+
if (location?.path) return location;
|
|
8
|
+
const proxyRoute = (instance?.proxy)?.$route;
|
|
9
|
+
const globalRoute = (instance?.appContext.config.globalProperties).$route;
|
|
10
|
+
return { path: (proxyRoute || globalRoute)?.path || "/" };
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
//#endregion
|
|
14
|
+
export { useProLayoutLocation };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { ProLayoutProps } from "../ProLayout.js";
|
|
2
|
+
import { ActionsRender, AppListRender, CollapsedButtonRender, ErrorBoundaryRender, FooterRender, HeaderContentRender, HeaderRender, HeaderTitleRender, MenuContentRender, MenuExtraRender, MenuFooterRender, MenuHeaderRender, MenuItemRender, MenuRender, MultiTabRender, SlotsRenderType, SubMenuItemRender } from "../RenderTypings.js";
|
|
3
|
+
import * as _$vue from "vue";
|
|
4
|
+
|
|
5
|
+
//#region src/utils/useProLayoutRender.d.ts
|
|
6
|
+
declare function useProLayoutRender(slots: SlotsRenderType, props: ProLayoutProps): _$vue.ComputedRef<{
|
|
7
|
+
headerRender: false | HeaderRender | undefined;
|
|
8
|
+
footerRender: false | FooterRender | undefined;
|
|
9
|
+
menuRender: false | MenuRender | undefined;
|
|
10
|
+
menuHeaderRender: false | MenuHeaderRender | undefined;
|
|
11
|
+
menuItemRender: false | MenuItemRender | undefined;
|
|
12
|
+
subMenuItemRender: false | SubMenuItemRender | undefined;
|
|
13
|
+
menuExtraRender: false | MenuExtraRender | undefined;
|
|
14
|
+
menuContentRender: false | MenuContentRender | undefined;
|
|
15
|
+
headerContentRender: false | HeaderContentRender | undefined;
|
|
16
|
+
headerTitleRender: false | HeaderTitleRender | undefined;
|
|
17
|
+
appListRender: false | AppListRender | undefined;
|
|
18
|
+
actionsRender: false | ActionsRender | undefined;
|
|
19
|
+
collapsedButtonRender: false | CollapsedButtonRender | undefined;
|
|
20
|
+
errorBoundaryRender: false | ErrorBoundaryRender | undefined;
|
|
21
|
+
menuFooterRender: false | MenuFooterRender | undefined;
|
|
22
|
+
multiTabRender: false | MultiTabRender | undefined;
|
|
23
|
+
}>;
|
|
24
|
+
//#endregion
|
|
25
|
+
export { useProLayoutRender };
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { computed } from "vue";
|
|
2
|
+
import { getSlot } from "@antdv-vue/pro-utils";
|
|
3
|
+
//#region src/utils/useProLayoutRender.ts
|
|
4
|
+
function useProLayoutRender(slots, props) {
|
|
5
|
+
return computed(() => {
|
|
6
|
+
const footerRender = getSlot(slots, props, "footerRender");
|
|
7
|
+
const actionsRender = getSlot(slots, props, "actionsRender");
|
|
8
|
+
const collapsedButtonRender = getSlot(slots, props, "collapsedButtonRender");
|
|
9
|
+
const appListRender = getSlot(slots, props, "appListRender");
|
|
10
|
+
const headerRender = getSlot(slots, props, "headerRender");
|
|
11
|
+
const headerTitleRender = getSlot(slots, props, "headerTitleRender");
|
|
12
|
+
const headerContentRender = getSlot(slots, props, "headerContentRender");
|
|
13
|
+
const menuRender = getSlot(slots, props, "menuRender");
|
|
14
|
+
const menuItemRender = getSlot(slots, props, "menuItemRender");
|
|
15
|
+
const subMenuItemRender = getSlot(slots, props, "subMenuItemRender");
|
|
16
|
+
const menuHeaderRender = getSlot(slots, props, "menuHeaderRender");
|
|
17
|
+
const menuContentRender = getSlot(slots, props, "menuContentRender");
|
|
18
|
+
const menuExtraRender = getSlot(slots, props, "menuExtraRender");
|
|
19
|
+
const menuFooterRender = getSlot(slots, props, "menuFooterRender");
|
|
20
|
+
const multiTabRender = getSlot(slots, props, "multiTabRender");
|
|
21
|
+
return {
|
|
22
|
+
headerRender,
|
|
23
|
+
footerRender,
|
|
24
|
+
menuRender,
|
|
25
|
+
menuHeaderRender,
|
|
26
|
+
menuItemRender,
|
|
27
|
+
subMenuItemRender,
|
|
28
|
+
menuExtraRender,
|
|
29
|
+
menuContentRender,
|
|
30
|
+
headerContentRender,
|
|
31
|
+
headerTitleRender,
|
|
32
|
+
appListRender,
|
|
33
|
+
actionsRender,
|
|
34
|
+
collapsedButtonRender,
|
|
35
|
+
errorBoundaryRender: getSlot(slots, props, "errorBoundaryRender"),
|
|
36
|
+
menuFooterRender,
|
|
37
|
+
multiTabRender
|
|
38
|
+
};
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
//#endregion
|
|
42
|
+
export { useProLayoutRender };
|