vft 0.0.507 → 0.0.511
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/dist/index.css +1 -1
- package/es/components/affix/affix.vue2.js +2 -2
- package/es/components/alert/alert.vue2.js +1 -1
- package/es/components/autocomplete/autocomplete.vue2.js +1 -1
- package/es/components/avatar/avatar.vue2.js +2 -2
- package/es/components/avatar-stack/avatar-stack.vue2.js +7 -7
- package/es/components/backtop/backtop.vue2.js +1 -1
- package/es/components/breadcrumb/breadcrumb-item.vue2.js +3 -3
- package/es/components/breadcrumb/breadcrumb.vue2.js +2 -2
- package/es/components/button/button-group.vue2.js +2 -2
- package/es/components/button/button.vue2.js +7 -7
- package/es/components/button/use-button.js +3 -3
- package/es/components/card/card.vue2.js +6 -6
- package/es/components/carousel/carousel-item.vue2.js +3 -3
- package/es/components/carousel/carousel.vue2.js +1 -1
- package/es/components/carousel/use-carousel.js +1 -1
- package/es/components/cascader/cascader.vue2.js +203 -202
- package/es/components/cascader-panel/index.vue2.js +1 -1
- package/es/components/cascader-panel/menu.vue2.js +50 -49
- package/es/components/cascader-panel/node.vue2.js +8 -8
- package/es/components/check-tag/check-tag.vue2.js +2 -2
- package/es/components/checkbox/checkbox-button.vue2.js +13 -13
- package/es/components/checkbox/checkbox-group.vue2.js +3 -3
- package/es/components/checkbox/checkbox.vue2.js +1 -1
- package/es/components/clamp/clamp.vue2.js +2 -2
- package/es/components/clamp-toggle/clamp-toggle.vue2.js +21 -17
- package/es/components/clamp-tooltip/clamp-tooltip.vue2.js +6 -6
- package/es/components/col/col.vue2.js +2 -2
- package/es/components/collapse/collapse-item.vue2.js +2 -2
- package/es/components/collapse/collapse.vue2.js +2 -2
- package/es/components/collapse-transition/collapse-transition.vue2.js +2 -2
- package/es/components/color-picker/color-picker.vue2.js +134 -133
- package/es/components/color-picker/components/alpha-slider.vue2.js +2 -2
- package/es/components/color-picker/components/hue-slider.vue.js +2 -2
- package/es/components/color-picker/components/predefine.vue.js +3 -3
- package/es/components/color-picker/components/sv-panel.vue.js +2 -2
- package/es/components/config-provider/config-provider.vue.d.ts +2 -0
- package/es/components/config-provider/config-provider.vue2.js +5 -4
- package/es/components/config-provider/constants.d.ts +1 -0
- package/es/components/config-provider/constants.js +3 -2
- package/es/components/config-provider/hooks/use-global-config.js +33 -30
- package/es/components/config-provider/index.d.ts +9 -0
- package/es/components/config-provider/index.js +6 -5
- package/es/components/container/aside.vue2.js +2 -2
- package/es/components/container/container.vue2.js +2 -2
- package/es/components/container/footer.vue2.js +2 -2
- package/es/components/container/header.vue2.js +2 -2
- package/es/components/container/main.vue2.js +2 -2
- package/es/components/context-menu/context-menu.vue2.js +1 -1
- package/es/components/countdown/countdown.vue2.js +2 -2
- package/es/components/date-picker/composables/use-basic-date-table.js +83 -82
- package/es/components/date-picker/composables/use-month-range-header.js +15 -14
- package/es/components/date-picker/composables/use-panel-date-range.js +24 -23
- package/es/components/date-picker/date-picker-com/basic-date-table.vue2.js +6 -6
- package/es/components/date-picker/date-picker-com/basic-month-table.vue2.js +40 -39
- package/es/components/date-picker/date-picker-com/basic-year-table.vue2.js +41 -40
- package/es/components/date-picker/date-picker-com/panel-date-pick.vue2.js +184 -183
- package/es/components/date-picker/date-picker-com/panel-date-range.vue2.js +225 -224
- package/es/components/date-picker/date-picker-com/panel-month-range.vue2.js +12 -12
- package/es/components/date-picker/date-picker-com/panel-year-range.vue2.js +12 -12
- package/es/components/date-picker/props/basic-date-table.js +3 -3
- package/es/components/date-picker/props/basic-month-table.js +3 -3
- package/es/components/date-picker/props/basic-year-table.js +3 -3
- package/es/components/date-time-select/date-time-select.vue2.js +39 -36
- package/es/components/descriptions/description.vue2.js +1 -1
- package/es/components/descriptions/descriptions-row.vue2.js +10 -10
- package/es/components/dialog/dialog-content.vue2.js +3 -3
- package/es/components/dialog/dialog.vue2.js +5 -5
- package/es/components/divider/divider.vue2.js +5 -5
- package/es/components/drawer/drawer.vue2.js +4 -4
- package/es/components/dropdown/dropdown-item-impl.vue.d.ts +1 -1
- package/es/components/dropdown/dropdown-item-impl.vue2.js +3 -3
- package/es/components/dropdown/dropdown-item.vue.d.ts +1 -1
- package/es/components/dropdown/dropdown-item.vue2.js +2 -2
- package/es/components/dropdown/dropdown-menu.vue2.js +2 -2
- package/es/components/dropdown/dropdown.vue.d.ts +1 -1
- package/es/components/dropdown/dropdown.vue2.js +68 -67
- package/es/components/dropdown/index.d.ts +33 -33
- package/es/components/empty/empty.vue2.js +39 -38
- package/es/components/footer-layout/footer-layout.vue2.js +2 -2
- package/es/components/form/form-item.vue2.js +16 -16
- package/es/components/form/form.vue2.js +2 -2
- package/es/components/full-screen/full-screen.vue2.js +18 -17
- package/es/components/header-layout/header-layout.vue2.js +1 -1
- package/es/components/horizontal-menu/horizontal-menu.vue2.js +3 -3
- package/es/components/icon/icon.vue2.js +3 -3
- package/es/components/icon-text/icon-text.vue2.js +1 -1
- package/es/components/iframe-layout/iframe-layout.vue2.js +4 -4
- package/es/components/iframe-layout/iframe-page.vue2.js +2 -2
- package/es/components/image/image.vue2.js +60 -59
- package/es/components/image-viewer/image-viewer.vue2.js +43 -42
- package/es/components/index.d.ts +1 -0
- package/es/components/index.js +214 -210
- package/es/components/input/input.vue2.js +2 -2
- package/es/components/input-number/input-number.vue2.js +4 -4
- package/es/components/input-tag/composables/use-input-tag.js +1 -1
- package/es/components/input-tag/input-tag.vue2.js +7 -7
- package/es/components/link/link.vue2.js +1 -1
- package/es/components/list-cell/list-cell.vue2.js +1 -1
- package/es/components/logo/logo.vue2.js +10 -10
- package/es/components/md-comment/md-comment.vue2.js +2 -2
- package/es/components/md-container/md-container.vue2.js +75 -74
- package/es/components/md-container/toc.js +37 -36
- package/es/components/menu/menu-collapse-transition.vue.js +2 -2
- package/es/components/menu/menu-item-group.vue2.js +7 -7
- package/es/components/menu/menu-item.vue2.js +1 -1
- package/es/components/message/message.vue2.js +3 -3
- package/es/components/message-box/index.d.ts +4 -0
- package/es/components/message-box/index.js +14 -0
- package/es/components/message-box/message-box.vue.d.ts +103 -0
- package/es/components/message-box/message-box.vue.js +4 -0
- package/es/components/message-box/message-box.vue2.js +358 -0
- package/es/components/message-box/method.d.ts +3 -0
- package/es/components/message-box/method.js +101 -0
- package/es/components/message-box/style/css.d.ts +2 -0
- package/es/components/message-box/style/css.js +3 -0
- package/es/components/message-box/style/index.d.ts +2 -0
- package/es/components/message-box/style/index.js +3 -0
- package/es/components/message-box/types.d.ts +202 -0
- package/es/components/message-box/types.js +1 -0
- package/es/components/modal/index.d.ts +1 -0
- package/es/components/modal/modal-footer-action.vue2.js +25 -24
- package/es/components/modal/modal.vue.d.ts +1 -0
- package/es/components/modal/modal.vue2.js +30 -28
- package/es/components/multiple-tabs/multiple-tabs.vue2.js +17 -16
- package/es/components/multiple-tabs/tab-content.vue2.js +2 -2
- package/es/components/multiple-tabs/use/use-tab-dropdown.js +54 -53
- package/es/components/notification/notification.vue2.js +1 -1
- package/es/components/overlay/overlay.vue2.js +1 -1
- package/es/components/page-wrapper/page-wrapper.vue2.js +2 -2
- package/es/components/pagination/components/jumper.vue2.js +2 -2
- package/es/components/pagination/components/next.vue2.js +4 -4
- package/es/components/pagination/components/pager.vue2.js +1 -1
- package/es/components/pagination/components/prev.vue2.js +4 -4
- package/es/components/pagination/components/sizes.vue2.js +2 -2
- package/es/components/pagination/components/total.vue2.js +2 -2
- package/es/components/popconfirm/popconfirm.vue2.js +40 -39
- package/es/components/popover/popover.vue2.js +1 -1
- package/es/components/popper/arrow.vue2.js +2 -2
- package/es/components/popper/content.vue2.js +2 -2
- package/es/components/popper/trigger.vue2.js +4 -4
- package/es/components/progress/progress.vue2.js +1 -1
- package/es/components/progress-i/progress-i.vue2.js +2 -2
- package/es/components/qrcode/qrcode.vue2.js +1 -1
- package/es/components/radio/radio-button.vue2.js +2 -2
- package/es/components/radio/radio-group.vue2.js +3 -3
- package/es/components/radio/radio.vue2.js +2 -2
- package/es/components/rate/rate.vue2.js +6 -6
- package/es/components/router-view-content/router-view-content.vue2.js +7 -7
- package/es/components/roving-focus-group/roving-focus-group.vue2.js +2 -2
- package/es/components/roving-focus-group/roving-focus-item.vue2.js +2 -2
- package/es/components/row/row.vue2.js +2 -2
- package/es/components/scrollbar/bar.vue2.js +2 -2
- package/es/components/scrollbar/scrollbar.vue2.js +7 -7
- package/es/components/scrollbar/thumb.vue2.js +2 -2
- package/es/components/search/search.vue2.js +78 -76
- package/es/components/segmented/segmented.vue2.js +7 -7
- package/es/components/select/group-item.vue.js +2 -2
- package/es/components/select/option-item.vue.js +2 -2
- package/es/components/select/select.vue.js +1 -1
- package/es/components/select/useSelect.js +232 -231
- package/es/components/skeleton/skeleton-item.vue2.js +2 -2
- package/es/components/skeleton/skeleton.vue2.js +8 -8
- package/es/components/slider/button.vue2.js +2 -2
- package/es/components/slider/slider.vue2.js +1 -1
- package/es/components/space/space.js +1 -1
- package/es/components/statistic/statistic.vue2.js +17 -17
- package/es/components/steps/item.vue2.js +11 -11
- package/es/components/steps/steps.vue2.js +2 -2
- package/es/components/super-form/super-form-action.vue2.js +11 -11
- package/es/components/super-form/super-form-item.vue2.js +5 -4
- package/es/components/super-form/super-form.vue2.js +7 -7
- package/es/components/super-form/use/helper.js +12 -12
- package/es/components/super-form/use/use-form.js +8 -8
- package/es/components/switch/switch.vue2.js +1 -1
- package/es/components/table/field.js +34 -33
- package/es/components/table/table.vue2.js +154 -157
- package/es/components/table/use/use-data-source.js +90 -90
- package/es/components/tabs/tab-bar.vue2.js +2 -2
- package/es/components/tabs/tab-pane.vue2.js +6 -6
- package/es/components/teleport/teleport.vue2.js +2 -2
- package/es/components/time-picker/common/picker-range-trigger.vue2.js +2 -2
- package/es/components/time-picker/common/picker.vue2.js +8 -8
- package/es/components/time-picker/time-picker-com/basic-time-spinner.vue2.js +1 -1
- package/es/components/time-picker/time-picker-com/panel-time-pick.vue2.js +66 -65
- package/es/components/time-picker/time-picker-com/panel-time-range.vue2.js +134 -133
- package/es/components/time-select/time-select.vue2.js +3 -3
- package/es/components/timeline/timeline-item.vue2.js +1 -1
- package/es/components/tooltip/content.vue2.js +6 -6
- package/es/components/tooltip/tooltip.vue2.js +1 -1
- package/es/components/tooltip/trigger.vue2.js +2 -2
- package/es/components/transfer/transfer-panel.vue2.js +59 -58
- package/es/components/transfer/transfer.vue2.js +70 -69
- package/es/components/tree/tree-node.vue.js +1 -1
- package/es/components/tree/tree.vue2.js +60 -59
- package/es/components/upload/index.d.ts +3 -3
- package/es/components/upload/upload-content.vue.d.ts +2 -2
- package/es/components/upload/upload-content.vue2.js +76 -73
- package/es/components/upload/upload-dragger.vue2.js +2 -2
- package/es/components/upload/upload-list.vue2.js +46 -45
- package/es/components/upload/upload.vue.d.ts +2 -2
- package/es/components/upload/upload.vue2.js +87 -85
- package/es/components/upload/utils.js +29 -29
- package/es/components/verify-code/verify-code.vue2.js +2 -2
- package/es/components/watermark/watermark.vue2.js +2 -2
- package/es/constants/date.d.ts +1 -1
- package/es/constants/date.js +9 -1
- package/es/hooks/use-id/index.js +2 -2
- package/es/hooks/use-z-index/index.js +3 -3
- package/es/index.d.ts +1 -0
- package/es/index.js +43 -38
- package/es/locale/index.d.js +1 -0
- package/es/locale/index.d.ts +26 -0
- package/es/locale/index.js +10 -0
- package/es/locale/lang/en.d.ts +183 -0
- package/es/locale/lang/en.js +241 -0
- package/es/locale/lang/zh-cn.d.ts +183 -0
- package/es/locale/lang/zh-cn.js +241 -0
- package/es/locale/lang/zh-tw.d.ts +183 -0
- package/es/locale/lang/zh-tw.js +241 -0
- package/es/locale/use-locale.d.ts +17 -0
- package/es/locale/use-locale.js +56 -0
- package/es/package.json.d.ts +1 -1
- package/es/package.json.js +1 -1
- package/es/plugin.js +5 -3
- package/es/utils/helper.js +2 -2
- package/es/utils/ns-cover.js +1 -1
- package/es/utils/vue/vnode.js +4 -4
- package/lib/components/button/use-button.cjs +1 -1
- package/lib/components/cascader/cascader.vue2.cjs +1 -1
- package/lib/components/cascader-panel/menu.vue2.cjs +4 -4
- package/lib/components/clamp-toggle/clamp-toggle.vue2.cjs +1 -1
- package/lib/components/color-picker/color-picker.vue2.cjs +1 -1
- package/lib/components/config-provider/config-provider.vue.d.ts +2 -0
- package/lib/components/config-provider/config-provider.vue2.cjs +1 -1
- package/lib/components/config-provider/constants.cjs +1 -1
- package/lib/components/config-provider/constants.d.ts +1 -0
- package/lib/components/config-provider/hooks/use-global-config.cjs +1 -1
- package/lib/components/config-provider/index.cjs +1 -1
- package/lib/components/config-provider/index.d.ts +9 -0
- package/lib/components/date-picker/composables/use-basic-date-table.cjs +1 -1
- package/lib/components/date-picker/composables/use-month-range-header.cjs +1 -1
- package/lib/components/date-picker/composables/use-panel-date-range.cjs +1 -1
- package/lib/components/date-picker/date-picker-com/basic-month-table.vue2.cjs +1 -1
- package/lib/components/date-picker/date-picker-com/basic-year-table.vue2.cjs +1 -1
- package/lib/components/date-picker/date-picker-com/panel-date-pick.vue2.cjs +1 -1
- package/lib/components/date-picker/date-picker-com/panel-date-range.vue2.cjs +1 -1
- package/lib/components/date-time-select/date-time-select.vue2.cjs +1 -1
- package/lib/components/dropdown/dropdown-item-impl.vue.d.ts +1 -1
- package/lib/components/dropdown/dropdown-item.vue.d.ts +1 -1
- package/lib/components/dropdown/dropdown.vue.d.ts +1 -1
- package/lib/components/dropdown/dropdown.vue2.cjs +1 -1
- package/lib/components/dropdown/index.d.ts +33 -33
- package/lib/components/empty/empty.vue2.cjs +1 -1
- package/lib/components/full-screen/full-screen.vue2.cjs +1 -1
- package/lib/components/image/image.vue2.cjs +1 -1
- package/lib/components/image-viewer/image-viewer.vue2.cjs +1 -1
- package/lib/components/index.cjs +1 -1
- package/lib/components/index.d.ts +1 -0
- package/lib/components/md-container/md-container.vue2.cjs +1 -1
- package/lib/components/md-container/toc.cjs +1 -1
- package/lib/components/message-box/index.cjs +1 -0
- package/lib/components/message-box/index.d.ts +4 -0
- package/lib/components/message-box/message-box.vue.cjs +1 -0
- package/lib/components/message-box/message-box.vue.d.ts +103 -0
- package/lib/components/message-box/message-box.vue2.cjs +1 -0
- package/lib/components/message-box/method.cjs +1 -0
- package/lib/components/message-box/method.d.ts +3 -0
- package/lib/components/message-box/style/css.cjs +1 -0
- package/lib/components/message-box/style/css.d.ts +2 -0
- package/lib/components/message-box/style/index.cjs +1 -0
- package/lib/components/message-box/style/index.d.ts +2 -0
- package/lib/components/message-box/types.cjs +1 -0
- package/lib/components/message-box/types.d.ts +202 -0
- package/lib/components/modal/index.d.ts +1 -0
- package/lib/components/modal/modal-footer-action.vue2.cjs +1 -1
- package/lib/components/modal/modal.vue.d.ts +1 -0
- package/lib/components/modal/modal.vue2.cjs +1 -1
- package/lib/components/multiple-tabs/multiple-tabs.vue2.cjs +1 -1
- package/lib/components/multiple-tabs/use/use-tab-dropdown.cjs +1 -1
- package/lib/components/popconfirm/popconfirm.vue2.cjs +1 -1
- package/lib/components/search/search.vue2.cjs +1 -1
- package/lib/components/select/useSelect.cjs +1 -1
- package/lib/components/super-form/super-form-item.vue2.cjs +1 -1
- package/lib/components/super-form/use/helper.cjs +1 -1
- package/lib/components/super-form/use/use-form.cjs +1 -1
- package/lib/components/table/field.cjs +1 -1
- package/lib/components/table/table.vue2.cjs +1 -1
- package/lib/components/table/use/use-data-source.cjs +1 -1
- package/lib/components/time-picker/time-picker-com/panel-time-pick.vue2.cjs +1 -1
- package/lib/components/time-picker/time-picker-com/panel-time-range.vue2.cjs +1 -1
- package/lib/components/transfer/transfer-panel.vue2.cjs +1 -1
- package/lib/components/transfer/transfer.vue2.cjs +1 -1
- package/lib/components/tree/tree.vue2.cjs +1 -1
- package/lib/components/upload/index.d.ts +3 -3
- package/lib/components/upload/upload-content.vue.d.ts +2 -2
- package/lib/components/upload/upload-content.vue2.cjs +1 -1
- package/lib/components/upload/upload-list.vue2.cjs +1 -1
- package/lib/components/upload/upload.vue.d.ts +2 -2
- package/lib/components/upload/upload.vue2.cjs +1 -1
- package/lib/components/upload/utils.cjs +1 -1
- package/lib/constants/date.cjs +1 -1
- package/lib/constants/date.d.ts +1 -1
- package/lib/index.cjs +1 -1
- package/lib/index.d.ts +1 -0
- package/lib/locale/index.cjs +1 -0
- package/lib/locale/index.d.cjs +1 -0
- package/lib/locale/index.d.ts +26 -0
- package/lib/locale/lang/en.cjs +1 -0
- package/lib/locale/lang/en.d.ts +183 -0
- package/lib/locale/lang/zh-cn.cjs +1 -0
- package/lib/locale/lang/zh-cn.d.ts +183 -0
- package/lib/locale/lang/zh-tw.cjs +1 -0
- package/lib/locale/lang/zh-tw.d.ts +183 -0
- package/lib/locale/use-locale.cjs +1 -0
- package/lib/locale/use-locale.d.ts +17 -0
- package/lib/package.json.cjs +1 -1
- package/lib/package.json.d.ts +1 -1
- package/lib/plugin.cjs +1 -1
- package/package.json +2 -2
- package/theme-style/index.css +1 -1
- package/theme-style/src/super-form.scss +0 -1
- package/theme-style/src/table.scss +4 -0
- package/theme-style/vft-super-form.css +1 -1
- package/theme-style/vft-table.css +1 -1
- package/web-types.json +1 -1
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
import type { AppContext, VNode } from 'vue';
|
|
2
|
+
import type { CSSProperties } from 'vue';
|
|
3
|
+
export type Action = 'confirm' | 'close' | 'cancel';
|
|
4
|
+
export type MessageBoxType = '' | 'prompt' | 'alert' | 'confirm';
|
|
5
|
+
export type MessageBoxMessageType = '' | 'primary' | 'success' | 'warning' | 'info' | 'error';
|
|
6
|
+
export type MessageBoxButtonType = 'default' | 'primary' | 'success' | 'warning' | 'info' | 'danger' | 'text';
|
|
7
|
+
export type CloseFn = () => void;
|
|
8
|
+
export interface MessageBoxInputData {
|
|
9
|
+
/** 输入框内的值 */
|
|
10
|
+
value: string;
|
|
11
|
+
/** 触发的动作类型 */
|
|
12
|
+
action: Action;
|
|
13
|
+
}
|
|
14
|
+
export type MessageBoxData = MessageBoxInputData & Action;
|
|
15
|
+
export interface MessageBoxActionHandlers {
|
|
16
|
+
confirm: CloseFn;
|
|
17
|
+
cancel: CloseFn;
|
|
18
|
+
close: CloseFn;
|
|
19
|
+
}
|
|
20
|
+
export type MessageBoxInputValidator = ((value: string) => boolean | string) | undefined;
|
|
21
|
+
export type Callback = ((value: string, action: Action) => any) | ((action: Action) => any);
|
|
22
|
+
export interface MessageBoxState {
|
|
23
|
+
/** 自动聚焦 */
|
|
24
|
+
autofocus: boolean;
|
|
25
|
+
/** 标题 */
|
|
26
|
+
title: string | undefined;
|
|
27
|
+
/** 消息内容 */
|
|
28
|
+
message: string | VNode;
|
|
29
|
+
/** 消息类型,控制图标 */
|
|
30
|
+
type: MessageBoxMessageType;
|
|
31
|
+
/** 自定义图标 */
|
|
32
|
+
icon: string;
|
|
33
|
+
/** 自定义关闭图标 */
|
|
34
|
+
closeIcon: string;
|
|
35
|
+
/** 自定义类名 */
|
|
36
|
+
customClass: string;
|
|
37
|
+
/** 自定义内联样式 */
|
|
38
|
+
customStyle: Record<string, string | number>;
|
|
39
|
+
/** 是否显示输入框,prompt 模式下默认 true */
|
|
40
|
+
showInput: boolean;
|
|
41
|
+
/** 输入框默认值 */
|
|
42
|
+
inputValue: string;
|
|
43
|
+
/** 输入框占位符 */
|
|
44
|
+
inputPlaceholder: string;
|
|
45
|
+
/** 输入框类型 */
|
|
46
|
+
inputType: string;
|
|
47
|
+
/** 输入框校验正则 */
|
|
48
|
+
inputPattern: RegExp | null;
|
|
49
|
+
/** 输入框自定义校验函数 */
|
|
50
|
+
inputValidator: MessageBoxInputValidator;
|
|
51
|
+
/** 输入框校验失败提示 */
|
|
52
|
+
inputErrorMessage: string;
|
|
53
|
+
/** 是否显示确认按钮 */
|
|
54
|
+
showConfirmButton: boolean;
|
|
55
|
+
/** 是否显示取消按钮 */
|
|
56
|
+
showCancelButton: boolean;
|
|
57
|
+
/** 当前触发的动作 */
|
|
58
|
+
action: Action;
|
|
59
|
+
/** 是否将 message 作为 HTML 字符串渲染 */
|
|
60
|
+
dangerouslyUseHTMLString: boolean;
|
|
61
|
+
/** 确认按钮文案 */
|
|
62
|
+
confirmButtonText: string;
|
|
63
|
+
/** 取消按钮文案 */
|
|
64
|
+
cancelButtonText: string;
|
|
65
|
+
/** 确认按钮类型 */
|
|
66
|
+
confirmButtonType: MessageBoxButtonType;
|
|
67
|
+
/** 取消按钮类型 */
|
|
68
|
+
cancelButtonType: MessageBoxButtonType;
|
|
69
|
+
/** 确认按钮加载中 */
|
|
70
|
+
confirmButtonLoading: boolean;
|
|
71
|
+
/** 取消按钮加载中 */
|
|
72
|
+
cancelButtonLoading: boolean;
|
|
73
|
+
/** 确认按钮加载图标 */
|
|
74
|
+
confirmButtonLoadingIcon: string;
|
|
75
|
+
/** 取消按钮加载图标 */
|
|
76
|
+
cancelButtonLoadingIcon: string;
|
|
77
|
+
/** 确认按钮自定义类名 */
|
|
78
|
+
confirmButtonClass: string;
|
|
79
|
+
/** 确认按钮是否禁用 */
|
|
80
|
+
confirmButtonDisabled: boolean;
|
|
81
|
+
/** 取消按钮自定义类名 */
|
|
82
|
+
cancelButtonClass: string;
|
|
83
|
+
/** 输入框校验失败信息 */
|
|
84
|
+
editorErrorMessage: string;
|
|
85
|
+
/** 关闭前回调 */
|
|
86
|
+
beforeClose: null | ((action: Action, instance: MessageBoxState, done: () => void) => void);
|
|
87
|
+
/** 关闭后回调(不使用 Promise 时) */
|
|
88
|
+
callback: null | Callback;
|
|
89
|
+
/** 是否区分取消和关闭 */
|
|
90
|
+
distinguishCancelAndClose: boolean;
|
|
91
|
+
/** 遮罩淡入淡出 */
|
|
92
|
+
modalFade: boolean;
|
|
93
|
+
/** 自定义遮罩类名 */
|
|
94
|
+
modalClass: string;
|
|
95
|
+
/** 校验是否失败 */
|
|
96
|
+
validateError: boolean;
|
|
97
|
+
/** 弹窗层级 */
|
|
98
|
+
zIndex: number;
|
|
99
|
+
}
|
|
100
|
+
/** MessageBox 选项 */
|
|
101
|
+
export interface MessageBoxOptions {
|
|
102
|
+
/** 打开时是否自动聚焦 */
|
|
103
|
+
autofocus?: boolean;
|
|
104
|
+
/** 关闭前回调,会阻止默认关闭 */
|
|
105
|
+
beforeClose?: (action: Action, instance: MessageBoxState, done: () => void) => void;
|
|
106
|
+
/** 自定义类名 */
|
|
107
|
+
customClass?: string;
|
|
108
|
+
/** 自定义内联样式 */
|
|
109
|
+
customStyle?: CSSProperties;
|
|
110
|
+
/** 是否显示遮罩 */
|
|
111
|
+
modal?: boolean;
|
|
112
|
+
/** 遮罩自定义类名 */
|
|
113
|
+
modalClass?: string;
|
|
114
|
+
/** 关闭回调 */
|
|
115
|
+
callback?: Callback;
|
|
116
|
+
/** 取消按钮文案 */
|
|
117
|
+
cancelButtonText?: string;
|
|
118
|
+
/** 确认按钮文案 */
|
|
119
|
+
confirmButtonText?: string;
|
|
120
|
+
/** 取消按钮类型 */
|
|
121
|
+
cancelButtonType?: MessageBoxButtonType;
|
|
122
|
+
/** 确认按钮类型 */
|
|
123
|
+
confirmButtonType?: MessageBoxButtonType;
|
|
124
|
+
/** 取消按钮加载图标 */
|
|
125
|
+
cancelButtonLoadingIcon?: string;
|
|
126
|
+
/** 确认按钮加载图标 */
|
|
127
|
+
confirmButtonLoadingIcon?: string;
|
|
128
|
+
/** 取消按钮自定义类名 */
|
|
129
|
+
cancelButtonClass?: string;
|
|
130
|
+
/** 确认按钮自定义类名 */
|
|
131
|
+
confirmButtonClass?: string;
|
|
132
|
+
/** 内容是否居中 */
|
|
133
|
+
center?: boolean;
|
|
134
|
+
/** 是否可拖拽 */
|
|
135
|
+
draggable?: boolean;
|
|
136
|
+
/** 拖拽时是否允许溢出视口 */
|
|
137
|
+
overflow?: boolean;
|
|
138
|
+
/** 消息内容,可为字符串、VNode 或返回 VNode 的函数 */
|
|
139
|
+
message?: string | VNode | ((params: MessageBoxActionHandlers) => VNode);
|
|
140
|
+
/** 标题 */
|
|
141
|
+
title?: string | MessageBoxOptions;
|
|
142
|
+
/** 消息类型,决定图标 */
|
|
143
|
+
type?: MessageBoxMessageType;
|
|
144
|
+
/** boxType,由 alert / confirm / prompt 内部传入 */
|
|
145
|
+
boxType?: MessageBoxType;
|
|
146
|
+
/** 自定义图标 */
|
|
147
|
+
icon?: string;
|
|
148
|
+
/** 自定义关闭图标 */
|
|
149
|
+
closeIcon?: string;
|
|
150
|
+
/** 是否将 message 作为 HTML 字符串处理 */
|
|
151
|
+
dangerouslyUseHTMLString?: boolean;
|
|
152
|
+
/** 是否区分取消和关闭 */
|
|
153
|
+
distinguishCancelAndClose?: boolean;
|
|
154
|
+
/** 是否锁定 body 滚动 */
|
|
155
|
+
lockScroll?: boolean;
|
|
156
|
+
/** 是否显示取消按钮 */
|
|
157
|
+
showCancelButton?: boolean;
|
|
158
|
+
/** 是否显示确认按钮 */
|
|
159
|
+
showConfirmButton?: boolean;
|
|
160
|
+
/** 是否显示关闭按钮 */
|
|
161
|
+
showClose?: boolean;
|
|
162
|
+
/** 按钮是否使用圆角 */
|
|
163
|
+
roundButton?: boolean;
|
|
164
|
+
/** 点击遮罩是否关闭 */
|
|
165
|
+
closeOnClickModal?: boolean;
|
|
166
|
+
/** 按 ESC 是否关闭 */
|
|
167
|
+
closeOnPressEscape?: boolean;
|
|
168
|
+
/** hash 改变时是否关闭 */
|
|
169
|
+
closeOnHashChange?: boolean;
|
|
170
|
+
/** prompt 时是否显示输入框 */
|
|
171
|
+
showInput?: boolean;
|
|
172
|
+
/** 输入框占位符 */
|
|
173
|
+
inputPlaceholder?: string;
|
|
174
|
+
/** 输入框默认值 */
|
|
175
|
+
inputValue?: string;
|
|
176
|
+
/** 输入框校验正则 */
|
|
177
|
+
inputPattern?: RegExp;
|
|
178
|
+
/** 输入框类型 */
|
|
179
|
+
inputType?: string;
|
|
180
|
+
/** 输入框自定义校验函数 */
|
|
181
|
+
inputValidator?: MessageBoxInputValidator;
|
|
182
|
+
/** 校验失败时提示文案 */
|
|
183
|
+
inputErrorMessage?: string;
|
|
184
|
+
/** 按钮尺寸 */
|
|
185
|
+
buttonSize?: 'large' | 'default' | 'small';
|
|
186
|
+
/** 自定义挂载节点 */
|
|
187
|
+
appendTo?: HTMLElement | string;
|
|
188
|
+
}
|
|
189
|
+
export type MessageBoxShortcutMethod = ((message: MessageBoxOptions['message'], options?: MessageBoxOptions, appContext?: AppContext | null) => Promise<MessageBoxData>) & ((message: MessageBoxOptions['message'], title: MessageBoxOptions['title'], options?: MessageBoxOptions, appContext?: AppContext | null) => Promise<MessageBoxData>);
|
|
190
|
+
export interface IMessageBox {
|
|
191
|
+
_context: AppContext | null;
|
|
192
|
+
/** 显示一个消息提示框 */
|
|
193
|
+
(options: MessageBoxOptions, appContext?: AppContext | null): Promise<MessageBoxData>;
|
|
194
|
+
/** 显示警告对话框 */
|
|
195
|
+
alert: MessageBoxShortcutMethod;
|
|
196
|
+
/** 显示确认对话框 */
|
|
197
|
+
confirm: MessageBoxShortcutMethod;
|
|
198
|
+
/** 显示提示输入框 */
|
|
199
|
+
prompt: MessageBoxShortcutMethod;
|
|
200
|
+
/** 关闭当前所有 message-box */
|
|
201
|
+
close: CloseFn;
|
|
202
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -566,6 +566,7 @@ export declare const VftModal: import("vft/es/utils").SFCWithInstall<{
|
|
|
566
566
|
}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
|
|
567
567
|
$slots: {
|
|
568
568
|
default?(_: {}): any;
|
|
569
|
+
footer?(_: {}): any;
|
|
569
570
|
};
|
|
570
571
|
})> & Record<string, any>;
|
|
571
572
|
export * from './types';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as w, computed as e, openBlock as n, createBlock as s, unref as o, normalizeProps as v, guardReactiveProps as y, withCtx as a, mergeProps as l, createTextVNode as p, toDisplayString as f, createCommentVNode as B, renderSlot as b } from "vue";
|
|
2
2
|
import { VftRow as g } from "../row/index.js";
|
|
3
|
-
import { VftButton as
|
|
3
|
+
import { VftButton as d } from "../button/index.js";
|
|
4
4
|
import "@vueuse/core";
|
|
5
5
|
import "@vft/utils";
|
|
6
6
|
import "../config-provider/hooks/use-global-config.js";
|
|
@@ -10,7 +10,8 @@ import { useNamespace as h } from "../../hooks/use-namespace/index.js";
|
|
|
10
10
|
import "../../hooks/use-model-toggle/index.js";
|
|
11
11
|
import "@popperjs/core";
|
|
12
12
|
import "../../hooks/use-z-index/index.js";
|
|
13
|
-
|
|
13
|
+
import x from "../../locale/use-locale.js";
|
|
14
|
+
const q = /* @__PURE__ */ w({
|
|
14
15
|
__name: "modal-footer-action",
|
|
15
16
|
props: {
|
|
16
17
|
showSubmitButton: { type: Boolean },
|
|
@@ -20,41 +21,41 @@ const A = /* @__PURE__ */ O({
|
|
|
20
21
|
actionRowOptions: {}
|
|
21
22
|
},
|
|
22
23
|
setup(t) {
|
|
23
|
-
const
|
|
24
|
+
const i = h("form-action"), { t: r } = x(), O = e(() => ({
|
|
24
25
|
justify: "end",
|
|
25
26
|
...t.actionRowOptions
|
|
26
|
-
})),
|
|
27
|
-
() => Object.assign({ btnText: "
|
|
28
|
-
),
|
|
29
|
-
() => Object.assign({ btnText: "
|
|
27
|
+
})), m = e(
|
|
28
|
+
() => Object.assign({ btnText: r("vft.modal.confirm") }, t.submitButtonOptions)
|
|
29
|
+
), c = e(
|
|
30
|
+
() => Object.assign({ btnText: r("vft.modal.cancel") }, t.cancelButtonOptions)
|
|
30
31
|
);
|
|
31
|
-
return (
|
|
32
|
-
default:
|
|
33
|
-
t.showCancelButton ? (
|
|
34
|
-
class: o(
|
|
32
|
+
return (u, C) => (n(), s(o(g), v(y(O.value)), {
|
|
33
|
+
default: a(() => [
|
|
34
|
+
t.showCancelButton ? (n(), s(o(d), l({ key: 0 }, c.value, {
|
|
35
|
+
class: o(i).e("cancel")
|
|
35
36
|
}), {
|
|
36
|
-
default:
|
|
37
|
-
f(
|
|
37
|
+
default: a(() => [
|
|
38
|
+
p(f(c.value.btnText), 1)
|
|
38
39
|
]),
|
|
39
40
|
_: 1
|
|
40
|
-
}, 16, ["class"])) :
|
|
41
|
-
|
|
42
|
-
t.showSubmitButton ? (
|
|
41
|
+
}, 16, ["class"])) : B("", !0),
|
|
42
|
+
b(u.$slots, "submitBefore"),
|
|
43
|
+
t.showSubmitButton ? (n(), s(o(d), l({
|
|
43
44
|
key: 1,
|
|
44
45
|
type: "primary",
|
|
45
|
-
class: o(
|
|
46
|
-
},
|
|
47
|
-
default:
|
|
48
|
-
f(
|
|
46
|
+
class: o(i).e("submit")
|
|
47
|
+
}, m.value), {
|
|
48
|
+
default: a(() => [
|
|
49
|
+
p(f(m.value.btnText), 1)
|
|
49
50
|
]),
|
|
50
51
|
_: 1
|
|
51
|
-
}, 16, ["class"])) :
|
|
52
|
-
|
|
52
|
+
}, 16, ["class"])) : B("", !0),
|
|
53
|
+
b(u.$slots, "submitAfter")
|
|
53
54
|
]),
|
|
54
55
|
_: 3
|
|
55
56
|
}, 16));
|
|
56
57
|
}
|
|
57
58
|
});
|
|
58
59
|
export {
|
|
59
|
-
|
|
60
|
+
q as default
|
|
60
61
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { ModalActionProps, ModalMethods, ModalProps } from './types';
|
|
2
2
|
declare function __VLS_template(): {
|
|
3
3
|
default?(_: {}): any;
|
|
4
|
+
footer?(_: {}): any;
|
|
4
5
|
};
|
|
5
6
|
declare const __VLS_component: import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<ModalProps & ModalActionProps>, {
|
|
6
7
|
center: boolean;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { VftDialog as
|
|
3
|
-
import { deepMerge as
|
|
1
|
+
import { defineComponent as A, useAttrs as $, ref as m, getCurrentInstance as M, computed as d, unref as l, watchEffect as P, watch as T, nextTick as B, openBlock as y, createBlock as C, mergeProps as R, createSlots as S, withCtx as g, renderSlot as w, createCommentVNode as D } from "vue";
|
|
2
|
+
import { VftDialog as G } from "../dialog/index.js";
|
|
3
|
+
import { deepMerge as I, isFunction as x } from "@vft/utils";
|
|
4
4
|
import E from "./modal-footer-action.vue2.js";
|
|
5
|
-
const W = /* @__PURE__ */
|
|
5
|
+
const W = /* @__PURE__ */ A({
|
|
6
6
|
__name: "modal",
|
|
7
7
|
props: {
|
|
8
8
|
closeFunc: {},
|
|
@@ -47,8 +47,8 @@ const W = /* @__PURE__ */ k({
|
|
|
47
47
|
actionRowOptions: {}
|
|
48
48
|
},
|
|
49
49
|
emits: ["visible-change", "close", "ok", "register", "update:modelValue", "submit", "open", "opened", "closed", "openAutoFocus", "closeAutoFocus"],
|
|
50
|
-
setup(s, { emit:
|
|
51
|
-
const n = s, t =
|
|
50
|
+
setup(s, { emit: h }) {
|
|
51
|
+
const n = s, t = h, V = $(), c = m(null), a = m(!1), u = m(null), f = {
|
|
52
52
|
setModalProps: p,
|
|
53
53
|
emitVisible: void 0,
|
|
54
54
|
redoModalHeight: () => {
|
|
@@ -56,19 +56,19 @@ const W = /* @__PURE__ */ k({
|
|
|
56
56
|
l(u) && l(u).setModalHeight();
|
|
57
57
|
});
|
|
58
58
|
}
|
|
59
|
-
}, i =
|
|
59
|
+
}, i = M();
|
|
60
60
|
i && t("register", f, i.uid);
|
|
61
|
-
const
|
|
61
|
+
const v = d(() => ({
|
|
62
62
|
...n,
|
|
63
|
-
...l(
|
|
64
|
-
})),
|
|
65
|
-
...
|
|
66
|
-
...l(
|
|
63
|
+
...l(c)
|
|
64
|
+
})), O = d(() => ({
|
|
65
|
+
...V,
|
|
66
|
+
...l(v),
|
|
67
67
|
modelValue: l(a)
|
|
68
68
|
}));
|
|
69
|
-
|
|
69
|
+
P(() => {
|
|
70
70
|
a.value = !!n.modelValue;
|
|
71
|
-
}),
|
|
71
|
+
}), T(
|
|
72
72
|
() => l(a),
|
|
73
73
|
(e) => {
|
|
74
74
|
t("visible-change", e), t("update:modelValue", e), i && f.emitVisible && B(() => {
|
|
@@ -82,45 +82,47 @@ const W = /* @__PURE__ */ k({
|
|
|
82
82
|
}
|
|
83
83
|
);
|
|
84
84
|
async function b(e) {
|
|
85
|
-
if (e?.stopPropagation(), n.closeFunc &&
|
|
85
|
+
if (e?.stopPropagation(), n.closeFunc && x(n.closeFunc)) {
|
|
86
86
|
await n.closeFunc() || p({ modelValue: !1 });
|
|
87
87
|
return;
|
|
88
88
|
}
|
|
89
89
|
p({ modelValue: !1 }), t("close", e);
|
|
90
90
|
}
|
|
91
91
|
function p(e) {
|
|
92
|
-
|
|
92
|
+
c.value = I(l(c) || {}, e), Reflect.has(e, "modelValue") && (a.value = !!e.modelValue);
|
|
93
93
|
}
|
|
94
|
-
const
|
|
94
|
+
const F = d(() => ({
|
|
95
95
|
onClick: (e) => b(e),
|
|
96
96
|
...n.cancelButtonOptions
|
|
97
|
-
})),
|
|
97
|
+
})), k = d(() => ({
|
|
98
98
|
onClick: () => t("submit"),
|
|
99
99
|
...n.submitButtonOptions
|
|
100
100
|
}));
|
|
101
|
-
return (e, o) => (
|
|
101
|
+
return (e, o) => (y(), C(l(G), R(O.value, {
|
|
102
102
|
onClose: b,
|
|
103
103
|
onOpen: o[0] || (o[0] = (r) => t("open")),
|
|
104
104
|
onOpened: o[1] || (o[1] = (r) => t("opened")),
|
|
105
105
|
onClosed: o[2] || (o[2] = (r) => t("closed")),
|
|
106
106
|
onOpenAutoFocus: o[3] || (o[3] = (r) => t("openAutoFocus")),
|
|
107
107
|
onCloseAutoFocus: o[4] || (o[4] = (r) => t("closeAutoFocus"))
|
|
108
|
-
}),
|
|
108
|
+
}), S({
|
|
109
109
|
default: g(() => [
|
|
110
|
-
|
|
110
|
+
w(e.$slots, "default")
|
|
111
111
|
]),
|
|
112
112
|
_: 2
|
|
113
113
|
}, [
|
|
114
114
|
e.$slots.footer || s.showActionButtonGroup ? {
|
|
115
115
|
name: "footer",
|
|
116
116
|
fn: g(() => [
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
117
|
+
w(e.$slots, "footer", {}, () => [
|
|
118
|
+
s.showActionButtonGroup ? (y(), C(E, {
|
|
119
|
+
key: 0,
|
|
120
|
+
"show-cancel-button": s.showCancelButton,
|
|
121
|
+
"show-submit-button": s.showSubmitButton,
|
|
122
|
+
"cancel-button-options": F.value,
|
|
123
|
+
"submit-button-options": k.value
|
|
124
|
+
}, null, 8, ["show-cancel-button", "show-submit-button", "cancel-button-options", "submit-button-options"])) : D("", !0)
|
|
125
|
+
])
|
|
124
126
|
]),
|
|
125
127
|
key: "0"
|
|
126
128
|
} : void 0
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as B, getCurrentInstance as q, computed as d, ref as v, watchEffect as G, unref as t, onMounted as J,
|
|
1
|
+
import { defineComponent as B, getCurrentInstance as q, computed as d, ref as v, watchEffect as G, unref as t, onMounted as J, openBlock as g, createElementBlock as P, normalizeStyle as O, normalizeClass as V, createVNode as h, createSlots as Q, withCtx as T, Fragment as X, renderList as Y, createBlock as Z, renderSlot as ee, createElementVNode as te } from "vue";
|
|
2
2
|
import { VftTabs as ae, VftTabPane as ne } from "../tabs/index.js";
|
|
3
3
|
import { VftIcon as w } from "../icon/index.js";
|
|
4
4
|
import { isClient as oe } from "@vueuse/core";
|
|
@@ -7,11 +7,11 @@ import { addUnit as o } from "../../utils/helper.js";
|
|
|
7
7
|
import { generateCssVars as M } from "../../utils/ns-cover.js";
|
|
8
8
|
import "lodash-es";
|
|
9
9
|
import "../form/index.js";
|
|
10
|
-
import { useNamespace as
|
|
10
|
+
import { useNamespace as ie } from "../../hooks/use-namespace/index.js";
|
|
11
11
|
import "../../hooks/use-model-toggle/index.js";
|
|
12
12
|
import "@popperjs/core";
|
|
13
13
|
import "../../hooks/use-z-index/index.js";
|
|
14
|
-
import { useRouterHelper as
|
|
14
|
+
import { useRouterHelper as le, getRouterKeyPath as b, listenerRouteChange as re } from "@vft/router";
|
|
15
15
|
import { useMultipleTabStore as se, isTabPinned as $, useTabs as ue } from "@vft/store";
|
|
16
16
|
import { useRefs as ce } from "@vft/use";
|
|
17
17
|
import fe from "hotkeys-js";
|
|
@@ -19,9 +19,10 @@ import { onBeforeRouteLeave as me } from "vue-router";
|
|
|
19
19
|
import de from "./tab-content.vue2.js";
|
|
20
20
|
import { initAffixTabs as ve, useTabsDrag as he } from "./use/use-multiple-tabs.js";
|
|
21
21
|
import "../context-menu/context-menu.vue2.js";
|
|
22
|
+
import "../../locale/use-locale.js";
|
|
22
23
|
const be = B({
|
|
23
24
|
name: "vft-multiple-tabs"
|
|
24
|
-
}),
|
|
25
|
+
}), De = /* @__PURE__ */ B({
|
|
25
26
|
...be,
|
|
26
27
|
props: {
|
|
27
28
|
tabsStyle: {},
|
|
@@ -32,15 +33,15 @@ const be = B({
|
|
|
32
33
|
fixExtraScrollWidth: {}
|
|
33
34
|
},
|
|
34
35
|
setup(u) {
|
|
35
|
-
const R =
|
|
36
|
-
() =>
|
|
36
|
+
const R = ie("multiple-tabs"), s = q().appContext.config.globalProperties.$router, I = ve(s), i = se(), f = d(
|
|
37
|
+
() => i.getTabList.filter((e) => !e.meta?.hideTab && $(e)).length
|
|
37
38
|
), L = d(
|
|
38
39
|
() => Math.max(u.fixTabCount, f.value)
|
|
39
|
-
), r = v(""),
|
|
40
|
+
), r = v(""), l = v(0), p = v(), { go: C } = le(s), m = d(() => i.getTabList.filter((e) => !e.meta?.hideTab));
|
|
40
41
|
G(() => {
|
|
41
42
|
if (r.value) {
|
|
42
43
|
const e = m.value.findIndex((n) => b(n) === r.value);
|
|
43
|
-
e === -1 ?
|
|
44
|
+
e === -1 ? l.value = m.value?.length - 1 : l.value = e, l.value = l.value < f.value ? f.value - 1 : l.value;
|
|
44
45
|
}
|
|
45
46
|
}), oe && me(() => {
|
|
46
47
|
p.value = t(s.currentRoute);
|
|
@@ -50,13 +51,13 @@ const be = B({
|
|
|
50
51
|
const { meta: n = {} } = e, { currentActivePath: a, hideTab: c } = n, W = c ? a : null, S = b(e);
|
|
51
52
|
if (r.value !== S && (r.value = S), W) {
|
|
52
53
|
const k = s.getRoutes().find((j) => j.path === a);
|
|
53
|
-
k &&
|
|
54
|
+
k && i.addTab(
|
|
54
55
|
k,
|
|
55
56
|
t(p),
|
|
56
|
-
|
|
57
|
+
l.value,
|
|
57
58
|
e
|
|
58
59
|
);
|
|
59
|
-
} else c ||
|
|
60
|
+
} else c || i.addTab(t(e), t(p), l.value);
|
|
60
61
|
});
|
|
61
62
|
function N(e) {
|
|
62
63
|
if (r.value === e.paneName)
|
|
@@ -67,7 +68,7 @@ const be = B({
|
|
|
67
68
|
C(a || n.fullPath || n.path);
|
|
68
69
|
}
|
|
69
70
|
function _(e) {
|
|
70
|
-
|
|
71
|
+
i.closeTabByKey(e, s);
|
|
71
72
|
}
|
|
72
73
|
const { refs: E, setRefs: F } = ce();
|
|
73
74
|
function A(e) {
|
|
@@ -100,11 +101,11 @@ const be = B({
|
|
|
100
101
|
),
|
|
101
102
|
...u.contextMenuStyle
|
|
102
103
|
}, K = () => {
|
|
103
|
-
|
|
104
|
+
i.toggleFullScreen(i.getTabList[l.value], s);
|
|
104
105
|
}, x = v(!1);
|
|
105
106
|
let y;
|
|
106
107
|
const U = () => {
|
|
107
|
-
clearInterval(y), x.value = !0,
|
|
108
|
+
clearInterval(y), x.value = !0, i.refreshPage(0, s, i.getTabList[l.value]), y = setTimeout(() => {
|
|
108
109
|
x.value = !1;
|
|
109
110
|
}, 500);
|
|
110
111
|
};
|
|
@@ -161,7 +162,7 @@ const be = B({
|
|
|
161
162
|
}, null, 8, ["rotate"]),
|
|
162
163
|
h(t(w), {
|
|
163
164
|
onClick: K,
|
|
164
|
-
icon: t(
|
|
165
|
+
icon: t(i).isFullScreen ? "icon-collapse" : "icon-expand",
|
|
165
166
|
pointer: ""
|
|
166
167
|
}, null, 8, ["icon"])
|
|
167
168
|
], 2)
|
|
@@ -174,5 +175,5 @@ const be = B({
|
|
|
174
175
|
}
|
|
175
176
|
});
|
|
176
177
|
export {
|
|
177
|
-
|
|
178
|
+
De as default
|
|
178
179
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as r, computed as i,
|
|
1
|
+
import { defineComponent as r, computed as i, openBlock as f, createBlock as s, unref as x, withModifiers as b } from "vue";
|
|
2
2
|
import { singleAttrToObj as p } from "@vft/utils";
|
|
3
3
|
import "../context-menu/context-menu.vue2.js";
|
|
4
4
|
import "../icon/index.js";
|
|
@@ -29,7 +29,7 @@ const N = /* @__PURE__ */ r({
|
|
|
29
29
|
}
|
|
30
30
|
return m({
|
|
31
31
|
handleContext: o
|
|
32
|
-
}), (e, M) => (
|
|
32
|
+
}), (e, M) => (f(), s(x(d), {
|
|
33
33
|
class: "vft-multiple-tabs__title",
|
|
34
34
|
title: n.value,
|
|
35
35
|
icon: u.value,
|