vft 0.0.1
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/package.json +54 -0
- package/src/app/index.ts +3 -0
- package/src/app/page-loading/assets/spin.gif +0 -0
- package/src/app/page-loading/index.less +10 -0
- package/src/app/page-loading/index.ts +3 -0
- package/src/app/page-loading/index.vue +38 -0
- package/src/app/table/assets/sort_triangle.png +0 -0
- package/src/app/table/demos/basic.vue +117 -0
- package/src/app/table/demos/complex.vue +2543 -0
- package/src/app/table/demos/index.vue +453 -0
- package/src/app/table/demos/rightAngle.png +0 -0
- package/src/app/table/header.vue +203 -0
- package/src/app/table/index.less +119 -0
- package/src/app/table/index.ts +5 -0
- package/src/app/table/index.vue +478 -0
- package/src/app/table/md/api.md +23 -0
- package/src/app/table/md/demo.md +3 -0
- package/src/app/table/types.ts +45 -0
- package/src/common/badge/index.scss +78 -0
- package/src/common/badge/index.ts +4 -0
- package/src/common/badge/index.vue +111 -0
- package/src/common/badge/types.ts +1 -0
- package/src/common/clamp/clamp-toggle.vue +91 -0
- package/src/common/clamp/index.ts +4 -0
- package/src/common/clamp/index.vue +247 -0
- package/src/common/code/index.less +321 -0
- package/src/common/code/index.ts +3 -0
- package/src/common/code/index.vue +60 -0
- package/src/common/config-provider/index.ts +4 -0
- package/src/common/config-provider/index.vue +94 -0
- package/src/common/config-provider/types.ts +29 -0
- package/src/common/icon/iconfont/iconfont.css +334 -0
- package/src/common/icon/index.scss +31 -0
- package/src/common/icon/index.ts +4 -0
- package/src/common/icon/index.vue +74 -0
- package/src/common/icon/types.ts +16 -0
- package/src/common/index.ts +6 -0
- package/src/common/message/index.ts +5 -0
- package/src/common/message/instance.ts +29 -0
- package/src/common/message/message.scss +108 -0
- package/src/common/message/message.ts +80 -0
- package/src/common/message/message.vue +162 -0
- package/src/common/message/method.ts +172 -0
- package/src/common/overlay/index.scss +14 -0
- package/src/common/overlay/index.ts +3 -0
- package/src/common/overlay/index.vue +117 -0
- package/src/constants/comp.ts +1 -0
- package/src/constants/index.ts +1 -0
- package/src/index.ts +3 -0
- package/src/page/index.ts +1 -0
- package/src/page/page-wrapper/index.scss +31 -0
- package/src/page/page-wrapper/index.ts +5 -0
- package/src/page/page-wrapper/index.vue +31 -0
- package/src/styles/vars.scss +500 -0
- package/src/use/index.ts +14 -0
- package/src/use/onPopupReopen.ts +15 -0
- package/src/use/use-delayed-toggle/index.ts +30 -0
- package/src/use/use-floating/index.ts +121 -0
- package/src/use/use-forward-ref.ts +35 -0
- package/src/use/use-global-config/index.ts +81 -0
- package/src/use/use-id/index.ts +43 -0
- package/src/use/use-model-toggle/index.ts +151 -0
- package/src/use/use-namespace/index.ts +91 -0
- package/src/use/use-ordered-children/index.ts +43 -0
- package/src/use/use-popper-container/index.ts +43 -0
- package/src/use/use-timeout/index.ts +18 -0
- package/src/use/use-z-index/index.ts +20 -0
- package/src/use/useGlobalZIndex.ts +24 -0
- package/src/use/useLazyRender.ts +17 -0
- package/src/use/useLockScroll.ts +66 -0
- package/src/utils/aria.ts +126 -0
- package/src/utils/arrays.ts +13 -0
- package/src/utils/error.ts +23 -0
- package/src/utils/event.ts +15 -0
- package/src/utils/helper.ts +7 -0
- package/src/utils/index.ts +8 -0
- package/src/utils/interceptor.ts +39 -0
- package/src/utils/mount-component.ts +65 -0
- package/src/utils/popper.ts +6 -0
- package/src/utils/rand.ts +12 -0
- package/src/utils/scroll.ts +101 -0
- package/src/utils/vnode.ts +169 -0
- package/src/web/avatar/index.scss +50 -0
- package/src/web/avatar/index.ts +3 -0
- package/src/web/avatar/index.vue +83 -0
- package/src/web/back-top/index.scss +35 -0
- package/src/web/back-top/index.ts +3 -0
- package/src/web/back-top/index.vue +72 -0
- package/src/web/back-top/types.ts +14 -0
- package/src/web/back-top/use-back-top.ts +65 -0
- package/src/web/cascader/index.scss +214 -0
- package/src/web/cascader/index.ts +5 -0
- package/src/web/cascader/index.vue +767 -0
- package/src/web/cascader-panel/config.ts +44 -0
- package/src/web/cascader-panel/index.scss +134 -0
- package/src/web/cascader-panel/index.ts +5 -0
- package/src/web/cascader-panel/index.vue +319 -0
- package/src/web/cascader-panel/menu.vue +135 -0
- package/src/web/cascader-panel/node-content.ts +23 -0
- package/src/web/cascader-panel/node.ts +218 -0
- package/src/web/cascader-panel/node.vue +197 -0
- package/src/web/cascader-panel/store.ts +83 -0
- package/src/web/cascader-panel/types.ts +56 -0
- package/src/web/cascader-panel/utils.ts +40 -0
- package/src/web/cascader-select/README.md +31 -0
- package/src/web/cascader-select/index.scss +54 -0
- package/src/web/cascader-select/index.ts +5 -0
- package/src/web/cascader-select/index.vue +132 -0
- package/src/web/cascader-select/types.ts +9 -0
- package/src/web/context-menu/createContextMenu.ts +72 -0
- package/src/web/context-menu/index.ts +4 -0
- package/src/web/context-menu/index.vue +89 -0
- package/src/web/context-menu/types.ts +27 -0
- package/src/web/context-menu/useContextMenu.ts +14 -0
- package/src/web/descriptions/description-item.vue +34 -0
- package/src/web/descriptions/description.vue +124 -0
- package/src/web/descriptions/descriptions-cell.ts +95 -0
- package/src/web/descriptions/descriptions-item.scss +68 -0
- package/src/web/descriptions/descriptions-row.vue +49 -0
- package/src/web/descriptions/descriptions.scss +153 -0
- package/src/web/descriptions/descriptions.type.ts +19 -0
- package/src/web/descriptions/index.ts +4 -0
- package/src/web/descriptions/token.ts +4 -0
- package/src/web/divider/index.scss +53 -0
- package/src/web/divider/index.ts +5 -0
- package/src/web/divider/index.vue +60 -0
- package/src/web/divider/types.ts +2 -0
- package/src/web/empty/assets/no-collect.png +0 -0
- package/src/web/empty/assets/no-data.png +0 -0
- package/src/web/empty/assets/no-filter.png +0 -0
- package/src/web/empty/assets/no-page-data.png +0 -0
- package/src/web/empty/assets/no-search.png +0 -0
- package/src/web/empty/constants.ts +12 -0
- package/src/web/empty/index.scss +57 -0
- package/src/web/empty/index.ts +5 -0
- package/src/web/empty/index.vue +96 -0
- package/src/web/exception/exception.png +0 -0
- package/src/web/exception/index.ts +3 -0
- package/src/web/exception/index.vue +44 -0
- package/src/web/filter/README.md +25 -0
- package/src/web/filter/index.scss +14 -0
- package/src/web/filter/index.ts +5 -0
- package/src/web/filter/index.vue +60 -0
- package/src/web/filter/type.ts +13 -0
- package/src/web/focus-trap/index.ts +6 -0
- package/src/web/focus-trap/index.vue +328 -0
- package/src/web/focus-trap/tokens.ts +23 -0
- package/src/web/focus-trap/utils.ts +178 -0
- package/src/web/full-screen/index.scss +22 -0
- package/src/web/full-screen/index.ts +3 -0
- package/src/web/full-screen/index.vue +24 -0
- package/src/web/icon-text/index.ts +3 -0
- package/src/web/icon-text/index.vue +77 -0
- package/src/web/image/index.scss +46 -0
- package/src/web/image/index.ts +5 -0
- package/src/web/image/index.vue +251 -0
- package/src/web/image/types.ts +1 -0
- package/src/web/index.ts +33 -0
- package/src/web/input/index.scss +473 -0
- package/src/web/input/index.ts +3 -0
- package/src/web/input/index.vue +533 -0
- package/src/web/input/utils.ts +102 -0
- package/src/web/layouts/blank.vue +4 -0
- package/src/web/layouts/footer/index.scss +31 -0
- package/src/web/layouts/footer/index.ts +3 -0
- package/src/web/layouts/footer/index.vue +38 -0
- package/src/web/layouts/header/index.scss +35 -0
- package/src/web/layouts/header/index.ts +3 -0
- package/src/web/layouts/header/index.vue +47 -0
- package/src/web/layouts/iframe/index.scss +18 -0
- package/src/web/layouts/iframe/index.vue +36 -0
- package/src/web/layouts/iframe/page.vue +30 -0
- package/src/web/layouts/index.ts +8 -0
- package/src/web/layouts/router-view-content/index.vue +70 -0
- package/src/web/link/index.scss +95 -0
- package/src/web/link/index.ts +3 -0
- package/src/web/link/index.vue +68 -0
- package/src/web/loading/directive.ts +104 -0
- package/src/web/loading/index.ts +6 -0
- package/src/web/loading/loading.scss +108 -0
- package/src/web/loading/loading.ts +156 -0
- package/src/web/loading/service.ts +145 -0
- package/src/web/loading/types.ts +29 -0
- package/src/web/logo/index.scss +31 -0
- package/src/web/logo/index.ts +5 -0
- package/src/web/logo/index.vue +45 -0
- package/src/web/logo/types.ts +6 -0
- package/src/web/menu/index.scss +336 -0
- package/src/web/menu/index.ts +8 -0
- package/src/web/menu/menu-collapse-transition.vue +62 -0
- package/src/web/menu/menu-item-group.vue +27 -0
- package/src/web/menu/menu-item.vue +126 -0
- package/src/web/menu/menu.vue +459 -0
- package/src/web/menu/sub-menu.vue +440 -0
- package/src/web/menu/types.ts +66 -0
- package/src/web/menu/use-menu-css-var.ts +11 -0
- package/src/web/menu/use-menu.ts +60 -0
- package/src/web/menu/utils/menu-bar.ts +19 -0
- package/src/web/menu/utils/menu-item.ts +55 -0
- package/src/web/menu/utils/submenu.ts +66 -0
- package/src/web/multiple-select-flat/index.ts +5 -0
- package/src/web/multiple-select-flat/index.vue +53 -0
- package/src/web/multiple-select-flat/types.ts +5 -0
- package/src/web/multiple-tabs/index.scss +16 -0
- package/src/web/multiple-tabs/index.ts +5 -0
- package/src/web/multiple-tabs/index.vue +193 -0
- package/src/web/multiple-tabs/tab-content.vue +40 -0
- package/src/web/multiple-tabs/types.ts +3 -0
- package/src/web/multiple-tabs/use/index.ts +2 -0
- package/src/web/multiple-tabs/use/use-multiple-tabs.ts +86 -0
- package/src/web/multiple-tabs/use/use-tab-dropdown.ts +101 -0
- package/src/web/nodata/README.md +42 -0
- package/src/web/nodata/fail.vue +13 -0
- package/src/web/nodata/img/100.png +0 -0
- package/src/web/nodata/img/101.png +0 -0
- package/src/web/nodata/img/102.png +0 -0
- package/src/web/nodata/img/103.png +0 -0
- package/src/web/nodata/img/104.png +0 -0
- package/src/web/nodata/img/105.png +0 -0
- package/src/web/nodata/img/106.png +0 -0
- package/src/web/nodata/img/107.png +0 -0
- package/src/web/nodata/img/200.png +0 -0
- package/src/web/nodata/img/201.png +0 -0
- package/src/web/nodata/img/202.png +0 -0
- package/src/web/nodata/img/203.png +0 -0
- package/src/web/nodata/index.scss +37 -0
- package/src/web/nodata/index.ts +6 -0
- package/src/web/nodata/index.vue +46 -0
- package/src/web/nodata/types.ts +17 -0
- package/src/web/only-child/index.tsx +69 -0
- package/src/web/pagination/components/jumper.vue +49 -0
- package/src/web/pagination/components/next.vue +40 -0
- package/src/web/pagination/components/pager.vue +215 -0
- package/src/web/pagination/components/prev.vue +35 -0
- package/src/web/pagination/components/sizes.vue +76 -0
- package/src/web/pagination/components/total.vue +21 -0
- package/src/web/pagination/index.scss +231 -0
- package/src/web/pagination/index.ts +5 -0
- package/src/web/pagination/pagination.ts +363 -0
- package/src/web/pagination/usePagination.ts +13 -0
- package/src/web/popover/directive.ts +21 -0
- package/src/web/popover/index.scss +58 -0
- package/src/web/popover/index.ts +3 -0
- package/src/web/popover/index.vue +161 -0
- package/src/web/popover/types.ts +26 -0
- package/src/web/popper/arrow.vue +45 -0
- package/src/web/popper/content.vue +311 -0
- package/src/web/popper/index.scss +108 -0
- package/src/web/popper/index.ts +11 -0
- package/src/web/popper/popper.vue +57 -0
- package/src/web/popper/tokens.ts +28 -0
- package/src/web/popper/trigger.vue +166 -0
- package/src/web/popper/types.ts +49 -0
- package/src/web/popper/utils.ts +81 -0
- package/src/web/qrcode/drawCanvas.ts +32 -0
- package/src/web/qrcode/drawLogo.ts +82 -0
- package/src/web/qrcode/index.ts +5 -0
- package/src/web/qrcode/index.vue +107 -0
- package/src/web/qrcode/qrcodePlus.ts +4 -0
- package/src/web/qrcode/toCanvas.ts +11 -0
- package/src/web/qrcode/types.ts +38 -0
- package/src/web/result/index.scss +69 -0
- package/src/web/result/index.ts +3 -0
- package/src/web/result/index.vue +63 -0
- package/src/web/scrollbar/bar.vue +48 -0
- package/src/web/scrollbar/index.scss +91 -0
- package/src/web/scrollbar/index.ts +5 -0
- package/src/web/scrollbar/index.vue +236 -0
- package/src/web/scrollbar/thumb.vue +183 -0
- package/src/web/scrollbar/tokens.ts +10 -0
- package/src/web/scrollbar/types.ts +7 -0
- package/src/web/scrollbar/util.ts +38 -0
- package/src/web/select/constants.ts +13 -0
- package/src/web/select/index.ts +11 -0
- package/src/web/select/index.vue +555 -0
- package/src/web/select/option-group.scss +49 -0
- package/src/web/select/option-group.vue +97 -0
- package/src/web/select/option-item.scss +66 -0
- package/src/web/select/option.scss +32 -0
- package/src/web/select/option.vue +110 -0
- package/src/web/select/select-dropdown.scss +86 -0
- package/src/web/select/select-dropdown.vue +51 -0
- package/src/web/select/select.scss +213 -0
- package/src/web/select/token.ts +56 -0
- package/src/web/select/useOption.ts +146 -0
- package/src/web/select/useSelect.ts +942 -0
- package/src/web/select/utils.ts +5 -0
- package/src/web/side-menu/index.scss +66 -0
- package/src/web/side-menu/index.ts +4 -0
- package/src/web/side-menu/index.vue +228 -0
- package/src/web/side-menu/types.ts +20 -0
- package/src/web/single-select/index.scss +60 -0
- package/src/web/single-select/index.ts +5 -0
- package/src/web/single-select/index.vue +70 -0
- package/src/web/single-select/select@2x.png +0 -0
- package/src/web/single-select/types.ts +5 -0
- package/src/web/svg/index.ts +3 -0
- package/src/web/svg/index.vue +22 -0
- package/src/web/tabs/index.scss +579 -0
- package/src/web/tabs/index.ts +6 -0
- package/src/web/tabs/index.vue +236 -0
- package/src/web/tabs/tab-bar.vue +90 -0
- package/src/web/tabs/tab-nav.vue +403 -0
- package/src/web/tabs/tab-pane.vue +90 -0
- package/src/web/tabs/types.ts +66 -0
- package/src/web/tag/index.scss +182 -0
- package/src/web/tag/index.ts +5 -0
- package/src/web/tag/index.vue +78 -0
- package/src/web/tag/types.ts +2 -0
- package/src/web/tooltip/content.vue +239 -0
- package/src/web/tooltip/index.ts +4 -0
- package/src/web/tooltip/tokens.ts +21 -0
- package/src/web/tooltip/tooltip.vue +270 -0
- package/src/web/tooltip/trigger.vue +119 -0
- package/src/web/tooltip/types.ts +56 -0
- package/src/web/tooltip/utils.ts +20 -0
- package/src/web/transition/collapse-transition.vue +73 -0
- package/src/web/transition/index.ts +5 -0
- package/tsconfig.json +8 -0
- package/types/component.ts +1 -0
- package/types/index.d.ts +286 -0
|
@@ -0,0 +1,500 @@
|
|
|
1
|
+
$layout-header: () !default;
|
|
2
|
+
$layout-header: map-merge(
|
|
3
|
+
(
|
|
4
|
+
height: 64px,
|
|
5
|
+
top-height: 40px,
|
|
6
|
+
bg-color: white,
|
|
7
|
+
color: black,
|
|
8
|
+
z-index: 2001,
|
|
9
|
+
border-bottom: 1px solid rgb(231, 231, 231)
|
|
10
|
+
),
|
|
11
|
+
$layout-header
|
|
12
|
+
);
|
|
13
|
+
|
|
14
|
+
$layout-footer: () !default;
|
|
15
|
+
$layout-footer: map-merge(
|
|
16
|
+
(
|
|
17
|
+
'bg-color': #f7f8fa,
|
|
18
|
+
'border-top': '1px solid #f7f8fa',
|
|
19
|
+
'left': getCssVar('menu-width'),
|
|
20
|
+
'height': '30px',
|
|
21
|
+
'left-min-width': 'auto',
|
|
22
|
+
'right-min-width': 'auto'
|
|
23
|
+
),
|
|
24
|
+
$layout-footer
|
|
25
|
+
);
|
|
26
|
+
|
|
27
|
+
$name: side-menu;
|
|
28
|
+
$side-menu: () !default;
|
|
29
|
+
$side-menu: map-merge(
|
|
30
|
+
(
|
|
31
|
+
'border': getCssVar('menu-border-right'),
|
|
32
|
+
'width': 200px,
|
|
33
|
+
'collapse-width': 200px,
|
|
34
|
+
'scroll-mr': 0
|
|
35
|
+
),
|
|
36
|
+
$side-menu
|
|
37
|
+
);
|
|
38
|
+
|
|
39
|
+
$iframe-page: () !default;
|
|
40
|
+
$iframe-page: map-merge(
|
|
41
|
+
(
|
|
42
|
+
'text-color': white
|
|
43
|
+
),
|
|
44
|
+
$iframe-page
|
|
45
|
+
);
|
|
46
|
+
|
|
47
|
+
$icon: () !default;
|
|
48
|
+
$icon: map-merge(
|
|
49
|
+
(
|
|
50
|
+
'text-color': black
|
|
51
|
+
),
|
|
52
|
+
$icon
|
|
53
|
+
);
|
|
54
|
+
|
|
55
|
+
$message: () !default;
|
|
56
|
+
$message: map-merge(
|
|
57
|
+
(
|
|
58
|
+
'border-radius': 2px,
|
|
59
|
+
'border-width': 2px,
|
|
60
|
+
'border-color': red,
|
|
61
|
+
'padding': 15px 19px,
|
|
62
|
+
'bg-color': getCssVar('color', 'info', 'light-9')
|
|
63
|
+
),
|
|
64
|
+
$message
|
|
65
|
+
);
|
|
66
|
+
|
|
67
|
+
$divider: () !default;
|
|
68
|
+
$divider: map-merge(
|
|
69
|
+
(
|
|
70
|
+
'margin-y': '24px',
|
|
71
|
+
'margin-x': '8px',
|
|
72
|
+
'border-color': #dcdfe6,
|
|
73
|
+
'border-style': 'solid'
|
|
74
|
+
),
|
|
75
|
+
$divider
|
|
76
|
+
);
|
|
77
|
+
|
|
78
|
+
$tabs: () !default;
|
|
79
|
+
$tabs: map-merge(
|
|
80
|
+
(
|
|
81
|
+
'padding': 0,
|
|
82
|
+
'font-size': 14px,
|
|
83
|
+
'font-weight': 400,
|
|
84
|
+
'font-weight-active': 500,
|
|
85
|
+
'header-height': 40px,
|
|
86
|
+
'border-bottom': 1px solid #eee,
|
|
87
|
+
'nav-color': #eee,
|
|
88
|
+
'header-margin': 0 0 15px,
|
|
89
|
+
'header-padding': 0,
|
|
90
|
+
'header-border-bottom': none,
|
|
91
|
+
'item-padding': 0 20px,
|
|
92
|
+
'item-max-width': 100%,
|
|
93
|
+
'item-bg-color': white,
|
|
94
|
+
'item-bg-color-active': #15b4f1,
|
|
95
|
+
'item-bg-color-hover': #15b4f1,
|
|
96
|
+
'item-color': black,
|
|
97
|
+
'item-color-active': white,
|
|
98
|
+
'item-color-hover': white,
|
|
99
|
+
'item-border': 1px solid #eee,
|
|
100
|
+
'item-border-active': 0 solid transparent,
|
|
101
|
+
'item-border-hover': 0 solid transparent,
|
|
102
|
+
'item-distance': 10px,
|
|
103
|
+
'item-border-radius': 2px 2px 0 0,
|
|
104
|
+
'close-icon-left': 5px,
|
|
105
|
+
'close-icon-hover-color': white,
|
|
106
|
+
'close-icon-hover-bg-color': #a8abb2,
|
|
107
|
+
'add-icon-right': 30px,
|
|
108
|
+
'add-icon-padding-left': 20px,
|
|
109
|
+
'scroll-padding': 0 60px 0 20px,
|
|
110
|
+
'active-distance': 14px,
|
|
111
|
+
'show-border-bottom': block
|
|
112
|
+
),
|
|
113
|
+
$tabs
|
|
114
|
+
);
|
|
115
|
+
|
|
116
|
+
$multiple-tabs: () !default;
|
|
117
|
+
$multiple-tabs: map-merge(
|
|
118
|
+
(
|
|
119
|
+
'bg-color': #f8f8f8,
|
|
120
|
+
'height': 31px
|
|
121
|
+
),
|
|
122
|
+
$multiple-tabs
|
|
123
|
+
);
|
|
124
|
+
|
|
125
|
+
$menu: () !default;
|
|
126
|
+
$menu: map-merge(
|
|
127
|
+
(
|
|
128
|
+
'bg-color': getCssVar('theme-color'),
|
|
129
|
+
'sub-menu-bg-color': getCssVar('theme-color'),
|
|
130
|
+
'active-color': getCssVar('primary-color'),
|
|
131
|
+
'text-color': getCssVar('text-primary-color'),
|
|
132
|
+
'hover-text-color': getCssVar('primary-color'),
|
|
133
|
+
'hover-bg-color': getCssVar('primary-color-light-9'),
|
|
134
|
+
'focus-text-color': getCssVar('primary-color'),
|
|
135
|
+
'focus-bg-color': getCssVar('primary-color-light-9'),
|
|
136
|
+
'item-height': 56px,
|
|
137
|
+
'sub-item-height': calc(#{getCssVar('menu-item-height')} - 6px),
|
|
138
|
+
'horizontal-sub-item-height': 36px,
|
|
139
|
+
'item-font-size': getCssVar('font-size-base'),
|
|
140
|
+
'item-hover-fill': getCssVar('primary-color-light-9'),
|
|
141
|
+
'border-color': #dcdfe6,
|
|
142
|
+
'border-bottom': getCssVar('border'),
|
|
143
|
+
'base-level-padding': 20px,
|
|
144
|
+
'level-padding': 20px,
|
|
145
|
+
'icon-mr': 8px,
|
|
146
|
+
'border': 0 solid transparent,
|
|
147
|
+
'border-right': 1px solid #dcdfe6,
|
|
148
|
+
'item-min-width': 200px,
|
|
149
|
+
'popup-border-radius': getCssVar('border-radius')
|
|
150
|
+
),
|
|
151
|
+
$menu
|
|
152
|
+
);
|
|
153
|
+
|
|
154
|
+
$logo: () !default;
|
|
155
|
+
$logo: map-merge(
|
|
156
|
+
(
|
|
157
|
+
img-width: 30px,
|
|
158
|
+
img-height: 30px,
|
|
159
|
+
title-color: black,
|
|
160
|
+
title-font-size: 16px,
|
|
161
|
+
title-font-weight: 400,
|
|
162
|
+
cursor: pointer
|
|
163
|
+
),
|
|
164
|
+
$logo
|
|
165
|
+
);
|
|
166
|
+
|
|
167
|
+
$loading: () !default;
|
|
168
|
+
$loading: map-merge(
|
|
169
|
+
(
|
|
170
|
+
'mask-color': rgba(255, 255, 255, 0.9),
|
|
171
|
+
'spinner-size': 20px,
|
|
172
|
+
'fullscreen-spinner-size': 50px,
|
|
173
|
+
'rotate-animation': loading-rotate 2s linear infinite,
|
|
174
|
+
'color': #409eff,
|
|
175
|
+
'text-size': 14px,
|
|
176
|
+
'margin': 3px 0
|
|
177
|
+
),
|
|
178
|
+
$loading
|
|
179
|
+
);
|
|
180
|
+
|
|
181
|
+
$full-screen: () !default;
|
|
182
|
+
$full-screen: map-merge(
|
|
183
|
+
(
|
|
184
|
+
'color': #434343,
|
|
185
|
+
'hover-color': #0171f6,
|
|
186
|
+
'font-size': 12px
|
|
187
|
+
),
|
|
188
|
+
$full-screen
|
|
189
|
+
);
|
|
190
|
+
|
|
191
|
+
// Select
|
|
192
|
+
$select: () !default;
|
|
193
|
+
$select: map-merge(
|
|
194
|
+
(
|
|
195
|
+
'border-color-hover': getCssVar('border-color-hover'),
|
|
196
|
+
'disabled-border': getCssVar('disabled-border-color'),
|
|
197
|
+
'font-size': getCssVar('font-size-base'),
|
|
198
|
+
'close-hover-color': getCssVar('text-secondary-color'),
|
|
199
|
+
'input-color': getCssVar('text-placeholder-color'),
|
|
200
|
+
'multiple-input-color': getCssVar('text-regular-color'),
|
|
201
|
+
'input-focus-border-color': getCssVar('primary-color'),
|
|
202
|
+
'input-font-size': 14px
|
|
203
|
+
),
|
|
204
|
+
$select
|
|
205
|
+
);
|
|
206
|
+
|
|
207
|
+
$select-option: () !default;
|
|
208
|
+
$select-option: map-merge(
|
|
209
|
+
(
|
|
210
|
+
'text-color': getCssVar('text-regular-color'),
|
|
211
|
+
'disabled-color': getCssVar('text-placeholder-color'),
|
|
212
|
+
'height': 34px,
|
|
213
|
+
'hover-background': getCssVar('fill-color', 'light'),
|
|
214
|
+
'selected-text-color': getCssVar('primary-color')
|
|
215
|
+
),
|
|
216
|
+
$select-option
|
|
217
|
+
);
|
|
218
|
+
|
|
219
|
+
$select-group: () !default;
|
|
220
|
+
$select-group: map-merge(
|
|
221
|
+
(
|
|
222
|
+
'text-color': getCssVar('info-color'),
|
|
223
|
+
'height': 30px,
|
|
224
|
+
'font-size': 12px
|
|
225
|
+
),
|
|
226
|
+
$select-group
|
|
227
|
+
);
|
|
228
|
+
|
|
229
|
+
$select-dropdown: () !default;
|
|
230
|
+
$select-dropdown: map-merge(
|
|
231
|
+
(
|
|
232
|
+
'bg-color': getCssVar('bg-color', 'overlay'),
|
|
233
|
+
'shadow': getCssVar('box-shadow-light'),
|
|
234
|
+
'empty-color': getCssVar('text-secondary-color'),
|
|
235
|
+
'max-height': 274px,
|
|
236
|
+
'padding': 6px 0,
|
|
237
|
+
'empty-padding': 10px 0,
|
|
238
|
+
'border': 1px solid getCssVar('border-color-light')
|
|
239
|
+
),
|
|
240
|
+
$select-dropdown
|
|
241
|
+
);
|
|
242
|
+
|
|
243
|
+
$select-tags-prefix-padding: () !default;
|
|
244
|
+
$select-tags-prefix-padding: map-merge(
|
|
245
|
+
(
|
|
246
|
+
'large': 8px,
|
|
247
|
+
'default': 6px,
|
|
248
|
+
'small': 4px
|
|
249
|
+
),
|
|
250
|
+
$select-tags-prefix-padding
|
|
251
|
+
);
|
|
252
|
+
|
|
253
|
+
$input: () !default;
|
|
254
|
+
$input: map-merge(
|
|
255
|
+
(
|
|
256
|
+
'width': '100%',
|
|
257
|
+
'text-color': getCssVar('text-regular-color'),
|
|
258
|
+
'border': getCssVar('border'),
|
|
259
|
+
'hover-border': getCssVar('border-color-hover'),
|
|
260
|
+
'focus-border': getCssVar('primary-color'),
|
|
261
|
+
'transparent-border': 0 0 0 1px transparent inset,
|
|
262
|
+
'border-color': getCssVar('border-color'),
|
|
263
|
+
'border-radius': getCssVar('border-radius-base'),
|
|
264
|
+
'bg-color': getCssVar('fill-color', 'blank'),
|
|
265
|
+
'icon-color': getCssVar('text-placeholder-color'),
|
|
266
|
+
'placeholder-color': getCssVar('text-placeholder-color'),
|
|
267
|
+
'hover-border-color': getCssVar('border-color-hover'),
|
|
268
|
+
'clear-hover-color': getCssVar('text-secondary-color'),
|
|
269
|
+
'focus-border-color': getCssVar('primary-color')
|
|
270
|
+
),
|
|
271
|
+
$input
|
|
272
|
+
);
|
|
273
|
+
|
|
274
|
+
$input-disabled: () !default;
|
|
275
|
+
$input-disabled: map-merge(
|
|
276
|
+
(
|
|
277
|
+
'fill': getCssVar('disabled-bg-color'),
|
|
278
|
+
'border': getCssVar('disabled-border-color'),
|
|
279
|
+
'text-color': getCssVar('disabled-text-color'),
|
|
280
|
+
'placeholder-color': getCssVar('text-placeholder-color')
|
|
281
|
+
),
|
|
282
|
+
$input-disabled
|
|
283
|
+
);
|
|
284
|
+
|
|
285
|
+
$input-font-size: () !default;
|
|
286
|
+
$input-font-size: map-merge(
|
|
287
|
+
(
|
|
288
|
+
'large': 14px,
|
|
289
|
+
'default': 14px,
|
|
290
|
+
'small': 12px
|
|
291
|
+
),
|
|
292
|
+
$input-font-size
|
|
293
|
+
);
|
|
294
|
+
|
|
295
|
+
$input-height: () !default;
|
|
296
|
+
$input-height: map-merge($common-component-size, $input-height);
|
|
297
|
+
|
|
298
|
+
$input-line-height: () !default;
|
|
299
|
+
$input-line-height: map-merge($common-component-size, $input-line-height);
|
|
300
|
+
|
|
301
|
+
$input-number-width: () !default;
|
|
302
|
+
$input-number-width: map-merge(
|
|
303
|
+
(
|
|
304
|
+
'large': 180px,
|
|
305
|
+
'default': 150px,
|
|
306
|
+
'small': 120px
|
|
307
|
+
),
|
|
308
|
+
$input-number-width
|
|
309
|
+
);
|
|
310
|
+
|
|
311
|
+
$input-padding-horizontal: () !default;
|
|
312
|
+
$input-padding-horizontal: map-merge(
|
|
313
|
+
(
|
|
314
|
+
'large': 16px,
|
|
315
|
+
'default': 12px,
|
|
316
|
+
'small': 8px
|
|
317
|
+
),
|
|
318
|
+
$input-padding-horizontal
|
|
319
|
+
);
|
|
320
|
+
|
|
321
|
+
$cascader: () !default;
|
|
322
|
+
$cascader: map-merge(
|
|
323
|
+
(
|
|
324
|
+
'menu-text-color': getCssVar('text-regular-color'),
|
|
325
|
+
'menu-selected-text-color': getCssVar('primary-color'),
|
|
326
|
+
'menu-fill': getCssVar('bg-color', 'overlay'),
|
|
327
|
+
'menu-font-size': getCssVar('font-size-base'),
|
|
328
|
+
'menu-radius': getCssVar('border-radius-base'),
|
|
329
|
+
'menu-border': solid 1px getCssVar('border-color-light'),
|
|
330
|
+
'menu-shadow': getCssVar('box-shadow-light'),
|
|
331
|
+
'node-background-hover': getCssVar('fill-color', 'light'),
|
|
332
|
+
'node-color-disabled': getCssVar('text-placeholder-color'),
|
|
333
|
+
'color-empty': getCssVar('text-placeholder-color'),
|
|
334
|
+
'tag-background': getCssVar('fill-color')
|
|
335
|
+
),
|
|
336
|
+
$cascader
|
|
337
|
+
);
|
|
338
|
+
|
|
339
|
+
$scrollbar: () !default;
|
|
340
|
+
$scrollbar: map-merge(
|
|
341
|
+
(
|
|
342
|
+
'opacity': 0.3,
|
|
343
|
+
'bg-color': getCssVar('text-secondary-color'),
|
|
344
|
+
'hover-opacity': 0.5,
|
|
345
|
+
'hover-bg-color': getCssVar('text-secondary-color')
|
|
346
|
+
),
|
|
347
|
+
$scrollbar
|
|
348
|
+
);
|
|
349
|
+
|
|
350
|
+
$popover: () !default;
|
|
351
|
+
$popover: map-merge(
|
|
352
|
+
(
|
|
353
|
+
'bg-color': getCssVar('bg-color', 'overlay'),
|
|
354
|
+
'font-size': getCssVar('font-size-base'),
|
|
355
|
+
'border-color': getCssVar('border-color-lighter'),
|
|
356
|
+
'padding': 12px,
|
|
357
|
+
'padding-large': 18px 20px,
|
|
358
|
+
'title-font-size': 16px,
|
|
359
|
+
'title-text-color': getCssVar('text-primary-color'),
|
|
360
|
+
'border-radius': 4px
|
|
361
|
+
),
|
|
362
|
+
$popover
|
|
363
|
+
);
|
|
364
|
+
|
|
365
|
+
$avatar: () !default;
|
|
366
|
+
$avatar: map-merge(
|
|
367
|
+
(
|
|
368
|
+
'text-color': getCssVar('color-white'),
|
|
369
|
+
'bg-color': getCssVar('text-color', 'disabled'),
|
|
370
|
+
'text-size': 14px,
|
|
371
|
+
'icon-size': 18px,
|
|
372
|
+
'border-radius': getCssVar('border-radius-base')
|
|
373
|
+
),
|
|
374
|
+
$avatar
|
|
375
|
+
);
|
|
376
|
+
|
|
377
|
+
$avatar-size: () !default;
|
|
378
|
+
$avatar-size: map-merge(
|
|
379
|
+
(
|
|
380
|
+
'large': 56px,
|
|
381
|
+
'default': 40px,
|
|
382
|
+
'small': 24px
|
|
383
|
+
),
|
|
384
|
+
$avatar-size
|
|
385
|
+
);
|
|
386
|
+
|
|
387
|
+
$descriptions: () !default;
|
|
388
|
+
$descriptions: map-merge(
|
|
389
|
+
(
|
|
390
|
+
'table-border': 1px solid getCssVar('border-color-lighter'),
|
|
391
|
+
'item-bordered-label-background': getCssVar('fill-color', 'light')
|
|
392
|
+
),
|
|
393
|
+
$descriptions
|
|
394
|
+
);
|
|
395
|
+
|
|
396
|
+
$md: () !default;
|
|
397
|
+
$md: map-merge(
|
|
398
|
+
(
|
|
399
|
+
'primary-color': $primary-color,
|
|
400
|
+
'content-max-width': 800px,
|
|
401
|
+
'code-bg-color': #fff5f5,
|
|
402
|
+
'line-numbers-width': '2.5rem',
|
|
403
|
+
'icon-copy':
|
|
404
|
+
url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' height='20' width='20' stroke='rgba(128,128,128,1)' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M9 5H7a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2h-2M9 5a2 2 0 0 0 2 2h2a2 2 0 0 0 2-2M9 5a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2'/%3E%3C/svg%3E"),
|
|
405
|
+
'icon-copied':
|
|
406
|
+
url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' height='20' width='20' stroke='rgba(128,128,128,1)' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M9 5H7a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2h-2M9 5a2 2 0 0 0 2 2h2a2 2 0 0 0 2-2M9 5a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2m-6 9 2 2 4-4'/%3E%3C/svg%3E"),
|
|
407
|
+
// info
|
|
408
|
+
info-title-color: #193c47,
|
|
409
|
+
info-bg-color: #eef9fd,
|
|
410
|
+
info-border-color: #4cb3d4,
|
|
411
|
+
info-code-bg-color: rgb(76 179 212 / 10%),
|
|
412
|
+
// note
|
|
413
|
+
note-title-color: #474748,
|
|
414
|
+
note-bg-color: #fdfdfe,
|
|
415
|
+
note-border-color: #ccc,
|
|
416
|
+
note-code-bg-color: rgb(212 213 216 / 20%),
|
|
417
|
+
// tip
|
|
418
|
+
tip-title-color: #003100,
|
|
419
|
+
tip-bg-color: #e6f6e6,
|
|
420
|
+
tip-border-color: #009400,
|
|
421
|
+
tip-code-bg-color: rgb(0 148 0 / 15%),
|
|
422
|
+
// warning
|
|
423
|
+
warning-title-color: #4d3800,
|
|
424
|
+
warning-bg-color: #fff8e6,
|
|
425
|
+
warning-border-color: #e6a700,
|
|
426
|
+
warning-code-bg-color: rgb(230 167 0 / 15%),
|
|
427
|
+
// danger
|
|
428
|
+
danger-title-color: #4b1113,
|
|
429
|
+
danger-bg-color: #ffebec,
|
|
430
|
+
danger-border-color: #e13238,
|
|
431
|
+
danger-code-bg-color: rgb(225 50 56 / 15%),
|
|
432
|
+
// detail
|
|
433
|
+
detail-bg-color: #eee,
|
|
434
|
+
detail-text-color: inherit,
|
|
435
|
+
detail-code-bg-color: rgb(127 127 127 / 15%)
|
|
436
|
+
),
|
|
437
|
+
$md
|
|
438
|
+
);
|
|
439
|
+
|
|
440
|
+
$pagination: () !default;
|
|
441
|
+
$pagination: map-merge(
|
|
442
|
+
(
|
|
443
|
+
'font-size': 14px,
|
|
444
|
+
'bg-color': getCssVar('fill-color', 'blank'),
|
|
445
|
+
'text-color': getCssVar('text-primary-color'),
|
|
446
|
+
'border-radius': 2px,
|
|
447
|
+
'button-color': getCssVar('text-primary-color'),
|
|
448
|
+
'button-width': 32px,
|
|
449
|
+
'button-height': 32px,
|
|
450
|
+
'button-disabled-color': getCssVar('text-placeholder-color'),
|
|
451
|
+
'button-disabled-bg-color': getCssVar('fill-color', 'blank'),
|
|
452
|
+
'button-bg-color': getCssVar('fill-color'),
|
|
453
|
+
'hover-color': getCssVar('primary-color'),
|
|
454
|
+
'font-size-small': 12px,
|
|
455
|
+
'button-width-small': 24px,
|
|
456
|
+
'button-height-small': 24px,
|
|
457
|
+
'item-gap': 16px
|
|
458
|
+
),
|
|
459
|
+
$pagination
|
|
460
|
+
);
|
|
461
|
+
|
|
462
|
+
$tag: () !default;
|
|
463
|
+
$tag: map-merge((
|
|
464
|
+
'font-size': 12px,
|
|
465
|
+
'border-radius': 4px,
|
|
466
|
+
'border-radius-rounded': 9999px,
|
|
467
|
+
'content-line-clamp-num': 1,
|
|
468
|
+
'content-max-width': 100%
|
|
469
|
+
), $tag);
|
|
470
|
+
|
|
471
|
+
|
|
472
|
+
$tag-height: () !default;
|
|
473
|
+
$tag-height: map-merge(
|
|
474
|
+
(
|
|
475
|
+
'large': 32px,
|
|
476
|
+
'default': 24px,
|
|
477
|
+
'small': 20px,
|
|
478
|
+
),
|
|
479
|
+
$tag-height
|
|
480
|
+
);
|
|
481
|
+
|
|
482
|
+
$tag-padding: () !default;
|
|
483
|
+
$tag-padding: map-merge(
|
|
484
|
+
(
|
|
485
|
+
'large': 12px,
|
|
486
|
+
'default': 10px,
|
|
487
|
+
'small': 8px,
|
|
488
|
+
),
|
|
489
|
+
$tag-padding
|
|
490
|
+
);
|
|
491
|
+
|
|
492
|
+
$tag-icon-size: () !default;
|
|
493
|
+
$tag-icon-size: map-merge(
|
|
494
|
+
(
|
|
495
|
+
'large': 16px,
|
|
496
|
+
'default': 14px,
|
|
497
|
+
'small': 12px,
|
|
498
|
+
),
|
|
499
|
+
$tag-icon-size
|
|
500
|
+
);
|
package/src/use/index.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export * from './useLockScroll';
|
|
2
|
+
export * from './useLazyRender';
|
|
3
|
+
export * from './useGlobalZIndex';
|
|
4
|
+
export * from './onPopupReopen';
|
|
5
|
+
export * from './use-global-config';
|
|
6
|
+
export * from './use-namespace';
|
|
7
|
+
export * from './use-floating';
|
|
8
|
+
export * from './use-z-index';
|
|
9
|
+
export * from './use-ordered-children';
|
|
10
|
+
export * from './use-id';
|
|
11
|
+
export * from './use-forward-ref';
|
|
12
|
+
export * from './use-popper-container';
|
|
13
|
+
export * from './use-delayed-toggle';
|
|
14
|
+
export * from './use-model-toggle';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { inject, type InjectionKey, watch } from 'vue';
|
|
2
|
+
|
|
3
|
+
export const POPUP_TOGGLE_KEY: InjectionKey<() => boolean> = Symbol();
|
|
4
|
+
|
|
5
|
+
export function onPopupReopen(callback: () => void) {
|
|
6
|
+
const popupToggleStatus = inject(POPUP_TOGGLE_KEY, null);
|
|
7
|
+
|
|
8
|
+
if (popupToggleStatus) {
|
|
9
|
+
watch(popupToggleStatus, (show) => {
|
|
10
|
+
if (show) {
|
|
11
|
+
callback();
|
|
12
|
+
}
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { unref } from 'vue';
|
|
2
|
+
import { useTimeout } from '../use-timeout';
|
|
3
|
+
|
|
4
|
+
export type UseDelayedToggleProps = {
|
|
5
|
+
open: (event?: Event) => void;
|
|
6
|
+
close: (event?: Event) => void;
|
|
7
|
+
showAfter: number;
|
|
8
|
+
hideAfter: number;
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
export const useDelayedToggle = ({ showAfter = 0, hideAfter = 200, open, close }: UseDelayedToggleProps) => {
|
|
12
|
+
const { registerTimeout } = useTimeout();
|
|
13
|
+
|
|
14
|
+
const onOpen = (event?: Event) => {
|
|
15
|
+
registerTimeout(() => {
|
|
16
|
+
open(event);
|
|
17
|
+
}, unref(showAfter));
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
const onClose = (event?: Event) => {
|
|
21
|
+
registerTimeout(() => {
|
|
22
|
+
close(event);
|
|
23
|
+
}, unref(hideAfter));
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
return {
|
|
27
|
+
onOpen,
|
|
28
|
+
onClose
|
|
29
|
+
};
|
|
30
|
+
};
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
export {};
|
|
2
|
+
// import { isRef, onMounted, ref, unref, watchEffect } from 'vue';
|
|
3
|
+
// import { isClient, unrefElement } from '@vueuse/core';
|
|
4
|
+
// import { isNil } from 'lodash';
|
|
5
|
+
// import { arrow as arrowCore, computePosition } from '@floating-ui/dom';
|
|
6
|
+
//
|
|
7
|
+
// import type { Ref, ToRefs } from 'vue';
|
|
8
|
+
// import type {
|
|
9
|
+
// ComputePositionReturn,
|
|
10
|
+
// Middleware,
|
|
11
|
+
// Placement,
|
|
12
|
+
// SideObject,
|
|
13
|
+
// Strategy,
|
|
14
|
+
// VirtualElement
|
|
15
|
+
// } from '@floating-ui/dom';
|
|
16
|
+
//
|
|
17
|
+
//
|
|
18
|
+
// export type UseFloatingProps = ToRefs<{
|
|
19
|
+
// middleware: Array<Middleware>
|
|
20
|
+
// placement: Placement
|
|
21
|
+
// strategy: Strategy
|
|
22
|
+
// }>
|
|
23
|
+
//
|
|
24
|
+
// type ElementRef = Parameters<typeof unrefElement>['0']
|
|
25
|
+
//
|
|
26
|
+
// const unrefReference = (
|
|
27
|
+
// elRef: ElementRef | Ref<VirtualElement | undefined>
|
|
28
|
+
// ) => {
|
|
29
|
+
// if (!isClient) return;
|
|
30
|
+
// if (!elRef) return elRef;
|
|
31
|
+
// const unrefEl = unrefElement(elRef as ElementRef);
|
|
32
|
+
// if (unrefEl) return unrefEl;
|
|
33
|
+
// return isRef(elRef) ? unrefEl : (elRef as VirtualElement);
|
|
34
|
+
// };
|
|
35
|
+
//
|
|
36
|
+
// export const getPositionDataWithUnit = <T extends Record<string, number>>(
|
|
37
|
+
// record: T | undefined,
|
|
38
|
+
// key: keyof T
|
|
39
|
+
// ) => {
|
|
40
|
+
// const value = record?.[key];
|
|
41
|
+
// return isNil(value) ? '' : `${value}px`;
|
|
42
|
+
// };
|
|
43
|
+
//
|
|
44
|
+
// export const useFloating = ({
|
|
45
|
+
// middleware,
|
|
46
|
+
// placement,
|
|
47
|
+
// strategy
|
|
48
|
+
// }: UseFloatingProps) => {
|
|
49
|
+
// const referenceRef = ref<HTMLElement | VirtualElement>();
|
|
50
|
+
// const contentRef = ref<HTMLElement>();
|
|
51
|
+
// const x = ref<number>();
|
|
52
|
+
// const y = ref<number>();
|
|
53
|
+
// const middlewareData = ref<ComputePositionReturn['middlewareData']>({});
|
|
54
|
+
//
|
|
55
|
+
// const states = {
|
|
56
|
+
// x,
|
|
57
|
+
// y,
|
|
58
|
+
// placement,
|
|
59
|
+
// strategy,
|
|
60
|
+
// middlewareData
|
|
61
|
+
// } as const;
|
|
62
|
+
//
|
|
63
|
+
// const update = async () => {
|
|
64
|
+
// if (!isClient) return;
|
|
65
|
+
//
|
|
66
|
+
// const referenceEl = unrefReference(referenceRef);
|
|
67
|
+
// const contentEl = unrefElement(contentRef);
|
|
68
|
+
// if (!referenceEl || !contentEl) return;
|
|
69
|
+
//
|
|
70
|
+
// const data = await computePosition(referenceEl, contentEl, {
|
|
71
|
+
// placement: unref(placement),
|
|
72
|
+
// strategy: unref(strategy),
|
|
73
|
+
// middleware: unref(middleware)
|
|
74
|
+
// });
|
|
75
|
+
//
|
|
76
|
+
// Object.keys(states).forEach((key) => {
|
|
77
|
+
// states[key].value = data[key];
|
|
78
|
+
// });
|
|
79
|
+
// };
|
|
80
|
+
//
|
|
81
|
+
// onMounted(() => {
|
|
82
|
+
// watchEffect(() => {
|
|
83
|
+
// update();
|
|
84
|
+
// });
|
|
85
|
+
// });
|
|
86
|
+
//
|
|
87
|
+
// return {
|
|
88
|
+
// ...states,
|
|
89
|
+
// update,
|
|
90
|
+
// referenceRef,
|
|
91
|
+
// contentRef
|
|
92
|
+
// };
|
|
93
|
+
// };
|
|
94
|
+
//
|
|
95
|
+
// export type ArrowMiddlewareProps = {
|
|
96
|
+
// arrowRef: Ref<HTMLElement | null | undefined>
|
|
97
|
+
// padding?: number | SideObject
|
|
98
|
+
// }
|
|
99
|
+
//
|
|
100
|
+
// export const arrowMiddleware = ({
|
|
101
|
+
// arrowRef,
|
|
102
|
+
// padding
|
|
103
|
+
// }: ArrowMiddlewareProps): Middleware => {
|
|
104
|
+
// return {
|
|
105
|
+
// name: 'arrow',
|
|
106
|
+
// options: {
|
|
107
|
+
// element: arrowRef,
|
|
108
|
+
// padding
|
|
109
|
+
// },
|
|
110
|
+
//
|
|
111
|
+
// fn(args) {
|
|
112
|
+
// const arrowEl = unref(arrowRef);
|
|
113
|
+
// if (!arrowEl) return {};
|
|
114
|
+
//
|
|
115
|
+
// return arrowCore({
|
|
116
|
+
// element: arrowEl,
|
|
117
|
+
// padding
|
|
118
|
+
// }).fn(args);
|
|
119
|
+
// }
|
|
120
|
+
// };
|
|
121
|
+
// };
|