@done-coding/admin-core 0.17.1-alpha.0 → 0.18.1-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +77 -1
- package/es/_virtual/_plugin-vue_export-helper.mjs +7 -6
- package/es/bridge/config-hook.mjs +49 -37
- package/es/bridge/index.mjs +152 -109
- package/es/bridge/layout.mjs +45 -31
- package/es/bridge/plugin.mjs +22 -12
- package/es/bridge/route.mjs +59 -50
- package/es/bridge/state.mjs +54 -39
- package/es/bridge/storage.mjs +18 -8
- package/es/bridge/theme/index.mjs +200 -97
- package/es/bridge/theme/persist.mjs +11 -7
- package/es/bridge/theme/system-dark.mjs +13 -6
- package/es/components/app-layout/AppAside.vue.mjs +4 -4
- package/es/components/app-layout/AppAside.vue2.mjs +37 -30
- package/es/components/app-layout/AppBody.vue.mjs +4 -4
- package/es/components/app-layout/AppBody.vue2.mjs +97 -60
- package/es/components/app-layout/AppBreadcrumb.vue.mjs +4 -4
- package/es/components/app-layout/AppBreadcrumb.vue2.mjs +59 -38
- package/es/components/app-layout/AppCollapseToggle.vue.mjs +4 -4
- package/es/components/app-layout/AppCollapseToggle.vue2.mjs +51 -42
- package/es/components/app-layout/AppFooter.vue.mjs +4 -4
- package/es/components/app-layout/AppFooter.vue2.mjs +15 -12
- package/es/components/app-layout/AppHeader.vue.mjs +4 -4
- package/es/components/app-layout/AppHeader.vue2.mjs +81 -58
- package/es/components/app-layout/AppLayout.vue.mjs +4 -4
- package/es/components/app-layout/AppLayout.vue2.mjs +148 -112
- package/es/components/app-layout/AppPage.vue.mjs +4 -4
- package/es/components/app-layout/AppPage.vue2.mjs +254 -197
- package/es/components/app-layout/AppShell.vue.mjs +44 -42
- package/es/components/app-layout/AppShell.vue2.mjs +2 -2
- package/es/components/app-layout/AppSidebar.vue.mjs +4 -4
- package/es/components/app-layout/AppSidebar.vue2.mjs +76 -59
- package/es/components/app-layout/AppTheme.vue.mjs +4 -4
- package/es/components/app-layout/AppTheme.vue2.mjs +69 -57
- package/es/components/app-layout/app-page-geometry.mjs +44 -42
- package/es/components/app-layout/keep-alive.mjs +27 -19
- package/es/components/app-layout/viewport.mjs +4 -3
- package/es/components/data-view/DataListView.vue.mjs +4 -4
- package/es/components/data-view/DataListView.vue2.mjs +133 -93
- package/es/components/data-view/DataListViewItem.vue.mjs +4 -4
- package/es/components/data-view/DataListViewItem.vue2.mjs +11 -9
- package/es/components/data-view/utils.mjs +36 -34
- package/es/components/display/ActionBtn.vue.mjs +94 -71
- package/es/components/display/ActionBtn.vue2.mjs +2 -2
- package/es/components/display/ActionBtnGroup.vue.mjs +54 -48
- package/es/components/display/ActionBtnGroup.vue2.mjs +2 -2
- package/es/components/display/ActionConfirm.vue.mjs +4 -4
- package/es/components/display/ActionConfirm.vue2.mjs +116 -92
- package/es/components/display/BooleanTag.vue.mjs +24 -18
- package/es/components/display/BooleanTag.vue2.mjs +2 -2
- package/es/components/display/HeightProvider.vue.mjs +37 -27
- package/es/components/display/HeightProvider.vue2.mjs +2 -2
- package/es/components/display/TabsHeader.vue.mjs +4 -4
- package/es/components/display/TabsHeader.vue2.mjs +86 -57
- package/es/components/display/TabsMain.vue.mjs +156 -125
- package/es/components/display/TabsMain.vue2.mjs +2 -2
- package/es/components/display/TabsNaturalFlow.vue.mjs +15 -11
- package/es/components/display/TabsNaturalFlow.vue2.mjs +2 -2
- package/es/components/display/TabsRefineFlow.vue.mjs +55 -42
- package/es/components/display/TabsRefineFlow.vue2.mjs +2 -2
- package/es/components/display/TabsTile.vue.mjs +4 -4
- package/es/components/display/TabsTile.vue2.mjs +204 -146
- package/es/components/display/WatchSize.vue.mjs +50 -30
- package/es/components/display/WatchSize.vue2.mjs +2 -2
- package/es/components/display/use-tabs-query-sync.mjs +21 -17
- package/es/components/form/FormItem.vue.mjs +4 -4
- package/es/components/form/FormItem.vue2.mjs +183 -121
- package/es/components/form/FormItemNestForm.vue.mjs +4 -4
- package/es/components/form/FormItemNestForm.vue2.mjs +38 -34
- package/es/components/form/FormItemNestFormList.vue.mjs +4 -4
- package/es/components/form/FormItemNestFormList.vue2.mjs +135 -106
- package/es/components/form/FormMain.vue.mjs +4 -4
- package/es/components/form/FormMain.vue2.mjs +226 -139
- package/es/components/form/FormRadioGroup.vue.mjs +67 -52
- package/es/components/form/FormRadioGroup.vue2.mjs +2 -2
- package/es/components/form/FormSearch.vue.mjs +4 -4
- package/es/components/form/FormSearch.vue2.mjs +194 -156
- package/es/components/form/FormSelect.vue.mjs +69 -42
- package/es/components/form/FormSelect.vue2.mjs +2 -2
- package/es/components/form/FormSubmitBtn.vue.mjs +30 -25
- package/es/components/form/FormSubmitBtn.vue2.mjs +2 -2
- package/es/components/form/FormSubmitPanel.vue.mjs +4 -4
- package/es/components/form/FormSubmitPanel.vue2.mjs +129 -96
- package/es/components/form/FormTree.vue.mjs +19 -16
- package/es/components/form/FormTree.vue2.mjs +2 -2
- package/es/components/form/FormVerifyCode.vue.mjs +58 -41
- package/es/components/form/FormVerifyCode.vue2.mjs +2 -2
- package/es/components/form/FormVerifyImage.vue.mjs +4 -4
- package/es/components/form/FormVerifyImage.vue2.mjs +62 -40
- package/es/components/form/form-search-utils.mjs +83 -52
- package/es/components/form/nest-form-item-list.mjs +63 -55
- package/es/components/form/nest-form-item.mjs +30 -30
- package/es/components/form/nest-registry.mjs +4 -4
- package/es/components/form/use-form-submit.mjs +18 -15
- package/es/components/form/use-layout-by-container.mjs +23 -15
- package/es/components/form/use-nest-form-list.mjs +19 -16
- package/es/components/form/use-nest-form.mjs +37 -28
- package/es/components/form/use-nest-layout-scale.mjs +11 -10
- package/es/components/form/utils.mjs +233 -145
- package/es/components/list-page/ListPage.vue.mjs +4 -4
- package/es/components/list-page/ListPage.vue2.mjs +313 -207
- package/es/components/list-page/use-sticky.mjs +45 -33
- package/es/components/menu/MenuItemSub.vue.mjs +47 -43
- package/es/components/menu/MenuItemSub.vue2.mjs +2 -2
- package/es/components/menu/MenuTree.vue.mjs +84 -61
- package/es/components/menu/MenuTree.vue2.mjs +2 -2
- package/es/components/misc/AutoRefresh.vue.mjs +4 -4
- package/es/components/misc/AutoRefresh.vue2.mjs +78 -53
- package/es/components/misc/AutoRefreshGroup.vue.mjs +4 -4
- package/es/components/misc/AutoRefreshGroup.vue2.mjs +54 -51
- package/es/components/misc/SelectModule.vue.mjs +54 -45
- package/es/components/misc/SelectModule.vue2.mjs +2 -2
- package/es/components/misc/TriggerAutoImport.vue.mjs +7 -5
- package/es/components/misc/TriggerAutoImport.vue2.mjs +2 -2
- package/es/components/modal/ModalConfirm.vue.mjs +4 -4
- package/es/components/modal/ModalConfirm.vue2.mjs +160 -125
- package/es/components/modal/ModalDetail.vue.mjs +50 -39
- package/es/components/modal/ModalDetail.vue2.mjs +2 -2
- package/es/components/modal/ModalForm.vue.mjs +63 -52
- package/es/components/modal/ModalForm.vue2.mjs +2 -2
- package/es/components/modal/ModalPorter.vue.mjs +51 -36
- package/es/components/modal/ModalPorter.vue2.mjs +2 -2
- package/es/components/modal/ModalShelf.vue.mjs +38 -28
- package/es/components/modal/ModalShelf.vue2.mjs +2 -2
- package/es/components/modal/modal-shelf-core.mjs +52 -36
- package/es/components/modal/modal-shelf-hierarchy.mjs +11 -9
- package/es/components/panel/PanelEditSwitch.vue.mjs +4 -4
- package/es/components/panel/PanelEditSwitch.vue2.mjs +88 -66
- package/es/components/panel/PanelItem.vue.mjs +4 -4
- package/es/components/panel/PanelItem.vue2.mjs +103 -77
- package/es/components/panel/PanelItemNestForm.vue.mjs +4 -4
- package/es/components/panel/PanelItemNestForm.vue2.mjs +61 -52
- package/es/components/panel/PanelItemNestPanel.vue.mjs +22 -20
- package/es/components/panel/PanelItemNestPanel.vue2.mjs +2 -2
- package/es/components/panel/PanelMain.vue.mjs +4 -4
- package/es/components/panel/PanelMain.vue2.mjs +92 -74
- package/es/components/panel/nest-panel-form.mjs +44 -38
- package/es/components/panel/nest-panel-item.mjs +18 -17
- package/es/components/slot-layout/SlotLayoutFlowAside.vue.mjs +4 -4
- package/es/components/slot-layout/SlotLayoutFlowAside.vue2.mjs +55 -42
- package/es/components/slot-layout/SlotLayoutTemplate.vue.mjs +11 -9
- package/es/components/slot-layout/SlotLayoutTemplate.vue2.mjs +2 -2
- package/es/components/table/TableMain.vue.mjs +4 -4
- package/es/components/table/TableMain.vue2.mjs +378 -275
- package/es/components/table/TableSkeleton.vue.mjs +4 -4
- package/es/components/table/TableSkeleton.vue2.mjs +95 -74
- package/es/components/table/TableToolbar.vue.mjs +4 -4
- package/es/components/table/TableToolbar.vue2.mjs +170 -154
- package/es/components/table/ToolbarButtons.vue.mjs +12 -10
- package/es/components/table/ToolbarButtons.vue2.mjs +2 -2
- package/es/components/table/constants.mjs +4 -3
- package/es/components/table/use-fill-height.mjs +12 -10
- package/es/components/table/use-table-skeleton.mjs +19 -15
- package/es/config/list-model.mjs +2 -2
- package/es/config/route.mjs +4 -3
- package/es/helpers/form.mjs +35 -25
- package/es/helpers/list-helper.mjs +59 -44
- package/es/hooks/activated.mjs +49 -33
- package/es/hooks/feel-size.mjs +39 -23
- package/es/hooks/menus-dispatch.mjs +68 -35
- package/es/hooks/timeout.mjs +29 -14
- package/es/hooks/use-breakpoint.mjs +35 -23
- package/es/hooks/use-channel-viewport-height.mjs +30 -20
- package/es/hooks/use-custom-breakpoint.mjs +48 -31
- package/es/hooks/use-observe-size.mjs +37 -20
- package/es/hooks/use-theme-apply.mjs +175 -124
- package/es/hooks/use-viewport-apply.mjs +39 -27
- package/es/index.mjs +239 -239
- package/es/inject/key.mjs +52 -41
- package/es/injectInfo.json.mjs +2 -2
- package/es/router/group-redirect.mjs +22 -16
- package/es/router/guard/index.mjs +26 -21
- package/es/router/guard/login.mjs +4 -2
- package/es/router/guard/permission.mjs +4 -2
- package/es/store/app.mjs +163 -123
- package/es/store/router-permission.mjs +75 -46
- package/es/store/user.mjs +100 -71
- package/es/style.css +769 -1
- package/es/utils/dom.mjs +20 -16
- package/es/utils/export.mjs +34 -18
- package/es/utils/id.mjs +5 -3
- package/es/utils/router.mjs +21 -14
- package/es/utils/theme-scale.mjs +50 -35
- package/es/utils/time.mjs +20 -14
- package/package.json +4 -3
- package/src/bridge/README.md +5 -0
- package/src/bridge/docs/README.md +72 -0
- package/src/components/README.md +84 -0
- package/src/components/app-layout/README.md +46 -0
- package/src/components/app-layout/docs/README-AppAside.md +69 -0
- package/src/components/app-layout/docs/README-AppBody.md +81 -0
- package/src/components/app-layout/docs/README-AppBreadcrumb.md +71 -0
- package/src/components/app-layout/docs/README-AppFooter.md +41 -0
- package/src/components/app-layout/docs/README-AppHeader.md +73 -0
- package/src/components/app-layout/docs/README-AppLayout.md +83 -0
- package/src/components/app-layout/docs/README-AppPage.md +80 -0
- package/src/components/app-layout/docs/README-AppSidebar.md +70 -0
- package/src/components/app-layout/docs/README-AppTheme.md +66 -0
- package/src/components/data-view/README.md +19 -0
- package/src/components/data-view/docs/README-DataListView.md +114 -0
- package/src/components/display/README.md +23 -0
- package/src/components/display/docs/README-ActionBtn.md +84 -0
- package/src/components/display/docs/README-ActionBtnGroup.md +96 -0
- package/src/components/display/docs/README-ActionConfirm.md +77 -0
- package/src/components/display/docs/README-BooleanTag.md +76 -0
- package/src/components/display/docs/README-HeightProvider.md +74 -0
- package/src/components/display/docs/README-TabsMain.md +99 -0
- package/src/components/display/docs/README-WatchSize.md +70 -0
- package/src/components/form/README.md +24 -0
- package/src/components/form/docs/README-FormItemNestForm.md +86 -0
- package/src/components/form/docs/README-FormItemNestFormList.md +93 -0
- package/src/components/form/docs/README-FormMain.md +101 -0
- package/src/components/form/docs/README-FormSearch.md +89 -0
- package/src/components/form/docs/README-FormSubmitBtn.md +72 -0
- package/src/components/form/docs/README-FormSubmitPanel.md +97 -0
- package/src/components/list-page/README.md +16 -0
- package/src/components/list-page/docs/README-ListPage.md +136 -0
- package/src/components/menu/README.md +19 -0
- package/src/components/menu/docs/README-MenuItemSub.md +53 -0
- package/src/components/menu/docs/README-MenuTree.md +76 -0
- package/src/components/misc/README.md +21 -0
- package/src/components/misc/docs/README-AutoRefresh.md +74 -0
- package/src/components/misc/docs/README-AutoRefreshGroup.md +74 -0
- package/src/components/misc/docs/README-SelectModule.md +72 -0
- package/src/components/modal/README.md +21 -0
- package/src/components/modal/docs/README-ModalConfirm.md +105 -0
- package/src/components/modal/docs/README-ModalDetail.md +103 -0
- package/src/components/modal/docs/README-ModalForm.md +97 -0
- package/src/components/modal/docs/README-ModalPorter.md +92 -0
- package/src/components/modal/docs/README-ModalShelf.md +115 -0
- package/src/components/panel/README.md +19 -0
- package/src/components/panel/docs/README-PanelMain.md +149 -0
- package/src/components/slot-layout/README.md +17 -0
- package/src/components/slot-layout/docs/README-SlotLayoutFlowAside.md +83 -0
- package/src/components/slot-layout/docs/README-SlotLayoutTemplate.md +73 -0
- package/src/components/table/README.md +17 -0
- package/src/components/table/docs/README-TableMain.md +140 -0
- package/src/hooks/README.md +5 -0
- package/src/hooks/docs/README.md +49 -0
- package/types/bridge/config-hook.d.ts +68 -0
- package/types/bridge/index.d.ts +411 -0
- package/types/bridge/layout.d.ts +40 -0
- package/types/bridge/plugin.d.ts +18 -0
- package/types/bridge/route.d.ts +20 -1
- package/types/bridge/state.d.ts +14 -0
- package/types/bridge/storage.d.ts +9 -0
- package/types/bridge/theme/index.d.ts +7 -0
- package/types/bridge/theme/persist.d.ts +12 -0
- package/types/bridge/theme/system-dark.d.ts +12 -0
- package/types/bridge/theme/types.d.ts +238 -0
- package/types/components/app-layout/AppAside.vue.d.ts +1 -0
- package/types/components/app-layout/AppCollapseToggle.vue.d.ts +3 -0
- package/types/components/app-layout/AppHeader.vue.d.ts +3 -0
- package/types/components/app-layout/AppLayout.vue.d.ts +12 -0
- package/types/components/app-layout/AppPage.vue.d.ts +17 -0
- package/types/components/app-layout/AppSidebar.vue.d.ts +2 -0
- package/types/components/app-layout/app-page-geometry.d.ts +48 -0
- package/types/components/app-layout/keep-alive.d.ts +17 -0
- package/types/components/app-layout/types.d.ts +125 -0
- package/types/components/app-layout/viewport.d.ts +28 -0
- package/types/components/data-view/DataListViewItem.vue.d.ts +8 -0
- package/types/components/data-view/index.d.ts +4 -0
- package/types/components/data-view/types.d.ts +42 -0
- package/types/components/data-view/utils.d.ts +3 -0
- package/types/components/display/TabsHeader.vue.d.ts +2 -0
- package/types/components/display/TabsMain.vue.d.ts +2 -0
- package/types/components/display/TabsRefineFlow.vue.d.ts +1 -0
- package/types/components/display/TabsTile.vue.d.ts +247 -12
- package/types/components/display/WatchSize.vue.d.ts +9 -0
- package/types/components/display/index.d.ts +37 -1
- package/types/components/display/types.d.ts +163 -0
- package/types/components/display/use-tabs-query-sync.d.ts +29 -0
- package/types/components/form/FormItemNestForm.vue.d.ts +5 -0
- package/types/components/form/FormItemNestFormList.vue.d.ts +17 -0
- package/types/components/form/FormVerifyCode.vue.d.ts +9 -0
- package/types/components/form/FormVerifyImage.vue.d.ts +1 -0
- package/types/components/form/form-search-utils.d.ts +34 -0
- package/types/components/form/nest-form-item-list.d.ts +28 -0
- package/types/components/form/nest-form-item.d.ts +21 -0
- package/types/components/form/nest-registry.d.ts +14 -0
- package/types/components/form/types.d.ts +208 -8
- package/types/components/form/use-form-submit.d.ts +13 -0
- package/types/components/form/use-layout-by-container.d.ts +23 -0
- package/types/components/form/use-nest-form-list.d.ts +13 -0
- package/types/components/form/use-nest-form.d.ts +15 -0
- package/types/components/form/use-nest-layout-scale.d.ts +12 -0
- package/types/components/form/utils.d.ts +56 -1
- package/types/components/list-page/ListPage.vue.d.ts +6 -0
- package/types/components/list-page/types.d.ts +50 -2
- package/types/components/list-page/use-sticky.d.ts +23 -0
- package/types/components/misc/index.d.ts +6 -1
- package/types/components/misc/types.d.ts +7 -0
- package/types/components/modal/ModalConfirm.vue.d.ts +29 -0
- package/types/components/modal/index.d.ts +7 -1
- package/types/components/modal/modal-shelf-core.d.ts +3 -0
- package/types/components/modal/modal-shelf-hierarchy.d.ts +4 -0
- package/types/components/modal/modal-shelf-types.d.ts +34 -0
- package/types/components/modal/types.d.ts +63 -2
- package/types/components/panel/PanelItemNestForm.vue.d.ts +6 -0
- package/types/components/panel/PanelItemNestPanel.vue.d.ts +5 -0
- package/types/components/panel/nest-panel-form.d.ts +21 -0
- package/types/components/panel/nest-panel-item.d.ts +14 -0
- package/types/components/panel/types.d.ts +52 -1
- package/types/components/slot-layout/SlotLayoutTemplate.vue.d.ts +21 -0
- package/types/components/slot-layout/types.d.ts +4 -0
- package/types/components/table/constants.d.ts +8 -0
- package/types/components/table/types.d.ts +140 -9
- package/types/components/table/use-fill-height.d.ts +14 -0
- package/types/components/table/use-table-skeleton.d.ts +16 -0
- package/types/config/list-model.d.ts +29 -0
- package/types/config/route.d.ts +2 -0
- package/types/helpers/form.d.ts +5 -0
- package/types/helpers/list-helper.d.ts +26 -0
- package/types/helpers/types.d.ts +11 -0
- package/types/hooks/activated.d.ts +23 -0
- package/types/hooks/feel-size.d.ts +2 -0
- package/types/hooks/menus-dispatch.d.ts +4 -0
- package/types/hooks/timeout.d.ts +4 -0
- package/types/hooks/use-channel-viewport-height.d.ts +8 -0
- package/types/hooks/use-custom-breakpoint.d.ts +19 -0
- package/types/hooks/use-observe-size.d.ts +29 -0
- package/types/hooks/use-theme-apply.d.ts +23 -0
- package/types/hooks/use-viewport-apply.d.ts +12 -0
- package/types/inject/key.d.ts +163 -0
- package/types/injectInfo.json.d.ts +1 -1
- package/types/router/group-redirect.d.ts +9 -0
- package/types/router/guard/index.d.ts +13 -0
- package/types/router/guard/login.d.ts +1 -0
- package/types/router/guard/permission.d.ts +1 -0
- package/types/router/guard/types.d.ts +3 -0
- package/types/store/app.d.ts +27 -0
- package/types/store/router-permission.d.ts +53 -0
- package/types/store/user.d.ts +24 -0
- package/types/types/dot-path.d.ts +8 -0
- package/types/types/route.d.ts +45 -0
- package/types/types/utility-types.d.ts +7 -0
- package/types/utils/dom.d.ts +22 -0
- package/types/utils/export.d.ts +16 -1
- package/types/utils/id.d.ts +1 -0
- package/types/utils/router.d.ts +2 -0
- package/types/utils/theme-scale.d.ts +31 -0
- package/types/utils/time.d.ts +1 -0
|
@@ -2,12 +2,19 @@ import { nextTick } from 'vue';
|
|
|
2
2
|
import { TabsMainItem, TabsMainTileNavMode, TabsMainTileNavPosition } from './types';
|
|
3
3
|
type __VLS_Props = {
|
|
4
4
|
tabs: TabsMainItem[];
|
|
5
|
+
/** 精细化布局:true 卡片在有界容器内滚(容器高 = channel 视口高度) */
|
|
5
6
|
refine?: boolean;
|
|
7
|
+
/** px,视口可用高度(refine=true 时算容器高用);链路同 TabsMain */
|
|
6
8
|
viewportHeight?: number;
|
|
9
|
+
/** px,容器高度兜底下限 */
|
|
7
10
|
minHeight?: number;
|
|
11
|
+
/** 作为子时要消费的父通道标识(refine 高度链路,透传给 useChannelViewportHeight) */
|
|
8
12
|
parentChannel?: string;
|
|
13
|
+
/** 角落 nav 落角 */
|
|
9
14
|
navPosition?: TabsMainTileNavPosition;
|
|
15
|
+
/** 角落 nav 定位模式;auto 按 refine 选(refine→absolute / 自然→sticky) */
|
|
10
16
|
navMode?: TabsMainTileNavMode;
|
|
17
|
+
/** 角落 nav 距角像素 */
|
|
11
18
|
navOffset?: number;
|
|
12
19
|
};
|
|
13
20
|
type __VLS_PublicProps = {
|
|
@@ -37,7 +44,26 @@ declare function __VLS_template(): {
|
|
|
37
44
|
readonly direction?: "vertical" | "horizontal" | undefined;
|
|
38
45
|
readonly selectScrollTop?: boolean | undefined;
|
|
39
46
|
readonly onChange?: ((href: string) => any) | undefined | undefined;
|
|
40
|
-
readonly onClick?: ((e: MouseEvent, href
|
|
47
|
+
readonly onClick?: ((e: MouseEvent, href
|
|
48
|
+
/**
|
|
49
|
+
* TabsTile —— TabsMain 平铺(tile)模式渲染分支(仅 TabsMain 内部经 `v-if=tile` 消费,不对外单独发布)。
|
|
50
|
+
*
|
|
51
|
+
* 平铺:所有 tab item 同时铺开成一列卡片(各裹 ElCard、标题进卡头),隐藏 tab-bar,改由角落 nav 导航。
|
|
52
|
+
* - 导航 + scrollspy + 聚焦滚动全托付 **ElAnchor**:点 nav 平滑滚到卡(ElAnchor rAF animateScrollTo,
|
|
53
|
+
* 不被组件重渲染打断——手写原生 `scrollIntoView({behavior:"smooth"})` 经 v-model 回流重渲染会被打断);
|
|
54
|
+
* 手动滚 → ElAnchor `@change` 反写激活 tab(内建 isScrolling 闸,程序化滚动期不抖动)。
|
|
55
|
+
* - 卡片挂稳定 DOM id(`paneId`,锚点靶),ElAnchorLink `href="#id"`。model ↔ 锚点双向:
|
|
56
|
+
* `@change`(scrollspy)→ 写 model;model 外部变(深链 / 父程序化)→ `anchorRef.scrollTo` 程序化定位。
|
|
57
|
+
* `fromAnchor` 闸区分二者,避免 scrollspy 反写又触发回滚。
|
|
58
|
+
* - 滚动模型跟 refine:refine=true → 卡片在有界容器(高 = channel 视口可用高度)内滚,ElAnchor container
|
|
59
|
+
* 指向该容器;refine=false → 页面滚(container=window)。nav 角落定位(navMode/navPosition)是本组件自有壳。
|
|
60
|
+
* - 槽转发沿用 TabsMain 既有中转:内容 `#{key}` / 标题 `#header-{key}`,优先级同非平铺路径。
|
|
61
|
+
*
|
|
62
|
+
* 与 TabsMain 非平铺路径(TabsRefineFlow/NaturalFlow + TabPane + KeepAlive 单 pane)是平行分支:
|
|
63
|
+
* 平铺全渲染所有卡(弃 KeepAlive、all mount),故内容槽 scope 不带 viewportHeight(每卡独立自然流,
|
|
64
|
+
* 无单一"可用视口高度"语义)。
|
|
65
|
+
*/
|
|
66
|
+
?: string | undefined) => any) | undefined | undefined;
|
|
41
67
|
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps;
|
|
42
68
|
$attrs: import('vue').Attrs;
|
|
43
69
|
$refs: {
|
|
@@ -53,12 +79,69 @@ declare function __VLS_template(): {
|
|
|
53
79
|
$el: any;
|
|
54
80
|
$options: import('vue').ComponentOptionsBase<Readonly<import('element-plus').AnchorProps> & Readonly<{
|
|
55
81
|
onChange?: ((href: string) => any) | undefined;
|
|
56
|
-
onClick?: ((e: MouseEvent, href
|
|
82
|
+
onClick?: ((e: MouseEvent, href
|
|
83
|
+
/**
|
|
84
|
+
* TabsTile —— TabsMain 平铺(tile)模式渲染分支(仅 TabsMain 内部经 `v-if=tile` 消费,不对外单独发布)。
|
|
85
|
+
*
|
|
86
|
+
* 平铺:所有 tab item 同时铺开成一列卡片(各裹 ElCard、标题进卡头),隐藏 tab-bar,改由角落 nav 导航。
|
|
87
|
+
* - 导航 + scrollspy + 聚焦滚动全托付 **ElAnchor**:点 nav 平滑滚到卡(ElAnchor rAF animateScrollTo,
|
|
88
|
+
* 不被组件重渲染打断——手写原生 `scrollIntoView({behavior:"smooth"})` 经 v-model 回流重渲染会被打断);
|
|
89
|
+
* 手动滚 → ElAnchor `@change` 反写激活 tab(内建 isScrolling 闸,程序化滚动期不抖动)。
|
|
90
|
+
* - 卡片挂稳定 DOM id(`paneId`,锚点靶),ElAnchorLink `href="#id"`。model ↔ 锚点双向:
|
|
91
|
+
* `@change`(scrollspy)→ 写 model;model 外部变(深链 / 父程序化)→ `anchorRef.scrollTo` 程序化定位。
|
|
92
|
+
* `fromAnchor` 闸区分二者,避免 scrollspy 反写又触发回滚。
|
|
93
|
+
* - 滚动模型跟 refine:refine=true → 卡片在有界容器(高 = channel 视口可用高度)内滚,ElAnchor container
|
|
94
|
+
* 指向该容器;refine=false → 页面滚(container=window)。nav 角落定位(navMode/navPosition)是本组件自有壳。
|
|
95
|
+
* - 槽转发沿用 TabsMain 既有中转:内容 `#{key}` / 标题 `#header-{key}`,优先级同非平铺路径。
|
|
96
|
+
*
|
|
97
|
+
* 与 TabsMain 非平铺路径(TabsRefineFlow/NaturalFlow + TabPane + KeepAlive 单 pane)是平行分支:
|
|
98
|
+
* 平铺全渲染所有卡(弃 KeepAlive、all mount),故内容槽 scope 不带 viewportHeight(每卡独立自然流,
|
|
99
|
+
* 无单一"可用视口高度"语义)。
|
|
100
|
+
*/
|
|
101
|
+
?: string | undefined) => any) | undefined;
|
|
57
102
|
}>, {
|
|
58
|
-
scrollTo: (href
|
|
103
|
+
scrollTo: (href
|
|
104
|
+
/**
|
|
105
|
+
* TabsTile —— TabsMain 平铺(tile)模式渲染分支(仅 TabsMain 内部经 `v-if=tile` 消费,不对外单独发布)。
|
|
106
|
+
*
|
|
107
|
+
* 平铺:所有 tab item 同时铺开成一列卡片(各裹 ElCard、标题进卡头),隐藏 tab-bar,改由角落 nav 导航。
|
|
108
|
+
* - 导航 + scrollspy + 聚焦滚动全托付 **ElAnchor**:点 nav 平滑滚到卡(ElAnchor rAF animateScrollTo,
|
|
109
|
+
* 不被组件重渲染打断——手写原生 `scrollIntoView({behavior:"smooth"})` 经 v-model 回流重渲染会被打断);
|
|
110
|
+
* 手动滚 → ElAnchor `@change` 反写激活 tab(内建 isScrolling 闸,程序化滚动期不抖动)。
|
|
111
|
+
* - 卡片挂稳定 DOM id(`paneId`,锚点靶),ElAnchorLink `href="#id"`。model ↔ 锚点双向:
|
|
112
|
+
* `@change`(scrollspy)→ 写 model;model 外部变(深链 / 父程序化)→ `anchorRef.scrollTo` 程序化定位。
|
|
113
|
+
* `fromAnchor` 闸区分二者,避免 scrollspy 反写又触发回滚。
|
|
114
|
+
* - 滚动模型跟 refine:refine=true → 卡片在有界容器(高 = channel 视口可用高度)内滚,ElAnchor container
|
|
115
|
+
* 指向该容器;refine=false → 页面滚(container=window)。nav 角落定位(navMode/navPosition)是本组件自有壳。
|
|
116
|
+
* - 槽转发沿用 TabsMain 既有中转:内容 `#{key}` / 标题 `#header-{key}`,优先级同非平铺路径。
|
|
117
|
+
*
|
|
118
|
+
* 与 TabsMain 非平铺路径(TabsRefineFlow/NaturalFlow + TabPane + KeepAlive 单 pane)是平行分支:
|
|
119
|
+
* 平铺全渲染所有卡(弃 KeepAlive、all mount),故内容槽 scope 不带 viewportHeight(每卡独立自然流,
|
|
120
|
+
* 无单一"可用视口高度"语义)。
|
|
121
|
+
*/
|
|
122
|
+
?: string) => void;
|
|
59
123
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
60
124
|
change: (href: string) => void;
|
|
61
|
-
click: (e: MouseEvent, href
|
|
125
|
+
click: (e: MouseEvent, href
|
|
126
|
+
/**
|
|
127
|
+
* TabsTile —— TabsMain 平铺(tile)模式渲染分支(仅 TabsMain 内部经 `v-if=tile` 消费,不对外单独发布)。
|
|
128
|
+
*
|
|
129
|
+
* 平铺:所有 tab item 同时铺开成一列卡片(各裹 ElCard、标题进卡头),隐藏 tab-bar,改由角落 nav 导航。
|
|
130
|
+
* - 导航 + scrollspy + 聚焦滚动全托付 **ElAnchor**:点 nav 平滑滚到卡(ElAnchor rAF animateScrollTo,
|
|
131
|
+
* 不被组件重渲染打断——手写原生 `scrollIntoView({behavior:"smooth"})` 经 v-model 回流重渲染会被打断);
|
|
132
|
+
* 手动滚 → ElAnchor `@change` 反写激活 tab(内建 isScrolling 闸,程序化滚动期不抖动)。
|
|
133
|
+
* - 卡片挂稳定 DOM id(`paneId`,锚点靶),ElAnchorLink `href="#id"`。model ↔ 锚点双向:
|
|
134
|
+
* `@change`(scrollspy)→ 写 model;model 外部变(深链 / 父程序化)→ `anchorRef.scrollTo` 程序化定位。
|
|
135
|
+
* `fromAnchor` 闸区分二者,避免 scrollspy 反写又触发回滚。
|
|
136
|
+
* - 滚动模型跟 refine:refine=true → 卡片在有界容器(高 = channel 视口可用高度)内滚,ElAnchor container
|
|
137
|
+
* 指向该容器;refine=false → 页面滚(container=window)。nav 角落定位(navMode/navPosition)是本组件自有壳。
|
|
138
|
+
* - 槽转发沿用 TabsMain 既有中转:内容 `#{key}` / 标题 `#header-{key}`,优先级同非平铺路径。
|
|
139
|
+
*
|
|
140
|
+
* 与 TabsMain 非平铺路径(TabsRefineFlow/NaturalFlow + TabPane + KeepAlive 单 pane)是平行分支:
|
|
141
|
+
* 平铺全渲染所有卡(弃 KeepAlive、all mount),故内容槽 scope 不带 viewportHeight(每卡独立自然流,
|
|
142
|
+
* 无单一"可用视口高度"语义)。
|
|
143
|
+
*/
|
|
144
|
+
?: string | undefined) => void;
|
|
62
145
|
}, string, {
|
|
63
146
|
offset: number;
|
|
64
147
|
type: "default" | "underline";
|
|
@@ -95,9 +178,47 @@ declare function __VLS_template(): {
|
|
|
95
178
|
bound: number;
|
|
96
179
|
}> & Omit<Readonly<import('element-plus').AnchorProps> & Readonly<{
|
|
97
180
|
onChange?: ((href: string) => any) | undefined;
|
|
98
|
-
onClick?: ((e: MouseEvent, href
|
|
181
|
+
onClick?: ((e: MouseEvent, href
|
|
182
|
+
/**
|
|
183
|
+
* TabsTile —— TabsMain 平铺(tile)模式渲染分支(仅 TabsMain 内部经 `v-if=tile` 消费,不对外单独发布)。
|
|
184
|
+
*
|
|
185
|
+
* 平铺:所有 tab item 同时铺开成一列卡片(各裹 ElCard、标题进卡头),隐藏 tab-bar,改由角落 nav 导航。
|
|
186
|
+
* - 导航 + scrollspy + 聚焦滚动全托付 **ElAnchor**:点 nav 平滑滚到卡(ElAnchor rAF animateScrollTo,
|
|
187
|
+
* 不被组件重渲染打断——手写原生 `scrollIntoView({behavior:"smooth"})` 经 v-model 回流重渲染会被打断);
|
|
188
|
+
* 手动滚 → ElAnchor `@change` 反写激活 tab(内建 isScrolling 闸,程序化滚动期不抖动)。
|
|
189
|
+
* - 卡片挂稳定 DOM id(`paneId`,锚点靶),ElAnchorLink `href="#id"`。model ↔ 锚点双向:
|
|
190
|
+
* `@change`(scrollspy)→ 写 model;model 外部变(深链 / 父程序化)→ `anchorRef.scrollTo` 程序化定位。
|
|
191
|
+
* `fromAnchor` 闸区分二者,避免 scrollspy 反写又触发回滚。
|
|
192
|
+
* - 滚动模型跟 refine:refine=true → 卡片在有界容器(高 = channel 视口可用高度)内滚,ElAnchor container
|
|
193
|
+
* 指向该容器;refine=false → 页面滚(container=window)。nav 角落定位(navMode/navPosition)是本组件自有壳。
|
|
194
|
+
* - 槽转发沿用 TabsMain 既有中转:内容 `#{key}` / 标题 `#header-{key}`,优先级同非平铺路径。
|
|
195
|
+
*
|
|
196
|
+
* 与 TabsMain 非平铺路径(TabsRefineFlow/NaturalFlow + TabPane + KeepAlive 单 pane)是平行分支:
|
|
197
|
+
* 平铺全渲染所有卡(弃 KeepAlive、all mount),故内容槽 scope 不带 viewportHeight(每卡独立自然流,
|
|
198
|
+
* 无单一"可用视口高度"语义)。
|
|
199
|
+
*/
|
|
200
|
+
?: string | undefined) => any) | undefined;
|
|
99
201
|
}>, "type" | "marker" | "offset" | "bound" | "duration" | "direction" | "scrollTo"> & {
|
|
100
|
-
scrollTo: (href
|
|
202
|
+
scrollTo: (href
|
|
203
|
+
/**
|
|
204
|
+
* TabsTile —— TabsMain 平铺(tile)模式渲染分支(仅 TabsMain 内部经 `v-if=tile` 消费,不对外单独发布)。
|
|
205
|
+
*
|
|
206
|
+
* 平铺:所有 tab item 同时铺开成一列卡片(各裹 ElCard、标题进卡头),隐藏 tab-bar,改由角落 nav 导航。
|
|
207
|
+
* - 导航 + scrollspy + 聚焦滚动全托付 **ElAnchor**:点 nav 平滑滚到卡(ElAnchor rAF animateScrollTo,
|
|
208
|
+
* 不被组件重渲染打断——手写原生 `scrollIntoView({behavior:"smooth"})` 经 v-model 回流重渲染会被打断);
|
|
209
|
+
* 手动滚 → ElAnchor `@change` 反写激活 tab(内建 isScrolling 闸,程序化滚动期不抖动)。
|
|
210
|
+
* - 卡片挂稳定 DOM id(`paneId`,锚点靶),ElAnchorLink `href="#id"`。model ↔ 锚点双向:
|
|
211
|
+
* `@change`(scrollspy)→ 写 model;model 外部变(深链 / 父程序化)→ `anchorRef.scrollTo` 程序化定位。
|
|
212
|
+
* `fromAnchor` 闸区分二者,避免 scrollspy 反写又触发回滚。
|
|
213
|
+
* - 滚动模型跟 refine:refine=true → 卡片在有界容器(高 = channel 视口可用高度)内滚,ElAnchor container
|
|
214
|
+
* 指向该容器;refine=false → 页面滚(container=window)。nav 角落定位(navMode/navPosition)是本组件自有壳。
|
|
215
|
+
* - 槽转发沿用 TabsMain 既有中转:内容 `#{key}` / 标题 `#header-{key}`,优先级同非平铺路径。
|
|
216
|
+
*
|
|
217
|
+
* 与 TabsMain 非平铺路径(TabsRefineFlow/NaturalFlow + TabPane + KeepAlive 单 pane)是平行分支:
|
|
218
|
+
* 平铺全渲染所有卡(弃 KeepAlive、all mount),故内容槽 scope 不带 viewportHeight(每卡独立自然流,
|
|
219
|
+
* 无单一"可用视口高度"语义)。
|
|
220
|
+
*/
|
|
221
|
+
?: string) => void;
|
|
101
222
|
} & {} & import('vue').ComponentCustomProperties & {} & {
|
|
102
223
|
$slots: {
|
|
103
224
|
default?: (props: {}) => any;
|
|
@@ -132,7 +253,26 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps,
|
|
|
132
253
|
readonly direction?: "vertical" | "horizontal" | undefined;
|
|
133
254
|
readonly selectScrollTop?: boolean | undefined;
|
|
134
255
|
readonly onChange?: ((href: string) => any) | undefined | undefined;
|
|
135
|
-
readonly onClick?: ((e: MouseEvent, href
|
|
256
|
+
readonly onClick?: ((e: MouseEvent, href
|
|
257
|
+
/**
|
|
258
|
+
* TabsTile —— TabsMain 平铺(tile)模式渲染分支(仅 TabsMain 内部经 `v-if=tile` 消费,不对外单独发布)。
|
|
259
|
+
*
|
|
260
|
+
* 平铺:所有 tab item 同时铺开成一列卡片(各裹 ElCard、标题进卡头),隐藏 tab-bar,改由角落 nav 导航。
|
|
261
|
+
* - 导航 + scrollspy + 聚焦滚动全托付 **ElAnchor**:点 nav 平滑滚到卡(ElAnchor rAF animateScrollTo,
|
|
262
|
+
* 不被组件重渲染打断——手写原生 `scrollIntoView({behavior:"smooth"})` 经 v-model 回流重渲染会被打断);
|
|
263
|
+
* 手动滚 → ElAnchor `@change` 反写激活 tab(内建 isScrolling 闸,程序化滚动期不抖动)。
|
|
264
|
+
* - 卡片挂稳定 DOM id(`paneId`,锚点靶),ElAnchorLink `href="#id"`。model ↔ 锚点双向:
|
|
265
|
+
* `@change`(scrollspy)→ 写 model;model 外部变(深链 / 父程序化)→ `anchorRef.scrollTo` 程序化定位。
|
|
266
|
+
* `fromAnchor` 闸区分二者,避免 scrollspy 反写又触发回滚。
|
|
267
|
+
* - 滚动模型跟 refine:refine=true → 卡片在有界容器(高 = channel 视口可用高度)内滚,ElAnchor container
|
|
268
|
+
* 指向该容器;refine=false → 页面滚(container=window)。nav 角落定位(navMode/navPosition)是本组件自有壳。
|
|
269
|
+
* - 槽转发沿用 TabsMain 既有中转:内容 `#{key}` / 标题 `#header-{key}`,优先级同非平铺路径。
|
|
270
|
+
*
|
|
271
|
+
* 与 TabsMain 非平铺路径(TabsRefineFlow/NaturalFlow + TabPane + KeepAlive 单 pane)是平行分支:
|
|
272
|
+
* 平铺全渲染所有卡(弃 KeepAlive、all mount),故内容槽 scope 不带 viewportHeight(每卡独立自然流,
|
|
273
|
+
* 无单一"可用视口高度"语义)。
|
|
274
|
+
*/
|
|
275
|
+
?: string | undefined) => any) | undefined | undefined;
|
|
136
276
|
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps;
|
|
137
277
|
$attrs: import('vue').Attrs;
|
|
138
278
|
$refs: {
|
|
@@ -148,12 +288,69 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps,
|
|
|
148
288
|
$el: any;
|
|
149
289
|
$options: import('vue').ComponentOptionsBase<Readonly<import('element-plus').AnchorProps> & Readonly<{
|
|
150
290
|
onChange?: ((href: string) => any) | undefined;
|
|
151
|
-
onClick?: ((e: MouseEvent, href
|
|
291
|
+
onClick?: ((e: MouseEvent, href
|
|
292
|
+
/**
|
|
293
|
+
* TabsTile —— TabsMain 平铺(tile)模式渲染分支(仅 TabsMain 内部经 `v-if=tile` 消费,不对外单独发布)。
|
|
294
|
+
*
|
|
295
|
+
* 平铺:所有 tab item 同时铺开成一列卡片(各裹 ElCard、标题进卡头),隐藏 tab-bar,改由角落 nav 导航。
|
|
296
|
+
* - 导航 + scrollspy + 聚焦滚动全托付 **ElAnchor**:点 nav 平滑滚到卡(ElAnchor rAF animateScrollTo,
|
|
297
|
+
* 不被组件重渲染打断——手写原生 `scrollIntoView({behavior:"smooth"})` 经 v-model 回流重渲染会被打断);
|
|
298
|
+
* 手动滚 → ElAnchor `@change` 反写激活 tab(内建 isScrolling 闸,程序化滚动期不抖动)。
|
|
299
|
+
* - 卡片挂稳定 DOM id(`paneId`,锚点靶),ElAnchorLink `href="#id"`。model ↔ 锚点双向:
|
|
300
|
+
* `@change`(scrollspy)→ 写 model;model 外部变(深链 / 父程序化)→ `anchorRef.scrollTo` 程序化定位。
|
|
301
|
+
* `fromAnchor` 闸区分二者,避免 scrollspy 反写又触发回滚。
|
|
302
|
+
* - 滚动模型跟 refine:refine=true → 卡片在有界容器(高 = channel 视口可用高度)内滚,ElAnchor container
|
|
303
|
+
* 指向该容器;refine=false → 页面滚(container=window)。nav 角落定位(navMode/navPosition)是本组件自有壳。
|
|
304
|
+
* - 槽转发沿用 TabsMain 既有中转:内容 `#{key}` / 标题 `#header-{key}`,优先级同非平铺路径。
|
|
305
|
+
*
|
|
306
|
+
* 与 TabsMain 非平铺路径(TabsRefineFlow/NaturalFlow + TabPane + KeepAlive 单 pane)是平行分支:
|
|
307
|
+
* 平铺全渲染所有卡(弃 KeepAlive、all mount),故内容槽 scope 不带 viewportHeight(每卡独立自然流,
|
|
308
|
+
* 无单一"可用视口高度"语义)。
|
|
309
|
+
*/
|
|
310
|
+
?: string | undefined) => any) | undefined;
|
|
152
311
|
}>, {
|
|
153
|
-
scrollTo: (href
|
|
312
|
+
scrollTo: (href
|
|
313
|
+
/**
|
|
314
|
+
* TabsTile —— TabsMain 平铺(tile)模式渲染分支(仅 TabsMain 内部经 `v-if=tile` 消费,不对外单独发布)。
|
|
315
|
+
*
|
|
316
|
+
* 平铺:所有 tab item 同时铺开成一列卡片(各裹 ElCard、标题进卡头),隐藏 tab-bar,改由角落 nav 导航。
|
|
317
|
+
* - 导航 + scrollspy + 聚焦滚动全托付 **ElAnchor**:点 nav 平滑滚到卡(ElAnchor rAF animateScrollTo,
|
|
318
|
+
* 不被组件重渲染打断——手写原生 `scrollIntoView({behavior:"smooth"})` 经 v-model 回流重渲染会被打断);
|
|
319
|
+
* 手动滚 → ElAnchor `@change` 反写激活 tab(内建 isScrolling 闸,程序化滚动期不抖动)。
|
|
320
|
+
* - 卡片挂稳定 DOM id(`paneId`,锚点靶),ElAnchorLink `href="#id"`。model ↔ 锚点双向:
|
|
321
|
+
* `@change`(scrollspy)→ 写 model;model 外部变(深链 / 父程序化)→ `anchorRef.scrollTo` 程序化定位。
|
|
322
|
+
* `fromAnchor` 闸区分二者,避免 scrollspy 反写又触发回滚。
|
|
323
|
+
* - 滚动模型跟 refine:refine=true → 卡片在有界容器(高 = channel 视口可用高度)内滚,ElAnchor container
|
|
324
|
+
* 指向该容器;refine=false → 页面滚(container=window)。nav 角落定位(navMode/navPosition)是本组件自有壳。
|
|
325
|
+
* - 槽转发沿用 TabsMain 既有中转:内容 `#{key}` / 标题 `#header-{key}`,优先级同非平铺路径。
|
|
326
|
+
*
|
|
327
|
+
* 与 TabsMain 非平铺路径(TabsRefineFlow/NaturalFlow + TabPane + KeepAlive 单 pane)是平行分支:
|
|
328
|
+
* 平铺全渲染所有卡(弃 KeepAlive、all mount),故内容槽 scope 不带 viewportHeight(每卡独立自然流,
|
|
329
|
+
* 无单一"可用视口高度"语义)。
|
|
330
|
+
*/
|
|
331
|
+
?: string) => void;
|
|
154
332
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
155
333
|
change: (href: string) => void;
|
|
156
|
-
click: (e: MouseEvent, href
|
|
334
|
+
click: (e: MouseEvent, href
|
|
335
|
+
/**
|
|
336
|
+
* TabsTile —— TabsMain 平铺(tile)模式渲染分支(仅 TabsMain 内部经 `v-if=tile` 消费,不对外单独发布)。
|
|
337
|
+
*
|
|
338
|
+
* 平铺:所有 tab item 同时铺开成一列卡片(各裹 ElCard、标题进卡头),隐藏 tab-bar,改由角落 nav 导航。
|
|
339
|
+
* - 导航 + scrollspy + 聚焦滚动全托付 **ElAnchor**:点 nav 平滑滚到卡(ElAnchor rAF animateScrollTo,
|
|
340
|
+
* 不被组件重渲染打断——手写原生 `scrollIntoView({behavior:"smooth"})` 经 v-model 回流重渲染会被打断);
|
|
341
|
+
* 手动滚 → ElAnchor `@change` 反写激活 tab(内建 isScrolling 闸,程序化滚动期不抖动)。
|
|
342
|
+
* - 卡片挂稳定 DOM id(`paneId`,锚点靶),ElAnchorLink `href="#id"`。model ↔ 锚点双向:
|
|
343
|
+
* `@change`(scrollspy)→ 写 model;model 外部变(深链 / 父程序化)→ `anchorRef.scrollTo` 程序化定位。
|
|
344
|
+
* `fromAnchor` 闸区分二者,避免 scrollspy 反写又触发回滚。
|
|
345
|
+
* - 滚动模型跟 refine:refine=true → 卡片在有界容器(高 = channel 视口可用高度)内滚,ElAnchor container
|
|
346
|
+
* 指向该容器;refine=false → 页面滚(container=window)。nav 角落定位(navMode/navPosition)是本组件自有壳。
|
|
347
|
+
* - 槽转发沿用 TabsMain 既有中转:内容 `#{key}` / 标题 `#header-{key}`,优先级同非平铺路径。
|
|
348
|
+
*
|
|
349
|
+
* 与 TabsMain 非平铺路径(TabsRefineFlow/NaturalFlow + TabPane + KeepAlive 单 pane)是平行分支:
|
|
350
|
+
* 平铺全渲染所有卡(弃 KeepAlive、all mount),故内容槽 scope 不带 viewportHeight(每卡独立自然流,
|
|
351
|
+
* 无单一"可用视口高度"语义)。
|
|
352
|
+
*/
|
|
353
|
+
?: string | undefined) => void;
|
|
157
354
|
}, string, {
|
|
158
355
|
offset: number;
|
|
159
356
|
type: "default" | "underline";
|
|
@@ -190,9 +387,47 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps,
|
|
|
190
387
|
bound: number;
|
|
191
388
|
}> & Omit<Readonly<import('element-plus').AnchorProps> & Readonly<{
|
|
192
389
|
onChange?: ((href: string) => any) | undefined;
|
|
193
|
-
onClick?: ((e: MouseEvent, href
|
|
390
|
+
onClick?: ((e: MouseEvent, href
|
|
391
|
+
/**
|
|
392
|
+
* TabsTile —— TabsMain 平铺(tile)模式渲染分支(仅 TabsMain 内部经 `v-if=tile` 消费,不对外单独发布)。
|
|
393
|
+
*
|
|
394
|
+
* 平铺:所有 tab item 同时铺开成一列卡片(各裹 ElCard、标题进卡头),隐藏 tab-bar,改由角落 nav 导航。
|
|
395
|
+
* - 导航 + scrollspy + 聚焦滚动全托付 **ElAnchor**:点 nav 平滑滚到卡(ElAnchor rAF animateScrollTo,
|
|
396
|
+
* 不被组件重渲染打断——手写原生 `scrollIntoView({behavior:"smooth"})` 经 v-model 回流重渲染会被打断);
|
|
397
|
+
* 手动滚 → ElAnchor `@change` 反写激活 tab(内建 isScrolling 闸,程序化滚动期不抖动)。
|
|
398
|
+
* - 卡片挂稳定 DOM id(`paneId`,锚点靶),ElAnchorLink `href="#id"`。model ↔ 锚点双向:
|
|
399
|
+
* `@change`(scrollspy)→ 写 model;model 外部变(深链 / 父程序化)→ `anchorRef.scrollTo` 程序化定位。
|
|
400
|
+
* `fromAnchor` 闸区分二者,避免 scrollspy 反写又触发回滚。
|
|
401
|
+
* - 滚动模型跟 refine:refine=true → 卡片在有界容器(高 = channel 视口可用高度)内滚,ElAnchor container
|
|
402
|
+
* 指向该容器;refine=false → 页面滚(container=window)。nav 角落定位(navMode/navPosition)是本组件自有壳。
|
|
403
|
+
* - 槽转发沿用 TabsMain 既有中转:内容 `#{key}` / 标题 `#header-{key}`,优先级同非平铺路径。
|
|
404
|
+
*
|
|
405
|
+
* 与 TabsMain 非平铺路径(TabsRefineFlow/NaturalFlow + TabPane + KeepAlive 单 pane)是平行分支:
|
|
406
|
+
* 平铺全渲染所有卡(弃 KeepAlive、all mount),故内容槽 scope 不带 viewportHeight(每卡独立自然流,
|
|
407
|
+
* 无单一"可用视口高度"语义)。
|
|
408
|
+
*/
|
|
409
|
+
?: string | undefined) => any) | undefined;
|
|
194
410
|
}>, "type" | "marker" | "offset" | "bound" | "duration" | "direction" | "scrollTo"> & {
|
|
195
|
-
scrollTo: (href
|
|
411
|
+
scrollTo: (href
|
|
412
|
+
/**
|
|
413
|
+
* TabsTile —— TabsMain 平铺(tile)模式渲染分支(仅 TabsMain 内部经 `v-if=tile` 消费,不对外单独发布)。
|
|
414
|
+
*
|
|
415
|
+
* 平铺:所有 tab item 同时铺开成一列卡片(各裹 ElCard、标题进卡头),隐藏 tab-bar,改由角落 nav 导航。
|
|
416
|
+
* - 导航 + scrollspy + 聚焦滚动全托付 **ElAnchor**:点 nav 平滑滚到卡(ElAnchor rAF animateScrollTo,
|
|
417
|
+
* 不被组件重渲染打断——手写原生 `scrollIntoView({behavior:"smooth"})` 经 v-model 回流重渲染会被打断);
|
|
418
|
+
* 手动滚 → ElAnchor `@change` 反写激活 tab(内建 isScrolling 闸,程序化滚动期不抖动)。
|
|
419
|
+
* - 卡片挂稳定 DOM id(`paneId`,锚点靶),ElAnchorLink `href="#id"`。model ↔ 锚点双向:
|
|
420
|
+
* `@change`(scrollspy)→ 写 model;model 外部变(深链 / 父程序化)→ `anchorRef.scrollTo` 程序化定位。
|
|
421
|
+
* `fromAnchor` 闸区分二者,避免 scrollspy 反写又触发回滚。
|
|
422
|
+
* - 滚动模型跟 refine:refine=true → 卡片在有界容器(高 = channel 视口可用高度)内滚,ElAnchor container
|
|
423
|
+
* 指向该容器;refine=false → 页面滚(container=window)。nav 角落定位(navMode/navPosition)是本组件自有壳。
|
|
424
|
+
* - 槽转发沿用 TabsMain 既有中转:内容 `#{key}` / 标题 `#header-{key}`,优先级同非平铺路径。
|
|
425
|
+
*
|
|
426
|
+
* 与 TabsMain 非平铺路径(TabsRefineFlow/NaturalFlow + TabPane + KeepAlive 单 pane)是平行分支:
|
|
427
|
+
* 平铺全渲染所有卡(弃 KeepAlive、all mount),故内容槽 scope 不带 viewportHeight(每卡独立自然流,
|
|
428
|
+
* 无单一"可用视口高度"语义)。
|
|
429
|
+
*/
|
|
430
|
+
?: string) => void;
|
|
196
431
|
} & {} & import('vue').ComponentCustomProperties & {} & {
|
|
197
432
|
$slots: {
|
|
198
433
|
default?: (props: {}) => any;
|
|
@@ -1,6 +1,15 @@
|
|
|
1
1
|
type __VLS_Props = {
|
|
2
2
|
mode?: "height" | "width" | "both";
|
|
3
|
+
/**
|
|
4
|
+
* 是否用 ResizeObserver 观测自身盒尺寸(默认 false)。
|
|
5
|
+
* 默认时机 = 激活首测 + window resize + onUpdated(激活态重渲染补测)——已覆盖
|
|
6
|
+
* 「伴随本组件重渲染的尺寸变化」(v-if / 响应式样式 / 槽内容随父状态变化等常规场景)。
|
|
7
|
+
* 测不到「不触发本组件重渲染的尺寸变化」:内容 CSS 过渡(如侧栏折叠动画,onUpdated
|
|
8
|
+
* 读到过渡起点漏终值)、异步内容撑开、槽内后代组件自更新——此类场景显式开启 RO
|
|
9
|
+
* (AppPage 四向槽已内置开启,右槽 CSS 过渡折叠不重算即此坑)。
|
|
10
|
+
*/
|
|
3
11
|
observeResize?: boolean;
|
|
12
|
+
/** 防抖时间(默认 16ms)。只接受初始值,后面变化不更新。 */
|
|
4
13
|
debounceTime?: number;
|
|
5
14
|
};
|
|
6
15
|
declare function __VLS_template(): {
|
|
@@ -5,5 +5,41 @@ import { default as ActionBtn } from './ActionBtn.vue';
|
|
|
5
5
|
import { default as ActionConfirm } from './ActionConfirm.vue';
|
|
6
6
|
import { default as ActionBtnGroup } from './ActionBtnGroup.vue';
|
|
7
7
|
import { default as BooleanTag } from './BooleanTag.vue';
|
|
8
|
-
export {
|
|
8
|
+
export {
|
|
9
|
+
/** 尺寸监听容器:debounce 测默认槽内容宽/高,派发 `@height-change` / `@size-change` */
|
|
10
|
+
WatchSize,
|
|
11
|
+
/**
|
|
12
|
+
* Tab 容器:手写 tab-bar + 滑动下划线 + 懒渲染 KeepAlive。
|
|
13
|
+
* 嵌套联动用 `channel="x"` / `parentChannel="x"` 字符串显式配对([MUST NOT] 响应式)。
|
|
14
|
+
*/
|
|
15
|
+
TabsMain,
|
|
16
|
+
/**
|
|
17
|
+
* 纯数值高度预算节点:`available = max(viewportHeight - reserve, minHeight ?? 0)`,
|
|
18
|
+
* 默认槽 `{ height }` 暴露。Fragment 双根,不撑开自身,不 inject 不 provide。
|
|
19
|
+
* 消费方 [MUST] 用 slot scope `:height` 自设容器高。
|
|
20
|
+
*/
|
|
21
|
+
HeightProvider,
|
|
22
|
+
/**
|
|
23
|
+
* ElButton 超集按钮原语:透传全 ElButton props + 默认槽 label + `confirmConfig`
|
|
24
|
+
* 确认闸门 + `beforeOpen` 异步预取 + onClick 返 Promise 自动 loading(内部接管)。
|
|
25
|
+
*/
|
|
26
|
+
ActionBtn,
|
|
27
|
+
/**
|
|
28
|
+
* confirm 原语(扁平,可独立于 ActionBtn 消费):触发元素由默认 slot 提供,
|
|
29
|
+
* 弹层可见性 `v-model:show` 声明式驱动;`submitFn` 返 Promise 时仅成功才关弹层。
|
|
30
|
+
*/
|
|
31
|
+
ActionConfirm,
|
|
32
|
+
/**
|
|
33
|
+
* 配置式按钮组(泛型 Ctx 由消费方决定形状)。
|
|
34
|
+
* - 二选一渲染:`actionBtnProps`(走 ActionBtn 带 confirm/beforeOpen)优先 / `props`(走 ElButton)。
|
|
35
|
+
* - `render` 对标 FormItem.render 三态:string | Component | (props:{ctx})=>VNode。
|
|
36
|
+
* - `show` 函数过滤;`defaultSize` 给基础 size,业务侧显式 size 优先。
|
|
37
|
+
* - 典型消费:TableMain.toolbar 内置 / 表格 OPERATE 列(BL-5 推广)。
|
|
38
|
+
*/
|
|
39
|
+
ActionBtnGroup,
|
|
40
|
+
/**
|
|
41
|
+
* boolean 只读展示为彩色标签(纯展示,无交互):`value` → active/inactive 文本 + ElTag 色彩。
|
|
42
|
+
* 编辑布尔用 ElSwitch;[MUST NOT] 给展示标签挂 onClick toggle 改数据(展示≠编辑,详见 paradigm §9)。
|
|
43
|
+
*/
|
|
44
|
+
BooleanTag, };
|
|
9
45
|
export * from './types';
|
|
@@ -1,78 +1,241 @@
|
|
|
1
1
|
import { Component, VNode } from 'vue';
|
|
2
2
|
import { ButtonProps, TagProps } from 'element-plus';
|
|
3
|
+
/** ActionConfirm 确认交互形态:弹层气泡 / 居中模态框 */
|
|
3
4
|
export type ActionConfirmMode = "popconfirm" | "messageConfirm";
|
|
5
|
+
/**
|
|
6
|
+
* ActionConfirm 文案解析器。
|
|
7
|
+
* - string:直接渲染
|
|
8
|
+
* - 无参函数:返回字符串或 VNode 数组(富文本);动态数据由调用方闭包捕获
|
|
9
|
+
*/
|
|
4
10
|
export type ActionConfirmTextResolver = string | (() => string | VNode[]);
|
|
11
|
+
/**
|
|
12
|
+
* ActionBtn 的确认配置(嵌套对象;无此配置则为普通按钮,不触发确认)。
|
|
13
|
+
*
|
|
14
|
+
* ⚠️ 瞬时用户激活限制:`confirmConfig` 与 `beforeOpen` 均会异步打断点击的瞬时
|
|
15
|
+
* 用户激活窗口(transient user activation)——confirm 后 / beforeOpen 之后的
|
|
16
|
+
* handler 与原始点击之间隔了一次异步等待,原始激活此时已过期(注意:事件对象
|
|
17
|
+
* `isTrusted` 仍为 true,失效的是激活窗口而非事件本身)。故 confirm 后 /
|
|
18
|
+
* beforeOpen 之后的 handler [MUST NOT] 调用依赖瞬时用户激活的 API——
|
|
19
|
+
* `window.open`、`navigator.clipboard.*`、`requestFullscreen` 等会被浏览器
|
|
20
|
+
* 拦截。需要这类操作时改用无 `confirmConfig` 且无 `beforeOpen` 的 ActionBtn /
|
|
21
|
+
* 普通按钮。此为 confirm-gate / async-prefetch 模式固有代价,组件层无法绕过。
|
|
22
|
+
*/
|
|
5
23
|
export interface ActionBtnConfirmConfig {
|
|
24
|
+
/** 确认标题 */
|
|
6
25
|
title?: ActionConfirmTextResolver;
|
|
26
|
+
/** 确认正文内容 */
|
|
7
27
|
content?: ActionConfirmTextResolver;
|
|
28
|
+
/** 确认按钮文案,默认"确定" */
|
|
8
29
|
confirmText?: string;
|
|
30
|
+
/** 取消按钮文案,默认"取消" */
|
|
9
31
|
cancelText?: string;
|
|
32
|
+
/** 确认按钮 type */
|
|
10
33
|
type?: ButtonProps["type"];
|
|
11
34
|
}
|
|
35
|
+
/**
|
|
36
|
+
* ActionBtn 组件 props。
|
|
37
|
+
* 完全兼容 ElButton(继承 ButtonProps),仅一处改写 + 三个增量:
|
|
38
|
+
* - `loading` 被 Omit:有意的 ElButton 不兼容,唯一接管项——loading 由组件内部
|
|
39
|
+
* 独占,对接异步 confirm / beforeOpen 的进行态(innerLoading),对外不可设置。
|
|
40
|
+
* - `disabled` 原生透传,不改写不扩展。
|
|
41
|
+
* - 增量:`confirmMode` / `confirmConfig` / `beforeOpen`。
|
|
42
|
+
* - 泛型 `T`:由 `beforeOpen` 返回值反推,并透传给 `confirmConfig` 函数形态的
|
|
43
|
+
* 入参;未传 `beforeOpen` 时默认 `T = void`,函数形态的 `data = undefined`。
|
|
44
|
+
*/
|
|
12
45
|
export type ActionBtnProps<T = void> = Omit<ButtonProps, "loading"> & {
|
|
46
|
+
/** 确认交互形态,仅在 confirmConfig 存在时生效,默认 "popconfirm" */
|
|
13
47
|
confirmMode?: ActionConfirmMode;
|
|
48
|
+
/**
|
|
49
|
+
* 确认配置;存在时点击需经确认闸门,确认后才触发 click。
|
|
50
|
+
* - 对象形态:静态确认配置(向后兼容)。
|
|
51
|
+
* - 函数形态:`(data: T) => ActionBtnConfirmConfig`,`data` 来自 `beforeOpen`
|
|
52
|
+
* 返回值;无 `beforeOpen` 时 `data = undefined`(T 默认 `void`)。
|
|
53
|
+
*/
|
|
14
54
|
confirmConfig?: ActionBtnConfirmConfig | ((data: T) => ActionBtnConfirmConfig);
|
|
55
|
+
/**
|
|
56
|
+
* 点击后、弹层前的异步预取钩子。
|
|
57
|
+
* - 返回值类型 `T` 反推给 `confirmConfig` 函数形态的入参。
|
|
58
|
+
* - 失败时静默退出(不弹层、不触发 `@click` handler);调用方 [MUST] 在内部
|
|
59
|
+
* 自行 catch 并显示反馈(如 `ElMessage.error`),忘记 catch 会"点了没反应"。
|
|
60
|
+
* - 期间按钮显 loading 态(`innerLoading`);同 `confirmConfig` 一样消耗
|
|
61
|
+
* 瞬时用户激活(详见 {@link ActionBtnConfirmConfig} 顶部注释)。
|
|
62
|
+
*/
|
|
15
63
|
beforeOpen?: () => Promise<T>;
|
|
16
64
|
};
|
|
65
|
+
/**
|
|
66
|
+
* ActionConfirm 组件 props(扁平,confirm 原语;可独立于 ActionBtn 消费)。
|
|
67
|
+
* 触发元素由默认 slot 提供;弹层可见性由 `v-model:show` 声明式驱动。
|
|
68
|
+
*/
|
|
17
69
|
export interface ActionConfirmProps {
|
|
70
|
+
/** 确认交互形态 */
|
|
18
71
|
mode: ActionConfirmMode;
|
|
72
|
+
/** 确认标题 */
|
|
19
73
|
title?: ActionConfirmTextResolver;
|
|
74
|
+
/** 确认正文内容 */
|
|
20
75
|
content?: ActionConfirmTextResolver;
|
|
76
|
+
/** 确认按钮文案,默认"确定" */
|
|
21
77
|
confirmText?: string;
|
|
78
|
+
/** 取消按钮文案,默认"取消" */
|
|
22
79
|
cancelText?: string;
|
|
80
|
+
/** 确认按钮 type */
|
|
23
81
|
type?: ButtonProps["type"];
|
|
82
|
+
/**
|
|
83
|
+
* 点击确认后调用。返回 Promise 时确认按钮 loading + 弹层保持不关,
|
|
84
|
+
* **仅成功(fulfill)才关闭弹层**;失败(reject 或同步 throw)时清 loading、
|
|
85
|
+
* 弹层保持打开,错误由 `submitFn` 内部自行 catch 反馈。
|
|
86
|
+
*/
|
|
24
87
|
submitFn: () => void | Promise<void>;
|
|
25
88
|
}
|
|
89
|
+
/** ActionBtnGroup 按钮 size 枚举(对齐 element-plus ElButton size) */
|
|
26
90
|
export type ActionBtnSize = "large" | "default" | "small";
|
|
91
|
+
/**
|
|
92
|
+
* ActionBtnGroup 单项配置
|
|
93
|
+
* ---
|
|
94
|
+
* 泛型 Ctx 由消费方决定形状(toolbar 传 ToolbarButtonContext / 表格 OPERATE 列传 row 上下文 / 等)。
|
|
95
|
+
* 与 FormItem.render 三态对标:string(全局组件名)/ Component(对象/异步)/ functional((props) => VNode)。
|
|
96
|
+
*/
|
|
27
97
|
export interface ActionBtnConfigItem<Ctx = void> {
|
|
98
|
+
/** 唯一标识 */
|
|
28
99
|
key: string;
|
|
100
|
+
/** ActionBtn props 工厂(含 confirmConfig / beforeOpen / ElButton 全透传),与 props 二选一优先 */
|
|
29
101
|
actionBtnProps?: (ctx: Ctx) => Record<string, any>;
|
|
102
|
+
/** ElButton props 工厂,与 actionBtnProps 二选一 */
|
|
30
103
|
props?: (ctx: Ctx) => Record<string, any>;
|
|
104
|
+
/** 按钮文字;render 缺省时回退 */
|
|
31
105
|
label?: string;
|
|
106
|
+
/**
|
|
107
|
+
* 按钮内容 render(对标 FormItem.render 三态);优先级高于 label。
|
|
108
|
+
* - string:全局注册组件名
|
|
109
|
+
* - Component:对象/异步组件
|
|
110
|
+
* - functional:`(props: { ctx }) => VNode`——通过 `:ctx` prop 拿到上下文
|
|
111
|
+
*/
|
|
32
112
|
render?: string | Component | ((props: {
|
|
33
113
|
ctx: Ctx;
|
|
34
114
|
}) => VNode);
|
|
115
|
+
/** 显示条件,返回 false 跳过该项;缺省视为 true */
|
|
35
116
|
show?: (ctx: Ctx) => boolean;
|
|
36
117
|
}
|
|
118
|
+
/** ActionBtnGroup props */
|
|
37
119
|
export interface ActionBtnGroupProps<Ctx = void> {
|
|
120
|
+
/** 按钮配置列表 */
|
|
38
121
|
configs?: ActionBtnConfigItem<Ctx>[];
|
|
122
|
+
/** 渲染上下文(透传给每项 actionBtnProps / props / render / show) */
|
|
39
123
|
ctx: Ctx;
|
|
124
|
+
/**
|
|
125
|
+
* 默认按钮 size——未传时不强加 size(沿用 ElButton 自身默认);
|
|
126
|
+
* 传入时作为基础 size 注入每项,业务侧 actionBtnProps / props 返回对象内显式 size 优先。
|
|
127
|
+
*/
|
|
40
128
|
defaultSize?: ActionBtnSize;
|
|
41
129
|
}
|
|
130
|
+
/** HeightProvider props——见组件 JSDoc */
|
|
42
131
|
export interface HeightProviderProps {
|
|
132
|
+
/** px,视口可用高度(必填) */
|
|
43
133
|
viewportHeight: number;
|
|
134
|
+
/** px,默认槽可用高度兜底下限;超 viewportHeight 时会撑破父容器(有意设计) */
|
|
44
135
|
minHeight?: number;
|
|
45
136
|
}
|
|
137
|
+
/** TabsMain 单个 tab 项配置 */
|
|
46
138
|
export interface TabsMainItem {
|
|
139
|
+
/** 唯一标识,v-model 值与槽名(#{key} / #header-{key})以此为准 */
|
|
47
140
|
key: string;
|
|
141
|
+
/** 标题文本,#header-{key} 槽缺省时回退 */
|
|
48
142
|
title: string;
|
|
143
|
+
/** 内容组件,#{key} 槽缺省时回退渲染 */
|
|
49
144
|
component?: Component;
|
|
50
145
|
}
|
|
146
|
+
/** [top, right, bottom, left] px——TabsMain 默认插槽容器内置 padding(top+bottom 同步从 channel viewportHeight 扣减) */
|
|
51
147
|
export type TabsMainPadding = [number, number, number, number];
|
|
148
|
+
/**
|
|
149
|
+
* TabsHeader 视觉风格变体(与 level 字号解耦)。
|
|
150
|
+
* - card:浏览器 tabs 风格(active 三面 border + 两侧 100vw separator,真打通)
|
|
151
|
+
* - indicator:标准 2px 下划线
|
|
152
|
+
* - indicator-compact:紧凑 1px 下划线
|
|
153
|
+
* - plain:无装饰(active 加粗 + primary 字色)
|
|
154
|
+
*/
|
|
52
155
|
export type TabsHeaderVariant = "card" | "indicator" | "indicator-compact" | "plain";
|
|
156
|
+
/**
|
|
157
|
+
* 平铺(tile)模式角落 nav 的落角。
|
|
158
|
+
* 四角由 `bottom/top` × `left/right` 组合,配合 `navOffset` 距角像素。
|
|
159
|
+
*/
|
|
53
160
|
export type TabsMainTileNavPosition = "bottom-right" | "bottom-left" | "top-right" | "top-left";
|
|
161
|
+
/**
|
|
162
|
+
* 平铺(tile)模式角落 nav 的定位模式。
|
|
163
|
+
* - `absolute`:相对 TabsTile 根定位——内层滚、nav 不动留在根的角(有界滚动容器最干净)。
|
|
164
|
+
* - `sticky`:`position:sticky` 贴滚动视口角——页面滚时粘在 TabsMain 列内的角(不先入为主接管整个视口)。
|
|
165
|
+
* - `fixed`:相对**视口**角(消费方显式要才用的逃生口)。
|
|
166
|
+
* - `auto`(默认):`refine=true`→`absolute`;`refine=false`→`sticky`。
|
|
167
|
+
*/
|
|
54
168
|
export type TabsMainTileNavMode = "auto" | "absolute" | "sticky" | "fixed";
|
|
169
|
+
/**
|
|
170
|
+
* TabsMain props。
|
|
171
|
+
*
|
|
172
|
+
* 高度优先级:viewportHeight > inject `SCOPE_VIEWPORT_MAX_HEIGHT` scope 链(parentChannel 定向 / 就近)> 0。
|
|
173
|
+
* channel / parentChannel [MUST NOT] 响应式变更(setup 期快照,变更 console.error 忽略)。
|
|
174
|
+
*/
|
|
55
175
|
export interface TabsMainProps {
|
|
176
|
+
/** tab 配置列表 */
|
|
56
177
|
tabs: TabsMainItem[];
|
|
178
|
+
/** px,视口可用高度(显式指定,优先级最高);未传时降级 SCOPE_VIEWPORT_MAX_HEIGHT scope 链 */
|
|
57
179
|
viewportHeight?: number;
|
|
180
|
+
/** px,默认内容区高度兜底下限 */
|
|
58
181
|
minHeight?: number;
|
|
182
|
+
/** 作为父时的 scope 标识(进 SCOPE_VIEWPORT_MAX_HEIGHT 对象链的 scope 字段) */
|
|
59
183
|
channel?: string;
|
|
184
|
+
/** 作为子时要定向消费的祖先 scope 标识(沿对象链 parent 找 scope === parentChannel) */
|
|
60
185
|
parentChannel?: string;
|
|
186
|
+
/** 默认插槽容器内置 padding [top,right,bottom,left],默认 [10,0,0,0];top+bottom 同步从 slot scope/channel viewportHeight 扣减 */
|
|
61
187
|
padding?: TabsMainPadding;
|
|
188
|
+
/** 精细化布局:false(默认) 不包 HeightProvider,默认槽 viewportHeight 直接给 viewportHeightFinal(不扣减),业务自然流;true 走 HeightProvider 精确扣 header reserve + padding 给 available */
|
|
62
189
|
refine?: boolean;
|
|
190
|
+
/** 精细化预留高度(px),从 viewportHeightFinal 中预扣,refine=false 时同样生效 */
|
|
63
191
|
refineReduceHeight?: number;
|
|
192
|
+
/** 显式指定 TabsHeader 视觉风格,不传则按 visualLevel 推导默认(L1=card / L2=indicator / L3=indicator-compact / L4=plain)。字号始终跟随 level,不受 variant 影响。 */
|
|
64
193
|
variant?: TabsHeaderVariant;
|
|
194
|
+
/**
|
|
195
|
+
* 把当前激活 tab(v-model)同步到路由 URL query 的 key 名。
|
|
196
|
+
* - 传了即启用**双向同步**:切 tab → `router.replace` 写 `?{queryKey}={tab.key}`(不压历史栈、只增删自己这个 key、不动其它 query);
|
|
197
|
+
* 进入/刷新/前进后退 → query 反向恢复激活 tab。
|
|
198
|
+
* - 不传(默认)→ 不同步。
|
|
199
|
+
* - 无 vue-router 环境(useRouter 返回 undefined)→ 静默失效,不接线。
|
|
200
|
+
* - query 值非法/无对应 tab → 交由 v-model 既有归一(回退 tabs[0]),不强写。
|
|
201
|
+
*/
|
|
65
202
|
queryKey?: string;
|
|
203
|
+
/**
|
|
204
|
+
* 平铺模式:把所有 tab item 同时铺开成一列卡片(各裹 ElCard、标题进卡头),隐藏 tab-bar,
|
|
205
|
+
* 改由角落 nav 导航;聚焦(v-model / 点 nav)= 滚动该卡到视口,手动滚 = scrollspy 反写激活 tab。
|
|
206
|
+
* - 默认 `false`:tabs 路径逐字不动(平铺是 `v-if` 平行分支,不影响既有行为)。
|
|
207
|
+
* - `refine=true` 时卡片在有界容器内滚(容器高 = refine 可用高度);`refine=false` 页面滚。
|
|
208
|
+
*/
|
|
66
209
|
tile?: boolean;
|
|
210
|
+
/**
|
|
211
|
+
* 平铺模式角落 nav 落角,默认 `"bottom-right"`。仅 `tile=true` 生效。
|
|
212
|
+
*/
|
|
67
213
|
navPosition?: TabsMainTileNavPosition;
|
|
214
|
+
/**
|
|
215
|
+
* 平铺模式角落 nav 定位模式,默认 `"auto"`(refine→absolute / 自然流→sticky)。仅 `tile=true` 生效。
|
|
216
|
+
* 见 {@link TabsMainTileNavMode}。
|
|
217
|
+
*/
|
|
68
218
|
navMode?: TabsMainTileNavMode;
|
|
219
|
+
/**
|
|
220
|
+
* 平铺模式角落 nav 距角像素,默认 `12`。仅 `tile=true` 生效。
|
|
221
|
+
*/
|
|
69
222
|
navOffset?: number;
|
|
70
223
|
}
|
|
224
|
+
/** BooleanTag 标签色彩类型(派生 ElTag type,不重定义) */
|
|
71
225
|
export type BooleanTagType = NonNullable<TagProps["type"]>;
|
|
226
|
+
/**
|
|
227
|
+
* BooleanTag props——boolean 只读展示为彩色标签(纯展示,无交互 / 无 v-model)。
|
|
228
|
+
* enum / number 状态在调用点一行映射为 boolean 传入(组件保持 boolean 纯粹)。
|
|
229
|
+
*/
|
|
72
230
|
export interface BooleanTagProps {
|
|
231
|
+
/** 待展示布尔值 */
|
|
73
232
|
value: boolean;
|
|
233
|
+
/** true 时标签文本,默认「是」 */
|
|
74
234
|
activeText?: string;
|
|
235
|
+
/** false 时标签文本,默认「否」 */
|
|
75
236
|
inactiveText?: string;
|
|
237
|
+
/** true 时标签色彩(派生 ElTag type),默认 success */
|
|
76
238
|
activeTagType?: BooleanTagType;
|
|
239
|
+
/** false 时标签色彩,默认 info */
|
|
77
240
|
inactiveTagType?: BooleanTagType;
|
|
78
241
|
}
|