@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,206 @@
|
|
|
1
|
+
import { InjectionKey, Ref } from "vue";
|
|
2
|
+
import { VueNode } from "@v-c/util";
|
|
3
|
+
import { ImageProps } from "antdv-next";
|
|
4
|
+
import { Key } from "@v-c/util/dist/type";
|
|
5
|
+
import { LinkProps } from "antdv-next/dist/typography/Link";
|
|
6
|
+
|
|
7
|
+
//#region src/components/Help/HelpProvide.d.ts
|
|
8
|
+
/**
|
|
9
|
+
* ProHelp 数据源子项内容类型。
|
|
10
|
+
* 该类型定义了多种数据源子项内容类型,例如 h1、h2、link、text、image等。
|
|
11
|
+
* 其中,link 和 inlineLink 属性都是链接类型的数据源子项内容,不同的是 inlineLink 是内联链接,而 link 是块级链接。
|
|
12
|
+
*
|
|
13
|
+
* @typedef {object} ProHelpDataSourceContentType
|
|
14
|
+
* @property {string} h1 标题1类型的数据源子项内容。
|
|
15
|
+
* @property {string} h2 标题2类型的数据源子项内容。
|
|
16
|
+
* @property {{ children: string } & React.AnchorHTMLAttributes<HTMLAnchorElement>} link 链接类型的数据源子项内容。
|
|
17
|
+
* @property {{ children: string } & React.AnchorHTMLAttributes<HTMLAnchorElement>} inlineLink 内联链接类型的数据源子项内容。
|
|
18
|
+
* @property {string} text 文本类型的数据源子项内容。
|
|
19
|
+
* @property {ImageProps} image 图片类型的数据源子项内容。
|
|
20
|
+
*/
|
|
21
|
+
interface ProHelpDataSourceContentType {
|
|
22
|
+
/**
|
|
23
|
+
* h1 标题1类型的数据源子项内容。
|
|
24
|
+
*/
|
|
25
|
+
h1: string;
|
|
26
|
+
/**
|
|
27
|
+
* h2 标题1类型的数据源子项内容。
|
|
28
|
+
*/
|
|
29
|
+
h2: string;
|
|
30
|
+
/**
|
|
31
|
+
* link 链接类型的数据源子项内容。
|
|
32
|
+
*/
|
|
33
|
+
link: {
|
|
34
|
+
children: string;
|
|
35
|
+
} & LinkProps;
|
|
36
|
+
/**
|
|
37
|
+
* 行内链接类型的数据源子项内容。
|
|
38
|
+
*/
|
|
39
|
+
inlineLink: LinkProps & {
|
|
40
|
+
children: string;
|
|
41
|
+
};
|
|
42
|
+
/**
|
|
43
|
+
* navigation 类型链接,或切换菜单
|
|
44
|
+
*/
|
|
45
|
+
navigationSwitch: {
|
|
46
|
+
selectKey: string;
|
|
47
|
+
children: string;
|
|
48
|
+
};
|
|
49
|
+
/**
|
|
50
|
+
* text 文本类型的数据源子项内容。
|
|
51
|
+
*/
|
|
52
|
+
text: string;
|
|
53
|
+
/**
|
|
54
|
+
* image 图片类型的数据源子项内容。
|
|
55
|
+
*/
|
|
56
|
+
image: ImageProps;
|
|
57
|
+
/**
|
|
58
|
+
* markdown 类型的渲染,支持 基本的 markdown 语法
|
|
59
|
+
* 会包在一个叫 inner-html 为 markdown 的 div 中
|
|
60
|
+
*/
|
|
61
|
+
html: {
|
|
62
|
+
class: string;
|
|
63
|
+
children: string;
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* ProHelp 数据源子项内容类型的类型,可能的取值为 "h1"、"h2"、"link"、"inlineLink"、"text" 和 "image"。
|
|
68
|
+
* @typedef {'h1' | 'h2' | 'link' | 'inlineLink' | 'text' | 'image'} ProHelpDataSourceChildrenType
|
|
69
|
+
*/
|
|
70
|
+
type ProHelpDataSourceChildrenType = Extract<keyof ProHelpDataSourceContentType, any>;
|
|
71
|
+
/**
|
|
72
|
+
* ProHelp 数据源子项内容属性类型。
|
|
73
|
+
* @template ValueType 数据源项值的类型,默认为 'text'。
|
|
74
|
+
* 该类型定义了一个名为 children 的对象属性,根据 valueType 属性的值来确定该属性对象的具体类型,
|
|
75
|
+
* 如果 valueType 的类型是 ProHelpDataSourceChildrenType,
|
|
76
|
+
* 则使用 ProHelpDataSourceContentType 中 ProHelpDataSourceChildrenType 所对应的属性类型;
|
|
77
|
+
* 否则,使用 ProHelpDataSourceContentType 中 ValueType 所对应的属性类型。
|
|
78
|
+
*/
|
|
79
|
+
type ProHelpDataSourceContentProps<ValueTypeMap, ValueType> = ValueType extends ProHelpDataSourceChildrenType ? ProHelpDataSourceContentType[ValueType] : ValueType extends keyof ValueTypeMap ? ValueTypeMap[ValueType] : ProHelpDataSourceContentType[ProHelpDataSourceChildrenType];
|
|
80
|
+
/**
|
|
81
|
+
* ProHelp 数据源子项类型。
|
|
82
|
+
* @template ValueTypeMap 数据源项值的类型,默认为 'text'。
|
|
83
|
+
* @property {(ValueType | ProHelpDataSourceChildrenType)} valueType 数据源子项值的类型,可以为指定的类型,也可以是自定义类型。
|
|
84
|
+
* @property {ProHelpDataSourceContentProps<ValueType>} children 包含数据源子项内容的对象。
|
|
85
|
+
*/
|
|
86
|
+
interface ProHelpDataSourceChildren<ValueTypeMap = {
|
|
87
|
+
text: string;
|
|
88
|
+
}> {
|
|
89
|
+
/**
|
|
90
|
+
* 包含数据源子项内容的对象。
|
|
91
|
+
* @template ValueType 数据源项值的类型,默认为 'text'。
|
|
92
|
+
*/
|
|
93
|
+
valueType: ValueTypeMap extends Map<infer ValueType, any> ? ValueType : keyof ValueTypeMap | ProHelpDataSourceChildrenType;
|
|
94
|
+
/**
|
|
95
|
+
* 数据源子项值的类型。
|
|
96
|
+
* @typedef {(ValueTypeMap | ProHelpDataSourceChildrenType)} ProHelpDataSourceChildrenType
|
|
97
|
+
*/
|
|
98
|
+
children: ProHelpDataSourceContentProps<ValueTypeMap, keyof ValueTypeMap | ProHelpDataSourceChildrenType>;
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* ProHelp 数据源类型。
|
|
102
|
+
* @template ValueType 数据源项值的类型,默认为 'text'。
|
|
103
|
+
* @property {string} key 数据源项的唯一标识。
|
|
104
|
+
* @property {string} title 数据源项的标题。
|
|
105
|
+
* @property children 包含子项的数组,每个子项包含一个唯一标识,标题以及子子项数组。
|
|
106
|
+
*/
|
|
107
|
+
interface ProHelpDataSource<ValueType = 'text'> {
|
|
108
|
+
/**
|
|
109
|
+
* key 数据源项的唯一标识
|
|
110
|
+
*/
|
|
111
|
+
key: string;
|
|
112
|
+
/**
|
|
113
|
+
* title 数据源项的标题。
|
|
114
|
+
*/
|
|
115
|
+
title: string;
|
|
116
|
+
/**
|
|
117
|
+
* 在一页内加载所有的 children 内容
|
|
118
|
+
*/
|
|
119
|
+
infiniteScrollFull?: boolean;
|
|
120
|
+
/**
|
|
121
|
+
* children 包含子项的数组,每个子项包含一个唯一标识,标题以及子子项数组。
|
|
122
|
+
*/
|
|
123
|
+
children: {
|
|
124
|
+
key: string;
|
|
125
|
+
title: string;
|
|
126
|
+
/**
|
|
127
|
+
* 是否远程加载children
|
|
128
|
+
*/
|
|
129
|
+
asyncLoad?: boolean;
|
|
130
|
+
children?: ProHelpDataSourceChildren<ValueType>[];
|
|
131
|
+
}[];
|
|
132
|
+
}
|
|
133
|
+
interface ProHelpContextType {
|
|
134
|
+
/**
|
|
135
|
+
* 帮助文档的数据源,包含一组帮助文档数据,每个数据包含标题和内容等信息。
|
|
136
|
+
*/
|
|
137
|
+
dataSource: ProHelpDataSource<any>[];
|
|
138
|
+
/**
|
|
139
|
+
* 帮助组件的子组件,用于渲染自定义的帮助内容。
|
|
140
|
+
* 是一个键值对结构的集合,其中:
|
|
141
|
+
* 键(key)为字符串类型;
|
|
142
|
+
* 值(value)为一个函数类型,该函数接受两个参数:一个名为 item 的 ProHelpDataSourceChildren 类型的对象,表示一个 ProHelp 数据源子项的子项;
|
|
143
|
+
* 一个名为 index 的数字类型参数,表示该子项在父级子项数组中的索引。
|
|
144
|
+
* 该函数返回一个 ReactNode 类型的元素,用于表示该 ProHelp 数据源子项子项应该渲染的 UI 元素。
|
|
145
|
+
* 这个 Map 的作用是将 ProHelp 数据源子项子项的 valueType 属性与对应的渲染函数进行映射,从而实现在渲染 ProHelp 数据源时动态地选择渲染方法。
|
|
146
|
+
* 在实际使用时,我们可以通过判断子项的 valueType 属性,从 valueTypeMap 中取出对应的渲染函数,再将该子项和渲染函数作为参数传入 renderDataSourceItem 函数中即可。
|
|
147
|
+
*/
|
|
148
|
+
valueTypeMap: Map<string, (item: ProHelpDataSourceChildren<any>, index: number) => VueNode>;
|
|
149
|
+
/**
|
|
150
|
+
* 加载数据源的函数,如果把数据源设置为 async load就可以使用这个功能。
|
|
151
|
+
*/
|
|
152
|
+
onLoadContext?: (key: Key, context: ProHelpDataSource<any>['children'][number]) => Promise<ProHelpDataSourceChildren<any>[]>;
|
|
153
|
+
}
|
|
154
|
+
/**
|
|
155
|
+
* 这段代码定义了一个名为 ProHelpProvide 的 Vue 上下文对象,并且指定了该上下文对象的初始值为 { dataSource: [] }。
|
|
156
|
+
* 这个上下文对象中包含了一个名为 dataSource 的属性,该属性的值是一个数组,类型为 ProHelpDataSource<any>[]。
|
|
157
|
+
* 该上下文对象通常用于在 Vue 组件树中共享数据,即可以通过在组件中使用 useProHelpProvider,
|
|
158
|
+
* 将 dataSource 和 valueTypeMap 数据源传递给这些组件,这些组件即可从上下文中获取 dataSource 数据源,实现数据的共享和传递。
|
|
159
|
+
*/
|
|
160
|
+
declare const proHelpContextKey: InjectionKey<Ref<ProHelpContextType>>;
|
|
161
|
+
declare function useProHelpProvider(props: Ref<ProHelpContextType>): void;
|
|
162
|
+
declare function useProHelpContext(): Ref<{
|
|
163
|
+
dataSource: {
|
|
164
|
+
key: string;
|
|
165
|
+
title: string;
|
|
166
|
+
infiniteScrollFull?: boolean
|
|
167
|
+
/**
|
|
168
|
+
* children 包含子项的数组,每个子项包含一个唯一标识,标题以及子子项数组。
|
|
169
|
+
*/
|
|
170
|
+
| undefined;
|
|
171
|
+
children: {
|
|
172
|
+
key: string;
|
|
173
|
+
title: string;
|
|
174
|
+
asyncLoad?: boolean | undefined;
|
|
175
|
+
children?: {
|
|
176
|
+
valueType: unknown;
|
|
177
|
+
children: any;
|
|
178
|
+
}[] | undefined;
|
|
179
|
+
}[];
|
|
180
|
+
}[];
|
|
181
|
+
valueTypeMap: Map<string, (item: ProHelpDataSourceChildren<any>, index: number) => VueNode> & Omit<Map<string, (item: ProHelpDataSourceChildren<any>, index: number) => VueNode>, keyof Map<any, any>>;
|
|
182
|
+
onLoadContext?: ((key: Key, context: ProHelpDataSource<any>["children"][number]) => Promise<ProHelpDataSourceChildren<any>[]>) | undefined;
|
|
183
|
+
}, ProHelpContextType | {
|
|
184
|
+
dataSource: {
|
|
185
|
+
key: string;
|
|
186
|
+
title: string;
|
|
187
|
+
infiniteScrollFull?: boolean
|
|
188
|
+
/**
|
|
189
|
+
* children 包含子项的数组,每个子项包含一个唯一标识,标题以及子子项数组。
|
|
190
|
+
*/
|
|
191
|
+
| undefined;
|
|
192
|
+
children: {
|
|
193
|
+
key: string;
|
|
194
|
+
title: string;
|
|
195
|
+
asyncLoad?: boolean | undefined;
|
|
196
|
+
children?: {
|
|
197
|
+
valueType: unknown;
|
|
198
|
+
children: any;
|
|
199
|
+
}[] | undefined;
|
|
200
|
+
}[];
|
|
201
|
+
}[];
|
|
202
|
+
valueTypeMap: Map<string, (item: ProHelpDataSourceChildren<any>, index: number) => VueNode> & Omit<Map<string, (item: ProHelpDataSourceChildren<any>, index: number) => VueNode>, keyof Map<any, any>>;
|
|
203
|
+
onLoadContext?: ((key: Key, context: ProHelpDataSource<any>["children"][number]) => Promise<ProHelpDataSourceChildren<any>[]>) | undefined;
|
|
204
|
+
}>;
|
|
205
|
+
//#endregion
|
|
206
|
+
export { ProHelpContextType, ProHelpDataSource, ProHelpDataSourceChildren, proHelpContextKey, useProHelpContext, useProHelpProvider };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { inject, provide, ref } from "vue";
|
|
2
|
+
//#region src/components/Help/HelpProvide.ts
|
|
3
|
+
/**
|
|
4
|
+
* 这段代码定义了一个名为 ProHelpProvide 的 Vue 上下文对象,并且指定了该上下文对象的初始值为 { dataSource: [] }。
|
|
5
|
+
* 这个上下文对象中包含了一个名为 dataSource 的属性,该属性的值是一个数组,类型为 ProHelpDataSource<any>[]。
|
|
6
|
+
* 该上下文对象通常用于在 Vue 组件树中共享数据,即可以通过在组件中使用 useProHelpProvider,
|
|
7
|
+
* 将 dataSource 和 valueTypeMap 数据源传递给这些组件,这些组件即可从上下文中获取 dataSource 数据源,实现数据的共享和传递。
|
|
8
|
+
*/
|
|
9
|
+
const proHelpContextKey = Symbol("proHelpContext");
|
|
10
|
+
function useProHelpProvider(props) {
|
|
11
|
+
return provide(proHelpContextKey, props);
|
|
12
|
+
}
|
|
13
|
+
function useProHelpContext() {
|
|
14
|
+
return inject(proHelpContextKey, ref({
|
|
15
|
+
dataSource: [],
|
|
16
|
+
valueTypeMap: /* @__PURE__ */ new Map()
|
|
17
|
+
}));
|
|
18
|
+
}
|
|
19
|
+
//#endregion
|
|
20
|
+
export { proHelpContextKey, useProHelpContext, useProHelpProvider };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ProHelpDataSource } from "./HelpProvide.js";
|
|
2
|
+
import * as _$vue from "vue";
|
|
3
|
+
|
|
4
|
+
//#region src/components/Help/ProHelpContentPanel.d.ts
|
|
5
|
+
interface ProHelpContentPanelProps {
|
|
6
|
+
/**
|
|
7
|
+
* 控制当前选中的帮助文档
|
|
8
|
+
*/
|
|
9
|
+
selectedKey?: string;
|
|
10
|
+
parentItem?: ProHelpDataSource;
|
|
11
|
+
onScroll?: (key?: string) => void;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* 控制具体的帮助文档显示组件
|
|
15
|
+
* selectedKey 来展示对应的内容。它会根据不同的item.valueType值来展示不同的内容,包括标题、图片、超链接等。
|
|
16
|
+
*/
|
|
17
|
+
declare const ProHelpContentPanel: _$vue.DefineSetupFnComponent<ProHelpContentPanelProps, {}, {}, ProHelpContentPanelProps & {}, _$vue.PublicProps>;
|
|
18
|
+
//#endregion
|
|
19
|
+
export { ProHelpContentPanelProps, ProHelpContentPanel as default };
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import { useProHelpContext } from "./HelpProvide.js";
|
|
2
|
+
import RenderContentPanel from "./RenderContentPanel.js";
|
|
3
|
+
import AsyncContentPanel from "./AsyncContentPanel.js";
|
|
4
|
+
import { Fragment, computed, createVNode, defineComponent, ref, shallowRef } from "vue";
|
|
5
|
+
import { useProConfig } from "@antdv-vue/pro-provider";
|
|
6
|
+
import { useDebounceFn, useEffect } from "@antdv-vue/pro-utils";
|
|
7
|
+
import { classNames } from "@v-c/util";
|
|
8
|
+
//#region src/components/Help/ProHelpContentPanel.tsx
|
|
9
|
+
/**
|
|
10
|
+
* 控制具体的帮助文档显示组件
|
|
11
|
+
* selectedKey 来展示对应的内容。它会根据不同的item.valueType值来展示不同的内容,包括标题、图片、超链接等。
|
|
12
|
+
*/
|
|
13
|
+
const ProHelpContentPanel = /* @__PURE__ */ defineComponent((props, { attrs }) => {
|
|
14
|
+
const proHelpContextProvide = useProHelpContext();
|
|
15
|
+
const proConfig = useProConfig();
|
|
16
|
+
const scrollHeightMap = ref(/* @__PURE__ */ new Map());
|
|
17
|
+
const divRef = shallowRef(null);
|
|
18
|
+
const renderItem = (item) => {
|
|
19
|
+
if (item?.asyncLoad) return createVNode("div", {
|
|
20
|
+
"class": classNames(attrs.class, proConfig.value.hashId),
|
|
21
|
+
"id": item.title
|
|
22
|
+
}, [createVNode(AsyncContentPanel, {
|
|
23
|
+
"key": item?.key,
|
|
24
|
+
"item": item,
|
|
25
|
+
"onInit": (ref) => {
|
|
26
|
+
if (!scrollHeightMap.value) return;
|
|
27
|
+
scrollHeightMap.value.set(item.key, ref);
|
|
28
|
+
}
|
|
29
|
+
}, null)]);
|
|
30
|
+
return createVNode("div", {
|
|
31
|
+
"class": classNames(attrs.class, proConfig.value.hashId),
|
|
32
|
+
"id": item?.title
|
|
33
|
+
}, [createVNode(RenderContentPanel, {
|
|
34
|
+
"onInit": (ref) => {
|
|
35
|
+
if (!scrollHeightMap.value) return;
|
|
36
|
+
scrollHeightMap.value.set(item?.key, ref);
|
|
37
|
+
},
|
|
38
|
+
"dataSourceChildren": item?.children || []
|
|
39
|
+
}, null)]);
|
|
40
|
+
};
|
|
41
|
+
useEffect(() => {
|
|
42
|
+
if (!props.selectedKey || !props.parentItem?.infiniteScrollFull) return;
|
|
43
|
+
const div = scrollHeightMap.value.get(props.selectedKey);
|
|
44
|
+
if (div?.offsetTop && divRef.value) {
|
|
45
|
+
if (Math.abs(divRef.value.scrollTop - div?.offsetTop + 40) > div?.clientHeight) divRef.value.scrollTop = div?.offsetTop - 40;
|
|
46
|
+
}
|
|
47
|
+
}, [() => props.selectedKey]);
|
|
48
|
+
/**
|
|
49
|
+
* debounce(防抖)处理滚动事件,并根据滚动位置来实现找到当前列表的 key
|
|
50
|
+
*/
|
|
51
|
+
const onScrollEvent = useDebounceFn(async (e) => {
|
|
52
|
+
const dom = e?.target;
|
|
53
|
+
const list = Array.from(scrollHeightMap.value.entries()).find(([, value]) => {
|
|
54
|
+
if (dom?.scrollTop < value.offsetTop) return true;
|
|
55
|
+
return false;
|
|
56
|
+
});
|
|
57
|
+
if (!list) return;
|
|
58
|
+
if (list.at(0) !== props.selectedKey) props.onScroll?.(list.at(0));
|
|
59
|
+
}, 200);
|
|
60
|
+
/**
|
|
61
|
+
* 当 parentItem 组件中的 infiniteScrollFull 属性变化时
|
|
62
|
+
* 如果该属性为真值,则开始监听滚动事件;
|
|
63
|
+
* 如果为假值,则停止监听滚动事件并取消防抖处理。
|
|
64
|
+
* 在监听滚动事件时,可以实现分页(瀑布流)效果。同时,该代码还会根据 selectedKey 的变化来触发跳转
|
|
65
|
+
*/
|
|
66
|
+
useEffect(() => {
|
|
67
|
+
if (!props.parentItem?.infiniteScrollFull) return;
|
|
68
|
+
onScrollEvent.cancel();
|
|
69
|
+
divRef.value?.addEventListener("scroll", onScrollEvent.run, false);
|
|
70
|
+
return () => {
|
|
71
|
+
onScrollEvent.cancel();
|
|
72
|
+
divRef.value?.removeEventListener("scroll", onScrollEvent.run, false);
|
|
73
|
+
};
|
|
74
|
+
}, [() => props.parentItem?.infiniteScrollFull, () => props.selectedKey]);
|
|
75
|
+
/**
|
|
76
|
+
* 生成一个 Map 能根据 key 找到所有的 index
|
|
77
|
+
*/
|
|
78
|
+
const dataSourceMap = computed(() => {
|
|
79
|
+
const map = /* @__PURE__ */ new Map();
|
|
80
|
+
proHelpContextProvide.value.dataSource.forEach((page) => {
|
|
81
|
+
page.children.forEach((item) => {
|
|
82
|
+
map.set(item.key || item.title, {
|
|
83
|
+
...item,
|
|
84
|
+
parentKey: page.key
|
|
85
|
+
});
|
|
86
|
+
});
|
|
87
|
+
});
|
|
88
|
+
return map;
|
|
89
|
+
});
|
|
90
|
+
return () => {
|
|
91
|
+
const { selectedKey, parentItem } = props;
|
|
92
|
+
if (parentItem && parentItem.infiniteScrollFull) return createVNode("div", {
|
|
93
|
+
"ref": divRef,
|
|
94
|
+
"class": classNames(`${attrs.class}-infinite-scroll`, proConfig.value.hashId),
|
|
95
|
+
"style": { overflow: "auto" }
|
|
96
|
+
}, [parentItem.children?.map((item) => {
|
|
97
|
+
return createVNode(Fragment, { "key": item.key }, [renderItem(item)]);
|
|
98
|
+
})]);
|
|
99
|
+
return renderItem(dataSourceMap.value.get(selectedKey));
|
|
100
|
+
};
|
|
101
|
+
}, {
|
|
102
|
+
props: {
|
|
103
|
+
selectedKey: {
|
|
104
|
+
type: String,
|
|
105
|
+
required: false
|
|
106
|
+
},
|
|
107
|
+
parentItem: {
|
|
108
|
+
type: Object,
|
|
109
|
+
required: false
|
|
110
|
+
},
|
|
111
|
+
onScroll: {
|
|
112
|
+
type: Function,
|
|
113
|
+
required: false
|
|
114
|
+
}
|
|
115
|
+
},
|
|
116
|
+
name: "ProHelpContentPanel",
|
|
117
|
+
inheritAttrs: false
|
|
118
|
+
});
|
|
119
|
+
//#endregion
|
|
120
|
+
export { ProHelpContentPanel as default };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ProHelpPanelProps } from "./ProHelpPanel.js";
|
|
2
|
+
import * as _$vue from "vue";
|
|
3
|
+
import { DrawerProps } from "antdv-next";
|
|
4
|
+
|
|
5
|
+
//#region src/components/Help/ProHelpDrawer.d.ts
|
|
6
|
+
type ProHelpDrawerProps = {
|
|
7
|
+
drawerProps?: DrawerProps;
|
|
8
|
+
} & Omit<ProHelpPanelProps, 'onClose'>;
|
|
9
|
+
declare const ProHelpDrawer: _$vue.DefineSetupFnComponent<ProHelpDrawerProps, {}, {}, {
|
|
10
|
+
drawerProps?: DrawerProps;
|
|
11
|
+
} & Omit<ProHelpPanelProps, "onClose"> & {}, _$vue.PublicProps>;
|
|
12
|
+
//#endregion
|
|
13
|
+
export { ProHelpDrawerProps, ProHelpDrawer as default };
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import ProHelpPanel from "./ProHelpPanel.js";
|
|
2
|
+
import { computed, createVNode, defineComponent, mergeProps } from "vue";
|
|
3
|
+
import { useMountMergeState } from "@antdv-vue/pro-utils";
|
|
4
|
+
import { Drawer } from "antdv-next";
|
|
5
|
+
//#region src/components/Help/ProHelpDrawer.tsx
|
|
6
|
+
const ProHelpDrawer = /* @__PURE__ */ defineComponent((props) => {
|
|
7
|
+
const [drawerOpen, setDrawerOpen] = useMountMergeState(false, {
|
|
8
|
+
value: computed(() => props.drawerProps?.open),
|
|
9
|
+
onChange: (open) => {
|
|
10
|
+
props.drawerProps?.afterOpenChange?.(open);
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
return () => {
|
|
14
|
+
const { drawerProps, ...restProps } = props;
|
|
15
|
+
return createVNode(Drawer, mergeProps({
|
|
16
|
+
"closeIcon": null,
|
|
17
|
+
"styles": {
|
|
18
|
+
header: { display: "none" },
|
|
19
|
+
body: { padding: 0 }
|
|
20
|
+
},
|
|
21
|
+
"mask": { closable: true }
|
|
22
|
+
}, drawerProps, {
|
|
23
|
+
"size": drawerProps?.size ?? 720,
|
|
24
|
+
"open": drawerOpen.value,
|
|
25
|
+
"onClose": () => setDrawerOpen(false),
|
|
26
|
+
"afterOpenChange": (open) => {
|
|
27
|
+
setDrawerOpen(open);
|
|
28
|
+
}
|
|
29
|
+
}), { default: () => [createVNode(ProHelpPanel, mergeProps(restProps, {
|
|
30
|
+
"onClose": () => setDrawerOpen(false),
|
|
31
|
+
"variant": "borderless"
|
|
32
|
+
}), null)] });
|
|
33
|
+
};
|
|
34
|
+
}, {
|
|
35
|
+
props: {
|
|
36
|
+
drawerProps: {
|
|
37
|
+
type: Object,
|
|
38
|
+
required: false
|
|
39
|
+
},
|
|
40
|
+
title: {
|
|
41
|
+
type: String,
|
|
42
|
+
required: false
|
|
43
|
+
},
|
|
44
|
+
defaultSelectedKey: {
|
|
45
|
+
type: String,
|
|
46
|
+
required: false
|
|
47
|
+
},
|
|
48
|
+
selectedKey: {
|
|
49
|
+
type: String,
|
|
50
|
+
required: false
|
|
51
|
+
},
|
|
52
|
+
"onUpdate:selectedKey": {
|
|
53
|
+
type: Function,
|
|
54
|
+
required: false
|
|
55
|
+
},
|
|
56
|
+
onSelectedKeyChange: {
|
|
57
|
+
type: Function,
|
|
58
|
+
required: false
|
|
59
|
+
},
|
|
60
|
+
showLeftPanel: {
|
|
61
|
+
type: Boolean,
|
|
62
|
+
required: false,
|
|
63
|
+
default: void 0
|
|
64
|
+
},
|
|
65
|
+
"onUpdate:showLeftPanel": {
|
|
66
|
+
type: Function,
|
|
67
|
+
required: false
|
|
68
|
+
},
|
|
69
|
+
onShowLeftPanelChange: {
|
|
70
|
+
type: Function,
|
|
71
|
+
required: false
|
|
72
|
+
},
|
|
73
|
+
variant: {
|
|
74
|
+
type: String,
|
|
75
|
+
required: false
|
|
76
|
+
},
|
|
77
|
+
height: {
|
|
78
|
+
type: [Number, String],
|
|
79
|
+
required: false
|
|
80
|
+
},
|
|
81
|
+
footer: {
|
|
82
|
+
type: [
|
|
83
|
+
Object,
|
|
84
|
+
Function,
|
|
85
|
+
String,
|
|
86
|
+
Number,
|
|
87
|
+
null,
|
|
88
|
+
Boolean,
|
|
89
|
+
Array
|
|
90
|
+
],
|
|
91
|
+
required: false,
|
|
92
|
+
default: void 0
|
|
93
|
+
},
|
|
94
|
+
infiniteScrollFull: {
|
|
95
|
+
type: Boolean,
|
|
96
|
+
required: false,
|
|
97
|
+
default: void 0
|
|
98
|
+
},
|
|
99
|
+
extraRender: {
|
|
100
|
+
type: Function,
|
|
101
|
+
required: false
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
name: "ProHelpDrawer",
|
|
105
|
+
inheritAttrs: false
|
|
106
|
+
});
|
|
107
|
+
//#endregion
|
|
108
|
+
export { ProHelpDrawer as default };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ProHelpPanelProps } from "./ProHelpPanel.js";
|
|
2
|
+
import * as _$vue from "vue";
|
|
3
|
+
import { ModalProps } from "antdv-next";
|
|
4
|
+
|
|
5
|
+
//#region src/components/Help/ProHelpModal.d.ts
|
|
6
|
+
type ProHelpModalrops = {
|
|
7
|
+
/**
|
|
8
|
+
* Ant Design Modal 组件的 props,可以传递一些选项,如位置、大小、关闭方式等等。
|
|
9
|
+
*/
|
|
10
|
+
modalProps?: ModalProps;
|
|
11
|
+
} & Omit<ProHelpPanelProps, 'onClose'>;
|
|
12
|
+
declare const ProHelpModal: _$vue.DefineSetupFnComponent<ProHelpModalrops, {}, {}, {
|
|
13
|
+
/**
|
|
14
|
+
* Ant Design Modal 组件的 props,可以传递一些选项,如位置、大小、关闭方式等等。
|
|
15
|
+
*/
|
|
16
|
+
modalProps?: ModalProps;
|
|
17
|
+
} & Omit<ProHelpPanelProps, "onClose"> & {}, _$vue.PublicProps>;
|
|
18
|
+
//#endregion
|
|
19
|
+
export { ProHelpModalrops, ProHelpModal as default };
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import ProHelpPanel from "./ProHelpPanel.js";
|
|
2
|
+
import { computed, createVNode, defineComponent, mergeProps } from "vue";
|
|
3
|
+
import { useMountMergeState } from "@antdv-vue/pro-utils";
|
|
4
|
+
import { Modal } from "antdv-next";
|
|
5
|
+
//#region src/components/Help/ProHelpModal.tsx
|
|
6
|
+
const ProHelpModal = /* @__PURE__ */ defineComponent((props) => {
|
|
7
|
+
const [modalOpen, setModalOpen] = useMountMergeState(false, {
|
|
8
|
+
value: computed(() => props.modalProps?.open),
|
|
9
|
+
onChange: () => {
|
|
10
|
+
props.modalProps?.afterClose?.();
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
return () => {
|
|
14
|
+
const { modalProps, ...restprops } = props;
|
|
15
|
+
return createVNode(Modal, mergeProps({
|
|
16
|
+
"onCancel": () => {
|
|
17
|
+
setModalOpen(false);
|
|
18
|
+
},
|
|
19
|
+
"styles": { body: { margin: "-24px" } },
|
|
20
|
+
"centered": true,
|
|
21
|
+
"closable": false,
|
|
22
|
+
"footer": null,
|
|
23
|
+
"width": 720,
|
|
24
|
+
"open": modalOpen.value,
|
|
25
|
+
"mask": { closable: true }
|
|
26
|
+
}, modalProps), { default: () => [createVNode(ProHelpPanel, mergeProps(restprops, {
|
|
27
|
+
"height": restprops.height || 648,
|
|
28
|
+
"onClose": () => setModalOpen(false)
|
|
29
|
+
}), null)] });
|
|
30
|
+
};
|
|
31
|
+
}, {
|
|
32
|
+
props: {
|
|
33
|
+
modalProps: {
|
|
34
|
+
type: Object,
|
|
35
|
+
required: false
|
|
36
|
+
},
|
|
37
|
+
title: {
|
|
38
|
+
type: String,
|
|
39
|
+
required: false
|
|
40
|
+
},
|
|
41
|
+
defaultSelectedKey: {
|
|
42
|
+
type: String,
|
|
43
|
+
required: false
|
|
44
|
+
},
|
|
45
|
+
selectedKey: {
|
|
46
|
+
type: String,
|
|
47
|
+
required: false
|
|
48
|
+
},
|
|
49
|
+
"onUpdate:selectedKey": {
|
|
50
|
+
type: Function,
|
|
51
|
+
required: false
|
|
52
|
+
},
|
|
53
|
+
onSelectedKeyChange: {
|
|
54
|
+
type: Function,
|
|
55
|
+
required: false
|
|
56
|
+
},
|
|
57
|
+
showLeftPanel: {
|
|
58
|
+
type: Boolean,
|
|
59
|
+
required: false,
|
|
60
|
+
default: void 0
|
|
61
|
+
},
|
|
62
|
+
"onUpdate:showLeftPanel": {
|
|
63
|
+
type: Function,
|
|
64
|
+
required: false
|
|
65
|
+
},
|
|
66
|
+
onShowLeftPanelChange: {
|
|
67
|
+
type: Function,
|
|
68
|
+
required: false
|
|
69
|
+
},
|
|
70
|
+
variant: {
|
|
71
|
+
type: String,
|
|
72
|
+
required: false
|
|
73
|
+
},
|
|
74
|
+
height: {
|
|
75
|
+
type: [Number, String],
|
|
76
|
+
required: false
|
|
77
|
+
},
|
|
78
|
+
footer: {
|
|
79
|
+
type: [
|
|
80
|
+
Object,
|
|
81
|
+
Function,
|
|
82
|
+
String,
|
|
83
|
+
Number,
|
|
84
|
+
null,
|
|
85
|
+
Boolean,
|
|
86
|
+
Array
|
|
87
|
+
],
|
|
88
|
+
required: false,
|
|
89
|
+
default: void 0
|
|
90
|
+
},
|
|
91
|
+
infiniteScrollFull: {
|
|
92
|
+
type: Boolean,
|
|
93
|
+
required: false,
|
|
94
|
+
default: void 0
|
|
95
|
+
},
|
|
96
|
+
extraRender: {
|
|
97
|
+
type: Function,
|
|
98
|
+
required: false
|
|
99
|
+
}
|
|
100
|
+
},
|
|
101
|
+
name: "ProHelpModal",
|
|
102
|
+
inheritAttrs: false
|
|
103
|
+
});
|
|
104
|
+
//#endregion
|
|
105
|
+
export { ProHelpModal as default };
|