vxe-pc-ui 4.20.34 → 4.20.35
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/all.esm.js +45718 -45038
- package/dist/all.esm.min.js +3 -3
- package/dist/style.css +307 -1
- package/dist/style.mini.css +1 -1
- package/es/alert/src/alert.js +117 -114
- package/es/anchor/src/anchor-link.js +110 -107
- package/es/anchor/src/anchor.js +212 -209
- package/es/avatar/src/avatar.js +132 -129
- package/es/backtop/src/backtop.js +267 -264
- package/es/badge/src/badge.js +102 -99
- package/es/breadcrumb/src/breadcrumb-item.js +104 -101
- package/es/breadcrumb/src/breadcrumb.js +70 -67
- package/es/button/src/button-group.js +88 -85
- package/es/calendar/src/calendar.js +1371 -1368
- package/es/card/src/card.js +235 -232
- package/es/carousel/src/carousel-item.js +78 -75
- package/es/carousel/src/carousel.js +392 -389
- package/es/cascader/src/cascader.js +1667 -1664
- package/es/checkbox/src/button.js +198 -195
- package/es/checkbox/src/checkbox.js +181 -178
- package/es/checkbox/src/group.js +210 -207
- package/es/collapse/src/collapse-pane.js +98 -95
- package/es/collapse/src/collapse.js +340 -337
- package/es/color-picker/src/color-picker.js +1116 -1113
- package/es/components.d.ts +1 -0
- package/es/components.js +3 -0
- package/es/context-menu/src/context-menu.js +601 -598
- package/es/countdown/src/countdown.js +224 -221
- package/es/date-panel/src/date-panel.js +1905 -1902
- package/es/date-picker/src/date-picker.js +1537 -1534
- package/es/date-range-picker/src/date-range-picker.js +1412 -1409
- package/es/divider/src/divider.js +80 -77
- package/es/drawer/src/drawer.js +778 -775
- package/es/empty/src/empty.js +100 -97
- package/es/form/src/form-group.js +74 -71
- package/es/form/src/form-item.js +76 -73
- package/es/form/src/form.js +789 -786
- package/es/icon/src/icon.js +59 -56
- package/es/icon/style.css +1 -1
- package/es/icon/style.mini.css +1 -1
- package/es/icon-picker/src/icon-picker.js +719 -716
- package/es/image/src/group.js +130 -127
- package/es/image/src/image.js +243 -240
- package/es/image/src/preview.js +627 -624
- package/es/index.esm.js +2 -0
- package/es/index.js +2 -0
- package/es/input/src/input.js +2700 -2697
- package/es/layout-aside/src/layout-aside.js +138 -135
- package/es/layout-body/src/layout-body.js +145 -142
- package/es/layout-container/src/layout-container.js +71 -68
- package/es/layout-footer/src/layout-footer.js +60 -57
- package/es/layout-header/src/layout-header.js +58 -55
- package/es/link/src/link.js +131 -128
- package/es/list/src/list.js +2174 -2171
- package/es/loading/src/loading.js +141 -138
- package/es/mention/src/mention.js +49 -46
- package/es/menu/src/menu.js +799 -796
- package/es/modal/src/modal.js +1519 -1527
- package/es/notice-bar/src/notice-bar.js +168 -165
- package/es/number-input/src/number-input.js +1094 -1091
- package/es/pager/src/pager.js +767 -764
- package/es/password-input/src/password-input.js +431 -428
- package/es/print/src/page-break.js +63 -60
- package/es/print/src/print.js +303 -300
- package/es/pulldown/src/pulldown.js +403 -400
- package/es/radio/src/button.js +214 -211
- package/es/radio/src/group.js +195 -192
- package/es/radio/src/radio.js +194 -191
- package/es/rate/src/rate.js +164 -161
- package/es/result/src/result.js +116 -113
- package/es/row/src/col.js +133 -130
- package/es/row/src/row.js +111 -108
- package/es/scrollbar/src/scrollbar.js +518 -515
- package/es/segmented/src/segmented.js +240 -237
- package/es/select/src/optgroup.js +44 -41
- package/es/select/src/option.js +39 -36
- package/es/select/src/select.js +1914 -1896
- package/es/slider/src/slider.js +419 -416
- package/es/space/src/space.js +190 -187
- package/es/splitter/src/splitter-panel.js +146 -143
- package/es/splitter/src/splitter.js +917 -914
- package/es/step-item/index.d.ts +76 -0
- package/es/step-item/index.js +17 -0
- package/es/steps/index.d.ts +288 -34
- package/es/steps/src/step-info.d.ts +6 -0
- package/es/steps/src/step-info.js +20 -0
- package/es/steps/src/step-item.d.ts +14 -0
- package/es/steps/src/step-item.js +39 -0
- package/es/steps/src/steps.d.ts +68 -8
- package/es/steps/src/steps.js +299 -47
- package/es/steps/src/util.d.ts +7 -0
- package/es/steps/src/util.js +44 -0
- package/es/steps/style.css +297 -0
- package/es/steps/style.mini.css +1 -0
- package/es/style.css +307 -1
- package/es/style.mini.css +1 -1
- package/es/switch/src/switch.js +228 -225
- package/es/table-select/src/table-select.js +865 -862
- package/es/table-transfer/src/table-transfer.js +61 -58
- package/es/tabs/src/tab-pane.js +102 -99
- package/es/tabs/src/tabs.js +936 -933
- package/es/tag/src/tag.js +163 -160
- package/es/text/src/text.js +232 -229
- package/es/text-ellipsis/src/text-ellipsis.js +252 -249
- package/es/textarea/src/textarea.js +434 -431
- package/es/timeline/src/timeline.js +74 -36
- package/es/timeline/src/util.js +7 -4
- package/es/tip/src/tip.js +117 -114
- package/es/tooltip/src/tooltip.js +552 -549
- package/es/tour/src/tour.js +49 -46
- package/es/transfer/src/transfer.js +95 -92
- package/es/tree/src/tree.js +3379 -3376
- package/es/tree-select/src/tree-select.js +969 -966
- package/es/ui/index.js +8 -2
- package/es/ui/src/log.js +1 -1
- package/es/upload/src/upload.js +1791 -1788
- package/es/vxe-icon/style.css +1 -1
- package/es/vxe-icon/style.mini.css +1 -1
- package/es/vxe-steps/style.css +297 -0
- package/es/vxe-steps/style.mini.css +1 -0
- package/es/watermark/src/watermark.js +158 -155
- package/lib/alert/src/alert.js +117 -114
- package/lib/anchor/src/anchor-link.js +110 -107
- package/lib/anchor/src/anchor.js +212 -209
- package/lib/avatar/src/avatar.js +132 -129
- package/lib/backtop/src/backtop.js +267 -264
- package/lib/badge/src/badge.js +102 -99
- package/lib/breadcrumb/src/breadcrumb-item.js +104 -101
- package/lib/breadcrumb/src/breadcrumb.js +70 -67
- package/lib/button/src/button-group.js +88 -85
- package/lib/calendar/src/calendar.js +1371 -1368
- package/lib/card/src/card.js +235 -232
- package/lib/carousel/src/carousel-item.js +78 -75
- package/lib/carousel/src/carousel.js +392 -389
- package/lib/cascader/src/cascader.js +1665 -1662
- package/lib/checkbox/src/button.js +198 -195
- package/lib/checkbox/src/checkbox.js +181 -178
- package/lib/checkbox/src/group.js +210 -207
- package/lib/collapse/src/collapse-pane.js +98 -95
- package/lib/collapse/src/collapse.js +340 -337
- package/lib/color-picker/src/color-picker.js +1116 -1113
- package/lib/components.js +3 -0
- package/lib/context-menu/src/context-menu.js +601 -598
- package/lib/countdown/src/countdown.js +224 -221
- package/lib/date-panel/src/date-panel.js +1905 -1902
- package/lib/date-picker/src/date-picker.js +1537 -1534
- package/lib/date-range-picker/src/date-range-picker.js +1412 -1409
- package/lib/divider/src/divider.js +80 -77
- package/lib/drawer/src/drawer.js +778 -775
- package/lib/empty/src/empty.js +100 -97
- package/lib/form/src/form-group.js +74 -71
- package/lib/form/src/form-item.js +76 -73
- package/lib/form/src/form.js +789 -786
- package/lib/icon/src/icon.js +59 -56
- package/lib/icon/style/style.css +1 -1
- package/lib/icon/style/style.mini.css +1 -1
- package/lib/icon-picker/src/icon-picker.js +719 -716
- package/lib/image/src/group.js +130 -127
- package/lib/image/src/image.js +243 -240
- package/lib/image/src/preview.js +627 -624
- package/lib/index.common.js +2 -0
- package/lib/index.js +2 -0
- package/lib/index.umd.js +47411 -46732
- package/lib/index.umd.min.js +3 -3
- package/lib/input/src/input.js +2700 -2697
- package/lib/layout-aside/src/layout-aside.js +138 -135
- package/lib/layout-body/src/layout-body.js +145 -142
- package/lib/layout-container/src/layout-container.js +71 -68
- package/lib/layout-footer/src/layout-footer.js +60 -57
- package/lib/layout-header/src/layout-header.js +58 -55
- package/lib/link/src/link.js +131 -128
- package/lib/list/src/list.js +2173 -2170
- package/lib/loading/src/loading.js +141 -138
- package/lib/mention/src/mention.js +49 -46
- package/lib/menu/src/menu.js +799 -796
- package/lib/modal/src/modal.js +1519 -1527
- package/lib/notice-bar/src/notice-bar.js +168 -165
- package/lib/number-input/src/number-input.js +1094 -1091
- package/lib/pager/src/pager.js +767 -764
- package/lib/password-input/src/password-input.js +431 -428
- package/lib/print/src/page-break.js +63 -60
- package/lib/print/src/print.js +303 -300
- package/lib/pulldown/src/pulldown.js +403 -400
- package/lib/radio/src/button.js +214 -211
- package/lib/radio/src/group.js +195 -192
- package/lib/radio/src/radio.js +194 -191
- package/lib/rate/src/rate.js +164 -161
- package/lib/result/src/result.js +116 -113
- package/lib/row/src/col.js +133 -130
- package/lib/row/src/row.js +111 -108
- package/lib/scrollbar/src/scrollbar.js +518 -515
- package/lib/segmented/src/segmented.js +240 -237
- package/lib/select/src/optgroup.js +44 -41
- package/lib/select/src/option.js +39 -36
- package/lib/select/src/select.js +1915 -1897
- package/lib/slider/src/slider.js +419 -416
- package/lib/space/src/space.js +190 -187
- package/lib/splitter/src/splitter-panel.js +146 -143
- package/lib/splitter/src/splitter.js +917 -914
- package/lib/step-item/index.js +47 -0
- package/lib/steps/src/step-info.js +49 -0
- package/lib/steps/src/step-item.js +59 -0
- package/lib/steps/src/steps.js +298 -46
- package/lib/steps/src/util.js +74 -0
- package/lib/steps/style/style.css +297 -0
- package/lib/steps/style/style.mini.css +1 -0
- package/lib/style.css +307 -1
- package/lib/style.mini.css +1 -1
- package/lib/switch/src/switch.js +228 -225
- package/lib/table-select/src/table-select.js +865 -862
- package/lib/table-transfer/src/table-transfer.js +61 -58
- package/lib/tabs/src/tab-pane.js +102 -99
- package/lib/tabs/src/tabs.js +936 -933
- package/lib/tag/src/tag.js +163 -160
- package/lib/text/src/text.js +232 -229
- package/lib/text-ellipsis/src/text-ellipsis.js +252 -249
- package/lib/textarea/src/textarea.js +434 -431
- package/lib/timeline/src/timeline.js +74 -36
- package/lib/timeline/src/util.js +7 -4
- package/lib/tip/src/tip.js +117 -114
- package/lib/tooltip/src/tooltip.js +552 -549
- package/lib/tour/src/tour.js +49 -46
- package/lib/transfer/src/transfer.js +95 -92
- package/lib/tree/src/tree.js +3379 -3376
- package/lib/tree-select/src/tree-select.js +969 -966
- package/lib/ui/index.js +8 -2
- package/lib/ui/src/log.js +1 -1
- package/lib/upload/src/upload.js +1788 -1785
- package/lib/vxe-icon/style/style.css +1 -1
- package/lib/vxe-icon/style/style.mini.css +1 -1
- package/lib/vxe-steps/style/style.css +297 -0
- package/lib/vxe-steps/style/style.mini.css +1 -0
- package/lib/watermark/src/watermark.js +158 -155
- package/package.json +1 -1
- package/packages/alert/src/alert.ts +2 -2
- package/packages/anchor/src/anchor-link.ts +2 -2
- package/packages/anchor/src/anchor.ts +2 -2
- package/packages/avatar/src/avatar.ts +2 -2
- package/packages/backtop/src/backtop.ts +2 -2
- package/packages/badge/src/badge.ts +2 -2
- package/packages/breadcrumb/src/breadcrumb-item.ts +2 -2
- package/packages/breadcrumb/src/breadcrumb.ts +2 -2
- package/packages/button/src/button-group.ts +2 -2
- package/packages/calendar/src/calendar.ts +2 -2
- package/packages/card/src/card.ts +2 -2
- package/packages/carousel/src/carousel-item.ts +2 -2
- package/packages/carousel/src/carousel.ts +2 -2
- package/packages/cascader/src/cascader.ts +2 -2
- package/packages/checkbox/src/button.ts +3 -15
- package/packages/checkbox/src/checkbox.ts +2 -2
- package/packages/checkbox/src/group.ts +2 -2
- package/packages/collapse/src/collapse-pane.ts +2 -2
- package/packages/collapse/src/collapse.ts +2 -2
- package/packages/color-picker/src/color-picker.ts +2 -2
- package/packages/components.ts +3 -0
- package/packages/context-menu/src/context-menu.ts +3 -16
- package/packages/countdown/src/countdown.ts +2 -2
- package/packages/date-panel/src/date-panel.ts +2 -2
- package/packages/date-picker/src/date-picker.ts +2 -2
- package/packages/date-range-picker/src/date-range-picker.ts +2 -2
- package/packages/divider/src/divider.ts +2 -2
- package/packages/drawer/src/drawer.ts +2 -2
- package/packages/empty/src/empty.ts +2 -2
- package/packages/form/src/form-group.ts +2 -2
- package/packages/form/src/form-item.ts +2 -2
- package/packages/form/src/form.ts +2 -2
- package/packages/icon/src/icon.ts +2 -2
- package/packages/icon-picker/src/icon-picker.ts +2 -2
- package/packages/image/src/group.ts +2 -2
- package/packages/image/src/image.ts +2 -2
- package/packages/image/src/preview.ts +3 -16
- package/packages/index.ts +2 -2
- package/packages/input/src/input.ts +2 -2
- package/packages/layout-aside/src/layout-aside.ts +2 -2
- package/packages/layout-body/src/layout-body.ts +2 -2
- package/packages/layout-container/src/layout-container.ts +3 -14
- package/packages/layout-footer/src/layout-footer.ts +2 -2
- package/packages/layout-header/src/layout-header.ts +2 -2
- package/packages/link/src/link.ts +2 -2
- package/packages/list/src/list.ts +2 -2
- package/packages/loading/src/loading.ts +2 -2
- package/packages/mention/src/mention.ts +2 -2
- package/packages/menu/src/menu.ts +2 -2
- package/packages/modal/src/modal.ts +5 -20
- package/packages/notice-bar/src/notice-bar.ts +2 -2
- package/packages/number-input/src/number-input.ts +3 -17
- package/packages/pager/src/pager.ts +2 -2
- package/packages/password-input/src/password-input.ts +2 -2
- package/packages/print/src/page-break.ts +2 -2
- package/packages/print/src/print.ts +2 -2
- package/packages/pulldown/src/pulldown.ts +2 -2
- package/packages/radio/src/button.ts +3 -16
- package/packages/radio/src/group.ts +3 -17
- package/packages/radio/src/radio.ts +2 -2
- package/packages/rate/src/rate.ts +2 -2
- package/packages/result/src/result.ts +2 -2
- package/packages/row/src/col.ts +2 -2
- package/packages/row/src/row.ts +2 -2
- package/packages/scrollbar/src/scrollbar.ts +3 -4
- package/packages/segmented/src/segmented.ts +2 -2
- package/packages/select/src/optgroup.ts +2 -2
- package/packages/select/src/option.ts +2 -2
- package/packages/select/src/select.ts +33 -19
- package/packages/slider/src/slider.ts +2 -2
- package/packages/space/src/space.ts +2 -2
- package/packages/splitter/src/splitter-panel.ts +2 -2
- package/packages/splitter/src/splitter.ts +2 -2
- package/packages/step-item/index.ts +16 -0
- package/packages/steps/src/step-info.ts +18 -0
- package/packages/steps/src/step-item.ts +41 -0
- package/packages/steps/src/steps.ts +273 -13
- package/packages/steps/src/util.ts +44 -0
- package/packages/switch/src/switch.ts +2 -2
- package/packages/table-select/src/table-select.ts +2 -2
- package/packages/table-transfer/src/table-transfer.ts +3 -15
- package/packages/tabs/src/tab-pane.ts +2 -2
- package/packages/tabs/src/tabs.ts +2 -2
- package/packages/tag/src/tag.ts +2 -2
- package/packages/text/src/text.ts +2 -2
- package/packages/text-ellipsis/src/text-ellipsis.ts +2 -2
- package/packages/textarea/src/textarea.ts +2 -2
- package/packages/timeline/src/timeline-info.ts +17 -17
- package/packages/timeline/src/timeline.ts +93 -49
- package/packages/timeline/src/util.ts +44 -41
- package/packages/tip/src/tip.ts +2 -2
- package/packages/tooltip/src/tooltip.ts +2 -2
- package/packages/tour/src/tour.ts +2 -2
- package/packages/transfer/src/transfer.ts +2 -2
- package/packages/tree/src/tree.ts +2 -2
- package/packages/tree-select/src/tree-select.ts +2 -2
- package/packages/ui/index.ts +8 -1
- package/packages/upload/src/upload.ts +2 -2
- package/packages/watermark/src/watermark.ts +2 -2
- package/styles/all.scss +1 -0
- package/styles/components/step-item.scss +0 -0
- package/styles/components/steps.scss +354 -0
- package/styles/theme/base.scss +9 -0
- package/types/all.d.ts +3 -0
- package/types/components/gantt.d.ts +1 -3
- package/types/components/select.d.ts +1 -13
- package/types/components/step-item.d.ts +72 -0
- package/types/components/steps.d.ts +67 -8
- package/types/components/table.d.ts +7 -66
- package/types/handles/form-design.d.ts +1 -4
- package/types/ui/global-config.d.ts +2 -0
- package/types/ui/global-icon.d.ts +7 -0
- /package/dist/{iconfont.1793330162657.ttf → iconfont.1793359478136.ttf} +0 -0
- /package/dist/{iconfont.1793330162657.woff → iconfont.1793359478136.woff} +0 -0
- /package/dist/{iconfont.1793330162657.woff2 → iconfont.1793359478136.woff2} +0 -0
- /package/es/icon/{iconfont.1793330162657.ttf → iconfont.1793359478136.ttf} +0 -0
- /package/es/icon/{iconfont.1793330162657.woff → iconfont.1793359478136.woff} +0 -0
- /package/es/icon/{iconfont.1793330162657.woff2 → iconfont.1793359478136.woff2} +0 -0
- /package/es/{iconfont.1793330162657.ttf → iconfont.1793359478136.ttf} +0 -0
- /package/es/{iconfont.1793330162657.woff → iconfont.1793359478136.woff} +0 -0
- /package/es/{iconfont.1793330162657.woff2 → iconfont.1793359478136.woff2} +0 -0
- /package/es/vxe-icon/{iconfont.1793330162657.ttf → iconfont.1793359478136.ttf} +0 -0
- /package/es/vxe-icon/{iconfont.1793330162657.woff → iconfont.1793359478136.woff} +0 -0
- /package/es/vxe-icon/{iconfont.1793330162657.woff2 → iconfont.1793359478136.woff2} +0 -0
- /package/lib/icon/style/{iconfont.1793330162657.ttf → iconfont.1793359478136.ttf} +0 -0
- /package/lib/icon/style/{iconfont.1793330162657.woff → iconfont.1793359478136.woff} +0 -0
- /package/lib/icon/style/{iconfont.1793330162657.woff2 → iconfont.1793359478136.woff2} +0 -0
- /package/lib/{iconfont.1793330162657.ttf → iconfont.1793359478136.ttf} +0 -0
- /package/lib/{iconfont.1793330162657.woff → iconfont.1793359478136.woff} +0 -0
- /package/lib/{iconfont.1793330162657.woff2 → iconfont.1793359478136.woff2} +0 -0
- /package/lib/vxe-icon/style/{iconfont.1793330162657.ttf → iconfont.1793359478136.ttf} +0 -0
- /package/lib/vxe-icon/style/{iconfont.1793330162657.woff → iconfont.1793359478136.woff} +0 -0
- /package/lib/vxe-icon/style/{iconfont.1793330162657.woff2 → iconfont.1793359478136.woff2} +0 -0
|
@@ -24,665 +24,668 @@ function createReactData() {
|
|
|
24
24
|
childOffsetX: 0
|
|
25
25
|
};
|
|
26
26
|
}
|
|
27
|
-
var context_menu_default =
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
27
|
+
var context_menu_default = (
|
|
28
|
+
/* define-vxe-component start */
|
|
29
|
+
defineVxeComponent({
|
|
30
|
+
name: "VxeContextMenu",
|
|
31
|
+
props: {
|
|
32
|
+
modelValue: Boolean,
|
|
33
|
+
className: String,
|
|
34
|
+
size: {
|
|
35
|
+
type: String,
|
|
36
|
+
default: () => getConfig().contextMenu.size || getConfig().size
|
|
37
|
+
},
|
|
38
|
+
options: Array,
|
|
39
|
+
x: [Number, String],
|
|
40
|
+
y: [Number, String],
|
|
41
|
+
autoLocate: {
|
|
42
|
+
type: Boolean,
|
|
43
|
+
default: () => getConfig().contextMenu.autoLocate
|
|
44
|
+
},
|
|
45
|
+
zIndex: [Number, String],
|
|
46
|
+
position: {
|
|
47
|
+
type: String,
|
|
48
|
+
default: () => getConfig().contextMenu.position
|
|
49
|
+
},
|
|
50
|
+
destroyOnClose: {
|
|
51
|
+
type: Boolean,
|
|
52
|
+
default: () => getConfig().contextMenu.destroyOnClose
|
|
53
|
+
},
|
|
54
|
+
transfer: {
|
|
55
|
+
type: Boolean,
|
|
56
|
+
default: () => getConfig().contextMenu.transfer
|
|
57
|
+
}
|
|
51
58
|
},
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
for (let j = 0; j < list.length; j++) {
|
|
78
|
-
const firstItem = list[j];
|
|
79
|
-
if (hasValidItem(firstItem)) {
|
|
80
|
-
firstList.push(firstItem);
|
|
59
|
+
emits: ["update:modelValue", "option-click", "change", "show", "hide"],
|
|
60
|
+
setup(props, context) {
|
|
61
|
+
const { emit } = context;
|
|
62
|
+
const xID = XEUtils.uniqueId();
|
|
63
|
+
const refElem = ref();
|
|
64
|
+
const { computeSize } = useFns.useSize(props);
|
|
65
|
+
const internalData = createInternalData();
|
|
66
|
+
const reactData = reactive(createReactData());
|
|
67
|
+
const refMaps = {
|
|
68
|
+
refElem
|
|
69
|
+
};
|
|
70
|
+
const computeMenuGroups = computed(() => {
|
|
71
|
+
const { options } = props;
|
|
72
|
+
return options || [];
|
|
73
|
+
});
|
|
74
|
+
const computeAllFirstMenuList = computed(() => {
|
|
75
|
+
const menuGroups = computeMenuGroups.value;
|
|
76
|
+
const firstList = [];
|
|
77
|
+
for (let i = 0; i < menuGroups.length; i++) {
|
|
78
|
+
const list = menuGroups[i];
|
|
79
|
+
for (let j = 0; j < list.length; j++) {
|
|
80
|
+
const firstItem = list[j];
|
|
81
|
+
if (hasValidItem(firstItem)) {
|
|
82
|
+
firstList.push(firstItem);
|
|
83
|
+
}
|
|
81
84
|
}
|
|
82
85
|
}
|
|
83
|
-
|
|
84
|
-
return firstList;
|
|
85
|
-
});
|
|
86
|
-
const computeTopAndLeft = computed(() => {
|
|
87
|
-
const { x, y } = props;
|
|
88
|
-
return `${x}${y}`;
|
|
89
|
-
});
|
|
90
|
-
const computeMaps = {};
|
|
91
|
-
const $xeContextMenu = {
|
|
92
|
-
xID,
|
|
93
|
-
props,
|
|
94
|
-
context,
|
|
95
|
-
reactData,
|
|
96
|
-
getRefMaps: () => refMaps,
|
|
97
|
-
getComputeMaps: () => computeMaps
|
|
98
|
-
};
|
|
99
|
-
const dispatchEvent = (type, params, evnt) => {
|
|
100
|
-
emit(type, createEvent(evnt, { $contextMenu: $xeContextMenu }, params));
|
|
101
|
-
};
|
|
102
|
-
const emitModel = (value) => {
|
|
103
|
-
emit("update:modelValue", value);
|
|
104
|
-
};
|
|
105
|
-
const openMenu = () => {
|
|
106
|
-
const { modelValue } = props;
|
|
107
|
-
const { visible } = reactData;
|
|
108
|
-
const value = true;
|
|
109
|
-
reactData.visible = value;
|
|
110
|
-
handleLocate();
|
|
111
|
-
updateZindex();
|
|
112
|
-
if (modelValue !== value) {
|
|
113
|
-
emitModel(value);
|
|
114
|
-
dispatchEvent("change", { value }, null);
|
|
115
|
-
}
|
|
116
|
-
if (visible !== value) {
|
|
117
|
-
dispatchEvent("show", { visible: value }, null);
|
|
118
|
-
}
|
|
119
|
-
return nextTick().then(() => {
|
|
120
|
-
updateLocate();
|
|
86
|
+
return firstList;
|
|
121
87
|
});
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
const
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
const
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
if (menuZIndex < getLastZIndex()) {
|
|
152
|
-
popupStyle.zIndex = transfer ? nextSubZIndex() : nextZIndex();
|
|
88
|
+
const computeTopAndLeft = computed(() => {
|
|
89
|
+
const { x, y } = props;
|
|
90
|
+
return `${x}${y}`;
|
|
91
|
+
});
|
|
92
|
+
const computeMaps = {};
|
|
93
|
+
const $xeContextMenu = {
|
|
94
|
+
xID,
|
|
95
|
+
props,
|
|
96
|
+
context,
|
|
97
|
+
reactData,
|
|
98
|
+
getRefMaps: () => refMaps,
|
|
99
|
+
getComputeMaps: () => computeMaps
|
|
100
|
+
};
|
|
101
|
+
const dispatchEvent = (type, params, evnt) => {
|
|
102
|
+
emit(type, createEvent(evnt, { $contextMenu: $xeContextMenu }, params));
|
|
103
|
+
};
|
|
104
|
+
const emitModel = (value) => {
|
|
105
|
+
emit("update:modelValue", value);
|
|
106
|
+
};
|
|
107
|
+
const openMenu = () => {
|
|
108
|
+
const { modelValue } = props;
|
|
109
|
+
const { visible } = reactData;
|
|
110
|
+
const value = true;
|
|
111
|
+
reactData.visible = value;
|
|
112
|
+
handleLocate();
|
|
113
|
+
updateZindex();
|
|
114
|
+
if (modelValue !== value) {
|
|
115
|
+
emitModel(value);
|
|
116
|
+
dispatchEvent("change", { value }, null);
|
|
153
117
|
}
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
118
|
+
if (visible !== value) {
|
|
119
|
+
dispatchEvent("show", { visible: value }, null);
|
|
120
|
+
}
|
|
121
|
+
return nextTick().then(() => {
|
|
122
|
+
updateLocate();
|
|
123
|
+
});
|
|
124
|
+
};
|
|
125
|
+
const closeMenu = () => {
|
|
126
|
+
const { modelValue } = props;
|
|
127
|
+
const { visible } = reactData;
|
|
128
|
+
const value = false;
|
|
129
|
+
reactData.visible = value;
|
|
130
|
+
if (modelValue !== value) {
|
|
131
|
+
emitModel(value);
|
|
132
|
+
dispatchEvent("change", { value }, null);
|
|
133
|
+
}
|
|
134
|
+
if (visible !== value) {
|
|
135
|
+
dispatchEvent("hide", { visible: value }, null);
|
|
136
|
+
}
|
|
137
|
+
return nextTick();
|
|
138
|
+
};
|
|
139
|
+
const handleLocate = () => {
|
|
140
|
+
const { x, y } = props;
|
|
141
|
+
const { popupStyle } = reactData;
|
|
142
|
+
popupStyle.left = toCssUnit(x || 0);
|
|
143
|
+
popupStyle.top = toCssUnit(y || 0);
|
|
144
|
+
updateLocate();
|
|
145
|
+
};
|
|
146
|
+
const updateZindex = () => {
|
|
147
|
+
const { zIndex, transfer } = props;
|
|
148
|
+
const { popupStyle } = reactData;
|
|
149
|
+
const menuZIndex = popupStyle.zIndex;
|
|
150
|
+
if (zIndex) {
|
|
151
|
+
popupStyle.zIndex = XEUtils.toNumber(zIndex);
|
|
152
|
+
} else {
|
|
153
|
+
if (menuZIndex < getLastZIndex()) {
|
|
154
|
+
popupStyle.zIndex = transfer ? nextSubZIndex() : nextZIndex();
|
|
176
155
|
}
|
|
177
156
|
}
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
157
|
+
};
|
|
158
|
+
const updateLocate = () => {
|
|
159
|
+
const { autoLocate, position } = props;
|
|
160
|
+
const { popupStyle } = reactData;
|
|
161
|
+
if (autoLocate) {
|
|
162
|
+
const wrapperEl = refElem.value;
|
|
163
|
+
if (wrapperEl) {
|
|
164
|
+
const { visibleWidth, visibleHeight } = getDomNode();
|
|
165
|
+
const wrapperStyle = getComputedStyle(wrapperEl);
|
|
166
|
+
const offsetTop = XEUtils.toNumber(wrapperStyle.top);
|
|
167
|
+
const offsetLeft = XEUtils.toNumber(wrapperStyle.left);
|
|
168
|
+
const wrapperWidth = wrapperEl.offsetWidth;
|
|
169
|
+
const wrapperHeight = wrapperEl.offsetHeight;
|
|
170
|
+
if (position === "absolute") {
|
|
171
|
+
} else {
|
|
172
|
+
if (offsetTop + wrapperHeight > visibleHeight) {
|
|
173
|
+
popupStyle.top = `${Math.max(0, offsetTop - wrapperHeight)}px`;
|
|
174
|
+
}
|
|
175
|
+
if (offsetLeft + wrapperWidth > visibleWidth) {
|
|
176
|
+
popupStyle.left = `${Math.max(0, offsetLeft - wrapperWidth)}px`;
|
|
177
|
+
}
|
|
178
|
+
}
|
|
196
179
|
}
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
|
|
180
|
+
}
|
|
181
|
+
updateChildLocate();
|
|
182
|
+
};
|
|
183
|
+
const updateChildLocate = () => {
|
|
184
|
+
const wrapperEl = refElem.value;
|
|
185
|
+
if (wrapperEl) {
|
|
186
|
+
const { visibleWidth } = getDomNode();
|
|
187
|
+
const owSize = 4;
|
|
188
|
+
const handleStyle = () => {
|
|
189
|
+
const wrapperStyle = getComputedStyle(wrapperEl);
|
|
190
|
+
const offsetLeft = XEUtils.toNumber(wrapperStyle.left);
|
|
191
|
+
const wrapperWidth = wrapperEl.offsetWidth;
|
|
192
|
+
const childEl = wrapperEl.querySelector(".vxe-context-menu--children-wrapper");
|
|
193
|
+
const childWidth = childEl ? childEl.offsetWidth : wrapperWidth;
|
|
194
|
+
if (offsetLeft + wrapperWidth > visibleWidth - childWidth) {
|
|
195
|
+
reactData.childOffsetX = -childWidth + owSize;
|
|
196
|
+
} else {
|
|
197
|
+
reactData.childOffsetX = wrapperWidth - owSize;
|
|
198
|
+
}
|
|
199
|
+
};
|
|
200
200
|
handleStyle();
|
|
201
|
-
});
|
|
202
|
-
}
|
|
203
|
-
};
|
|
204
|
-
const handleVisible = () => {
|
|
205
|
-
const { modelValue } = props;
|
|
206
|
-
if (modelValue) {
|
|
207
|
-
openMenu();
|
|
208
|
-
} else {
|
|
209
|
-
closeMenu();
|
|
210
|
-
}
|
|
211
|
-
};
|
|
212
|
-
const tagMethods = {
|
|
213
|
-
dispatchEvent,
|
|
214
|
-
open: openMenu,
|
|
215
|
-
close: closeMenu
|
|
216
|
-
};
|
|
217
|
-
const hasChildMenu = (item) => {
|
|
218
|
-
const { children } = item;
|
|
219
|
-
return children && children.some((child) => child.visible !== false);
|
|
220
|
-
};
|
|
221
|
-
const handleItemClickEvent = (evnt, item) => {
|
|
222
|
-
evnt.preventDefault();
|
|
223
|
-
evnt.stopPropagation();
|
|
224
|
-
if (!item.disabled && !item.loading && !hasChildMenu(item)) {
|
|
225
|
-
dispatchEvent("option-click", { option: item }, evnt);
|
|
226
|
-
closeMenu();
|
|
227
|
-
}
|
|
228
|
-
};
|
|
229
|
-
const handleItemMouseenterEvent = (evnt, item, parentitem) => {
|
|
230
|
-
const { leaveTime } = internalData;
|
|
231
|
-
if (leaveTime) {
|
|
232
|
-
clearTimeout(leaveTime);
|
|
233
|
-
}
|
|
234
|
-
reactData.activeOption = parentitem || item;
|
|
235
|
-
if (parentitem) {
|
|
236
|
-
reactData.activeOption = parentitem;
|
|
237
|
-
reactData.activeChildOption = item;
|
|
238
|
-
} else {
|
|
239
|
-
reactData.activeOption = item;
|
|
240
|
-
if (hasChildMenu(item)) {
|
|
241
|
-
reactData.activeChildOption = findFirstChildItem(item);
|
|
242
201
|
nextTick(() => {
|
|
243
|
-
|
|
202
|
+
handleStyle();
|
|
244
203
|
});
|
|
204
|
+
}
|
|
205
|
+
};
|
|
206
|
+
const handleVisible = () => {
|
|
207
|
+
const { modelValue } = props;
|
|
208
|
+
if (modelValue) {
|
|
209
|
+
openMenu();
|
|
245
210
|
} else {
|
|
246
|
-
|
|
211
|
+
closeMenu();
|
|
247
212
|
}
|
|
248
|
-
}
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
const findNextFirstItem = (allFirstList, firstItem) => {
|
|
265
|
-
for (let i = 0; i < allFirstList.length; i++) {
|
|
266
|
-
const item = allFirstList[i];
|
|
267
|
-
if (firstItem === item) {
|
|
268
|
-
const nextItem = allFirstList[i + 1];
|
|
269
|
-
if (nextItem) {
|
|
270
|
-
return nextItem;
|
|
271
|
-
}
|
|
213
|
+
};
|
|
214
|
+
const tagMethods = {
|
|
215
|
+
dispatchEvent,
|
|
216
|
+
open: openMenu,
|
|
217
|
+
close: closeMenu
|
|
218
|
+
};
|
|
219
|
+
const hasChildMenu = (item) => {
|
|
220
|
+
const { children } = item;
|
|
221
|
+
return children && children.some((child) => child.visible !== false);
|
|
222
|
+
};
|
|
223
|
+
const handleItemClickEvent = (evnt, item) => {
|
|
224
|
+
evnt.preventDefault();
|
|
225
|
+
evnt.stopPropagation();
|
|
226
|
+
if (!item.disabled && !item.loading && !hasChildMenu(item)) {
|
|
227
|
+
dispatchEvent("option-click", { option: item }, evnt);
|
|
228
|
+
closeMenu();
|
|
272
229
|
}
|
|
273
|
-
}
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
const item = allFirstList[i];
|
|
279
|
-
if (firstItem === item) {
|
|
280
|
-
if (i > 0) {
|
|
281
|
-
return allFirstList[i - 1];
|
|
282
|
-
}
|
|
230
|
+
};
|
|
231
|
+
const handleItemMouseenterEvent = (evnt, item, parentitem) => {
|
|
232
|
+
const { leaveTime } = internalData;
|
|
233
|
+
if (leaveTime) {
|
|
234
|
+
clearTimeout(leaveTime);
|
|
283
235
|
}
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
236
|
+
reactData.activeOption = parentitem || item;
|
|
237
|
+
if (parentitem) {
|
|
238
|
+
reactData.activeOption = parentitem;
|
|
239
|
+
reactData.activeChildOption = item;
|
|
240
|
+
} else {
|
|
241
|
+
reactData.activeOption = item;
|
|
242
|
+
if (hasChildMenu(item)) {
|
|
243
|
+
reactData.activeChildOption = findFirstChildItem(item);
|
|
244
|
+
nextTick(() => {
|
|
245
|
+
updateChildLocate();
|
|
246
|
+
});
|
|
247
|
+
} else {
|
|
248
|
+
reactData.activeChildOption = null;
|
|
294
249
|
}
|
|
295
250
|
}
|
|
296
|
-
}
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
251
|
+
};
|
|
252
|
+
const handleItemMouseleaveEvent = () => {
|
|
253
|
+
const { leaveTime } = internalData;
|
|
254
|
+
if (leaveTime) {
|
|
255
|
+
clearTimeout(leaveTime);
|
|
256
|
+
}
|
|
257
|
+
internalData.leaveTime = setTimeout(() => {
|
|
258
|
+
internalData.leaveTime = null;
|
|
259
|
+
reactData.activeOption = null;
|
|
260
|
+
reactData.activeChildOption = null;
|
|
261
|
+
}, 300);
|
|
262
|
+
};
|
|
263
|
+
const hasValidItem = (item) => {
|
|
264
|
+
return !item.loading && !item.disabled && item.visible !== false;
|
|
265
|
+
};
|
|
266
|
+
const findNextFirstItem = (allFirstList, firstItem) => {
|
|
267
|
+
for (let i = 0; i < allFirstList.length; i++) {
|
|
268
|
+
const item = allFirstList[i];
|
|
269
|
+
if (firstItem === item) {
|
|
270
|
+
const nextItem = allFirstList[i + 1];
|
|
271
|
+
if (nextItem) {
|
|
272
|
+
return nextItem;
|
|
273
|
+
}
|
|
307
274
|
}
|
|
308
|
-
|
|
309
|
-
|
|
275
|
+
}
|
|
276
|
+
return XEUtils.first(allFirstList);
|
|
277
|
+
};
|
|
278
|
+
const findPrevFirstItem = (allFirstList, firstItem) => {
|
|
279
|
+
for (let i = 0; i < allFirstList.length; i++) {
|
|
280
|
+
const item = allFirstList[i];
|
|
281
|
+
if (firstItem === item) {
|
|
282
|
+
if (i > 0) {
|
|
283
|
+
return allFirstList[i - 1];
|
|
284
|
+
}
|
|
310
285
|
}
|
|
311
286
|
}
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
287
|
+
return XEUtils.last(allFirstList);
|
|
288
|
+
};
|
|
289
|
+
const findFirstChildItem = (firstItem) => {
|
|
290
|
+
const { children } = firstItem;
|
|
291
|
+
if (children) {
|
|
292
|
+
for (let i = 0; i < children.length; i++) {
|
|
293
|
+
const item = children[i];
|
|
315
294
|
if (hasValidItem(item)) {
|
|
316
295
|
return item;
|
|
317
296
|
}
|
|
318
297
|
}
|
|
319
298
|
}
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
299
|
+
return null;
|
|
300
|
+
};
|
|
301
|
+
const findPrevChildItem = (firstItem, childItem) => {
|
|
302
|
+
const { children } = firstItem;
|
|
303
|
+
let prevValidItem = null;
|
|
304
|
+
if (children) {
|
|
305
|
+
for (let i = 0; i < children.length; i++) {
|
|
306
|
+
const item = children[i];
|
|
307
|
+
if (childItem === item) {
|
|
308
|
+
break;
|
|
309
|
+
}
|
|
331
310
|
if (hasValidItem(item)) {
|
|
332
|
-
|
|
311
|
+
prevValidItem = item;
|
|
333
312
|
}
|
|
334
313
|
}
|
|
335
|
-
if (
|
|
336
|
-
|
|
337
|
-
|
|
314
|
+
if (!prevValidItem) {
|
|
315
|
+
for (let len = children.length - 1; len >= 0; len--) {
|
|
316
|
+
const item = children[len];
|
|
317
|
+
if (hasValidItem(item)) {
|
|
318
|
+
return item;
|
|
319
|
+
}
|
|
338
320
|
}
|
|
339
|
-
} else {
|
|
340
|
-
isMetch = childItem === item;
|
|
341
321
|
}
|
|
342
322
|
}
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
const isEnter = globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.ENTER);
|
|
364
|
-
const isEsc = globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.ESCAPE);
|
|
365
|
-
if (isEsc) {
|
|
366
|
-
closeMenu();
|
|
367
|
-
return;
|
|
368
|
-
}
|
|
369
|
-
if (isEnter) {
|
|
370
|
-
if (activeOption || activeChildOption) {
|
|
371
|
-
evnt.preventDefault();
|
|
372
|
-
evnt.stopPropagation();
|
|
373
|
-
if (!activeChildOption && hasChildMenu(activeOption)) {
|
|
374
|
-
reactData.activeChildOption = findFirstChildItem(activeOption);
|
|
375
|
-
updateChildLocate();
|
|
376
|
-
return;
|
|
323
|
+
return prevValidItem;
|
|
324
|
+
};
|
|
325
|
+
const findNextChildItem = (firstItem, childItem) => {
|
|
326
|
+
const { children } = firstItem;
|
|
327
|
+
let firstValidItem = null;
|
|
328
|
+
if (children) {
|
|
329
|
+
let isMetch = false;
|
|
330
|
+
for (let i = 0; i < children.length; i++) {
|
|
331
|
+
const item = children[i];
|
|
332
|
+
if (!firstValidItem) {
|
|
333
|
+
if (hasValidItem(item)) {
|
|
334
|
+
firstValidItem = item;
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
if (isMetch) {
|
|
338
|
+
if (hasValidItem(item)) {
|
|
339
|
+
return item;
|
|
340
|
+
}
|
|
341
|
+
} else {
|
|
342
|
+
isMetch = childItem === item;
|
|
377
343
|
}
|
|
378
|
-
handleItemClickEvent(evnt, activeChildOption || activeOption);
|
|
379
|
-
return;
|
|
380
344
|
}
|
|
381
345
|
}
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
updateChildLocate();
|
|
391
|
-
} else if (isLeftArrow) {
|
|
392
|
-
evnt.preventDefault();
|
|
393
|
-
reactData.activeChildOption = null;
|
|
346
|
+
return firstValidItem;
|
|
347
|
+
};
|
|
348
|
+
const handleGlobalMousewheelEvent = (evnt) => {
|
|
349
|
+
const { visible } = reactData;
|
|
350
|
+
if (visible) {
|
|
351
|
+
const el = refElem.value;
|
|
352
|
+
if (!getEventTargetNode(evnt, el, "").flag) {
|
|
353
|
+
closeMenu();
|
|
394
354
|
}
|
|
395
|
-
}
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
355
|
+
}
|
|
356
|
+
};
|
|
357
|
+
const handleGlobalKeydownEvent = (evnt) => {
|
|
358
|
+
const { visible, activeOption, activeChildOption } = reactData;
|
|
359
|
+
const allFirstMenuList = computeAllFirstMenuList.value;
|
|
360
|
+
if (visible) {
|
|
361
|
+
const isUpArrow = globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.ARROW_UP);
|
|
362
|
+
const isDwArrow = globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.ARROW_DOWN);
|
|
363
|
+
const isLeftArrow = globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.ARROW_LEFT);
|
|
364
|
+
const isRightArrow = globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.ARROW_RIGHT);
|
|
365
|
+
const isEnter = globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.ENTER);
|
|
366
|
+
const isEsc = globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.ESCAPE);
|
|
367
|
+
if (isEsc) {
|
|
368
|
+
closeMenu();
|
|
369
|
+
return;
|
|
370
|
+
}
|
|
371
|
+
if (isEnter) {
|
|
372
|
+
if (activeOption || activeChildOption) {
|
|
373
|
+
evnt.preventDefault();
|
|
374
|
+
evnt.stopPropagation();
|
|
375
|
+
if (!activeChildOption && hasChildMenu(activeOption)) {
|
|
404
376
|
reactData.activeChildOption = findFirstChildItem(activeOption);
|
|
405
377
|
updateChildLocate();
|
|
378
|
+
return;
|
|
406
379
|
}
|
|
380
|
+
handleItemClickEvent(evnt, activeChildOption || activeOption);
|
|
381
|
+
return;
|
|
407
382
|
}
|
|
408
383
|
}
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
384
|
+
if (activeChildOption) {
|
|
385
|
+
if (isUpArrow) {
|
|
386
|
+
evnt.preventDefault();
|
|
387
|
+
reactData.activeChildOption = findPrevChildItem(activeOption, activeChildOption);
|
|
388
|
+
updateChildLocate();
|
|
389
|
+
} else if (isDwArrow) {
|
|
390
|
+
evnt.preventDefault();
|
|
391
|
+
reactData.activeChildOption = findNextChildItem(activeOption, activeChildOption);
|
|
392
|
+
updateChildLocate();
|
|
393
|
+
} else if (isLeftArrow) {
|
|
394
|
+
evnt.preventDefault();
|
|
395
|
+
reactData.activeChildOption = null;
|
|
396
|
+
}
|
|
397
|
+
} else if (activeOption) {
|
|
398
|
+
evnt.preventDefault();
|
|
399
|
+
if (isUpArrow) {
|
|
400
|
+
reactData.activeOption = findPrevFirstItem(allFirstMenuList, activeOption);
|
|
401
|
+
} else if (isDwArrow) {
|
|
402
|
+
reactData.activeOption = findNextFirstItem(allFirstMenuList, activeOption);
|
|
403
|
+
} else {
|
|
404
|
+
if (hasChildMenu(activeOption)) {
|
|
405
|
+
if (isRightArrow) {
|
|
406
|
+
reactData.activeChildOption = findFirstChildItem(activeOption);
|
|
407
|
+
updateChildLocate();
|
|
408
|
+
}
|
|
409
|
+
}
|
|
410
|
+
}
|
|
411
|
+
} else {
|
|
412
|
+
evnt.preventDefault();
|
|
413
|
+
reactData.activeOption = XEUtils.first(allFirstMenuList);
|
|
414
|
+
}
|
|
412
415
|
}
|
|
413
|
-
}
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
416
|
+
};
|
|
417
|
+
const handleGlobalMousedownEvent = (evnt) => {
|
|
418
|
+
const { visible } = reactData;
|
|
419
|
+
if (visible) {
|
|
420
|
+
const el = refElem.value;
|
|
421
|
+
if (!getEventTargetNode(evnt, el, "").flag) {
|
|
422
|
+
closeMenu();
|
|
423
|
+
}
|
|
424
|
+
}
|
|
425
|
+
};
|
|
426
|
+
const handleGlobalBlurEvent = () => {
|
|
427
|
+
const { visible } = reactData;
|
|
428
|
+
if (visible) {
|
|
420
429
|
closeMenu();
|
|
421
430
|
}
|
|
422
|
-
}
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
const
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
return
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
{
|
|
448
|
-
"is--disabled": disabled,
|
|
449
|
-
"is--loading": loading
|
|
450
|
-
}
|
|
451
|
-
],
|
|
452
|
-
onClick(evnt) {
|
|
453
|
-
handleItemClickEvent(evnt, item);
|
|
454
|
-
},
|
|
455
|
-
onMouseenter(evnt) {
|
|
456
|
-
handleItemMouseenterEvent(evnt, item, parentItem);
|
|
457
|
-
},
|
|
458
|
-
onMouseleave: handleItemMouseleaveEvent
|
|
459
|
-
},
|
|
460
|
-
[
|
|
461
|
-
h(
|
|
462
|
-
"div",
|
|
463
|
-
{
|
|
464
|
-
class: ["vxe-context-menu--item-prefix", prefixOpts.className || ""]
|
|
465
|
-
},
|
|
466
|
-
loading ? [
|
|
467
|
-
h(
|
|
468
|
-
"span",
|
|
469
|
-
{
|
|
470
|
-
key: "1"
|
|
471
|
-
},
|
|
472
|
-
[
|
|
473
|
-
h("i", {
|
|
474
|
-
class: getIcon().CONTEXT_MENU_OPTION_LOADING
|
|
475
|
-
})
|
|
476
|
-
]
|
|
477
|
-
)
|
|
478
|
-
] : [
|
|
479
|
-
prefixIcon && XEUtils.isFunction(prefixIcon) ? h(
|
|
480
|
-
"span",
|
|
481
|
-
{
|
|
482
|
-
key: "2"
|
|
483
|
-
},
|
|
484
|
-
getSlotVNs(prefixIcon({}))
|
|
485
|
-
) : h(
|
|
486
|
-
"span",
|
|
487
|
-
{
|
|
488
|
-
key: "3"
|
|
489
|
-
},
|
|
490
|
-
[
|
|
491
|
-
h("i", {
|
|
492
|
-
class: prefixIcon
|
|
493
|
-
})
|
|
494
|
-
]
|
|
495
|
-
),
|
|
496
|
-
prefixOpts.content ? h(
|
|
497
|
-
"span",
|
|
498
|
-
{
|
|
499
|
-
key: "4"
|
|
500
|
-
},
|
|
501
|
-
`${prefixOpts.content || ""}`
|
|
502
|
-
) : renderEmptyElement($xeContextMenu)
|
|
503
|
-
]
|
|
504
|
-
),
|
|
505
|
-
h(
|
|
506
|
-
"div",
|
|
507
|
-
{
|
|
508
|
-
class: "vxe-context-menu--item-label"
|
|
509
|
-
},
|
|
510
|
-
menuContent
|
|
511
|
-
),
|
|
512
|
-
!loading && (suffixIcon || suffixOpts.content) ? h(
|
|
513
|
-
"div",
|
|
514
|
-
{
|
|
515
|
-
class: ["vxe-context-menu--item-suffix", suffixOpts.className || ""]
|
|
431
|
+
};
|
|
432
|
+
const tagPrivateMethods = {};
|
|
433
|
+
Object.assign($xeContextMenu, tagMethods, tagPrivateMethods);
|
|
434
|
+
const renderMenuItem = (item, parentItem, hasChildMenus) => {
|
|
435
|
+
const { visible, disabled, loading } = item;
|
|
436
|
+
if (visible === false) {
|
|
437
|
+
return renderEmptyElement($xeContextMenu);
|
|
438
|
+
}
|
|
439
|
+
const prefixOpts = Object.assign({}, item.prefixConfig);
|
|
440
|
+
const prefixIcon = prefixOpts.icon || item.prefixIcon;
|
|
441
|
+
const suffixOpts = Object.assign({}, item.suffixConfig);
|
|
442
|
+
const suffixIcon = suffixOpts.icon || item.suffixIcon;
|
|
443
|
+
const menuContent = loading ? getI18n("vxe.contextMenu.loadingText") : getFuncText(item.name);
|
|
444
|
+
return h(
|
|
445
|
+
"div",
|
|
446
|
+
{
|
|
447
|
+
class: [
|
|
448
|
+
"vxe-context-menu--item-inner",
|
|
449
|
+
{
|
|
450
|
+
"is--disabled": disabled,
|
|
451
|
+
"is--loading": loading
|
|
452
|
+
}
|
|
453
|
+
],
|
|
454
|
+
onClick(evnt) {
|
|
455
|
+
handleItemClickEvent(evnt, item);
|
|
516
456
|
},
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
"span",
|
|
520
|
-
{
|
|
521
|
-
key: "2"
|
|
522
|
-
},
|
|
523
|
-
getSlotVNs(suffixIcon({}))
|
|
524
|
-
) : h(
|
|
525
|
-
"span",
|
|
526
|
-
{
|
|
527
|
-
key: "3"
|
|
528
|
-
},
|
|
529
|
-
[
|
|
530
|
-
h("i", {
|
|
531
|
-
class: suffixIcon
|
|
532
|
-
})
|
|
533
|
-
]
|
|
534
|
-
),
|
|
535
|
-
suffixOpts.content ? h(
|
|
536
|
-
"span",
|
|
537
|
-
{
|
|
538
|
-
key: "4"
|
|
539
|
-
},
|
|
540
|
-
`${suffixOpts.content || ""}`
|
|
541
|
-
) : renderEmptyElement($xeContextMenu)
|
|
542
|
-
]
|
|
543
|
-
) : renderEmptyElement($xeContextMenu),
|
|
544
|
-
hasChildMenus ? h(
|
|
545
|
-
"div",
|
|
546
|
-
{
|
|
547
|
-
class: "vxe-context-menu--item-subicon"
|
|
457
|
+
onMouseenter(evnt) {
|
|
458
|
+
handleItemMouseenterEvent(evnt, item, parentItem);
|
|
548
459
|
},
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
})
|
|
553
|
-
]
|
|
554
|
-
) : renderEmptyElement($xeContextMenu)
|
|
555
|
-
]
|
|
556
|
-
);
|
|
557
|
-
};
|
|
558
|
-
const renderMenus = () => {
|
|
559
|
-
const { activeOption, activeChildOption, childOffsetX } = reactData;
|
|
560
|
-
const menuGroups = computeMenuGroups.value;
|
|
561
|
-
const mgVNs = [];
|
|
562
|
-
menuGroups.forEach((menuList, gIndex) => {
|
|
563
|
-
const moVNs = [];
|
|
564
|
-
menuList.forEach((firstItem, i) => {
|
|
565
|
-
const { children } = firstItem;
|
|
566
|
-
const hasChildMenus = children && children.some((child) => child.visible !== false);
|
|
567
|
-
const isActiveFirst = activeOption === firstItem;
|
|
568
|
-
const showChild = isActiveFirst && !!activeChildOption;
|
|
569
|
-
moVNs.push(
|
|
460
|
+
onMouseleave: handleItemMouseleaveEvent
|
|
461
|
+
},
|
|
462
|
+
[
|
|
570
463
|
h(
|
|
571
464
|
"div",
|
|
572
465
|
{
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
466
|
+
class: ["vxe-context-menu--item-prefix", prefixOpts.className || ""]
|
|
467
|
+
},
|
|
468
|
+
loading ? [
|
|
469
|
+
h(
|
|
470
|
+
"span",
|
|
577
471
|
{
|
|
578
|
-
"
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
472
|
+
key: "1"
|
|
473
|
+
},
|
|
474
|
+
[
|
|
475
|
+
h("i", {
|
|
476
|
+
class: getIcon().CONTEXT_MENU_OPTION_LOADING
|
|
477
|
+
})
|
|
478
|
+
]
|
|
479
|
+
)
|
|
480
|
+
] : [
|
|
481
|
+
prefixIcon && XEUtils.isFunction(prefixIcon) ? h(
|
|
482
|
+
"span",
|
|
483
|
+
{
|
|
484
|
+
key: "2"
|
|
485
|
+
},
|
|
486
|
+
getSlotVNs(prefixIcon({}))
|
|
487
|
+
) : h(
|
|
488
|
+
"span",
|
|
489
|
+
{
|
|
490
|
+
key: "3"
|
|
491
|
+
},
|
|
492
|
+
[
|
|
493
|
+
h("i", {
|
|
494
|
+
class: prefixIcon
|
|
495
|
+
})
|
|
496
|
+
]
|
|
497
|
+
),
|
|
498
|
+
prefixOpts.content ? h(
|
|
499
|
+
"span",
|
|
500
|
+
{
|
|
501
|
+
key: "4"
|
|
502
|
+
},
|
|
503
|
+
`${prefixOpts.content || ""}`
|
|
504
|
+
) : renderEmptyElement($xeContextMenu)
|
|
505
|
+
]
|
|
506
|
+
),
|
|
507
|
+
h(
|
|
508
|
+
"div",
|
|
509
|
+
{
|
|
510
|
+
class: "vxe-context-menu--item-label"
|
|
511
|
+
},
|
|
512
|
+
menuContent
|
|
513
|
+
),
|
|
514
|
+
!loading && (suffixIcon || suffixOpts.content) ? h(
|
|
515
|
+
"div",
|
|
516
|
+
{
|
|
517
|
+
class: ["vxe-context-menu--item-suffix", suffixOpts.className || ""]
|
|
582
518
|
},
|
|
583
519
|
[
|
|
584
|
-
|
|
585
|
-
"
|
|
520
|
+
suffixIcon && XEUtils.isFunction(suffixIcon) ? h(
|
|
521
|
+
"span",
|
|
586
522
|
{
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
523
|
+
key: "2"
|
|
524
|
+
},
|
|
525
|
+
getSlotVNs(suffixIcon({}))
|
|
526
|
+
) : h(
|
|
527
|
+
"span",
|
|
528
|
+
{
|
|
529
|
+
key: "3"
|
|
591
530
|
},
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
531
|
+
[
|
|
532
|
+
h("i", {
|
|
533
|
+
class: suffixIcon
|
|
534
|
+
})
|
|
535
|
+
]
|
|
536
|
+
),
|
|
537
|
+
suffixOpts.content ? h(
|
|
538
|
+
"span",
|
|
539
|
+
{
|
|
540
|
+
key: "4"
|
|
541
|
+
},
|
|
542
|
+
`${suffixOpts.content || ""}`
|
|
543
|
+
) : renderEmptyElement($xeContextMenu)
|
|
544
|
+
]
|
|
545
|
+
) : renderEmptyElement($xeContextMenu),
|
|
546
|
+
hasChildMenus ? h(
|
|
547
|
+
"div",
|
|
548
|
+
{
|
|
549
|
+
class: "vxe-context-menu--item-subicon"
|
|
550
|
+
},
|
|
551
|
+
[
|
|
552
|
+
h("i", {
|
|
553
|
+
class: getIcon().CONTEXT_MENU_CHILDREN
|
|
554
|
+
})
|
|
609
555
|
]
|
|
556
|
+
) : renderEmptyElement($xeContextMenu)
|
|
557
|
+
]
|
|
558
|
+
);
|
|
559
|
+
};
|
|
560
|
+
const renderMenus = () => {
|
|
561
|
+
const { activeOption, activeChildOption, childOffsetX } = reactData;
|
|
562
|
+
const menuGroups = computeMenuGroups.value;
|
|
563
|
+
const mgVNs = [];
|
|
564
|
+
menuGroups.forEach((menuList, gIndex) => {
|
|
565
|
+
const moVNs = [];
|
|
566
|
+
menuList.forEach((firstItem, i) => {
|
|
567
|
+
const { children } = firstItem;
|
|
568
|
+
const hasChildMenus = children && children.some((child) => child.visible !== false);
|
|
569
|
+
const isActiveFirst = activeOption === firstItem;
|
|
570
|
+
const showChild = isActiveFirst && !!activeChildOption;
|
|
571
|
+
moVNs.push(
|
|
572
|
+
h(
|
|
573
|
+
"div",
|
|
574
|
+
{
|
|
575
|
+
key: `${gIndex}_${i}`,
|
|
576
|
+
class: [
|
|
577
|
+
"vxe-context-menu--item-wrapper vxe-context-menu--first-item",
|
|
578
|
+
firstItem.className || "",
|
|
579
|
+
{
|
|
580
|
+
"is--active": isActiveFirst,
|
|
581
|
+
"is--subactive": isActiveFirst && !!activeChildOption
|
|
582
|
+
}
|
|
583
|
+
]
|
|
584
|
+
},
|
|
585
|
+
[
|
|
586
|
+
hasChildMenus && showChild ? h(
|
|
587
|
+
"div",
|
|
588
|
+
{
|
|
589
|
+
class: "vxe-context-menu--children-wrapper",
|
|
590
|
+
style: {
|
|
591
|
+
transform: `translate(${childOffsetX}px, -2px)`
|
|
592
|
+
}
|
|
593
|
+
},
|
|
594
|
+
children.map((twoItem) => {
|
|
595
|
+
return h(
|
|
596
|
+
"div",
|
|
597
|
+
{
|
|
598
|
+
class: [
|
|
599
|
+
"vxe-context-menu--item-wrapper vxe-context-menu--child-item",
|
|
600
|
+
twoItem.className || "",
|
|
601
|
+
{
|
|
602
|
+
"is--active": activeChildOption === twoItem
|
|
603
|
+
}
|
|
604
|
+
]
|
|
605
|
+
},
|
|
606
|
+
[renderMenuItem(twoItem, firstItem)]
|
|
607
|
+
);
|
|
608
|
+
})
|
|
609
|
+
) : renderEmptyElement($xeContextMenu),
|
|
610
|
+
renderMenuItem(firstItem, null, hasChildMenus)
|
|
611
|
+
]
|
|
612
|
+
)
|
|
613
|
+
);
|
|
614
|
+
});
|
|
615
|
+
mgVNs.push(
|
|
616
|
+
h(
|
|
617
|
+
"div",
|
|
618
|
+
{
|
|
619
|
+
key: gIndex,
|
|
620
|
+
class: "vxe-context-menu--group-wrapper"
|
|
621
|
+
},
|
|
622
|
+
moVNs
|
|
610
623
|
)
|
|
611
624
|
);
|
|
612
625
|
});
|
|
613
|
-
mgVNs
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
626
|
+
return mgVNs;
|
|
627
|
+
};
|
|
628
|
+
const renderVN = () => {
|
|
629
|
+
const { className, position, destroyOnClose } = props;
|
|
630
|
+
const { visible, popupStyle } = reactData;
|
|
631
|
+
const vSize = computeSize.value;
|
|
632
|
+
return h(
|
|
633
|
+
"div",
|
|
634
|
+
{
|
|
635
|
+
ref: refElem,
|
|
636
|
+
class: [
|
|
637
|
+
"vxe-context-menu vxe-context-menu--wrapper",
|
|
638
|
+
position === "absolute" ? "is--" + position : "is--fixed",
|
|
639
|
+
className || "",
|
|
640
|
+
{
|
|
641
|
+
[`size--${vSize}`]: vSize,
|
|
642
|
+
"is--visible": visible
|
|
643
|
+
}
|
|
644
|
+
],
|
|
645
|
+
style: popupStyle
|
|
646
|
+
},
|
|
647
|
+
(destroyOnClose ? visible : true) ? renderMenus() : []
|
|
622
648
|
);
|
|
649
|
+
};
|
|
650
|
+
watch(computeTopAndLeft, () => {
|
|
651
|
+
handleLocate();
|
|
652
|
+
nextTick(() => {
|
|
653
|
+
updateLocate();
|
|
654
|
+
});
|
|
623
655
|
});
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
const vSize = computeSize.value;
|
|
630
|
-
return h(
|
|
631
|
-
"div",
|
|
632
|
-
{
|
|
633
|
-
ref: refElem,
|
|
634
|
-
class: [
|
|
635
|
-
"vxe-context-menu vxe-context-menu--wrapper",
|
|
636
|
-
position === "absolute" ? "is--" + position : "is--fixed",
|
|
637
|
-
className || "",
|
|
638
|
-
{
|
|
639
|
-
[`size--${vSize}`]: vSize,
|
|
640
|
-
"is--visible": visible
|
|
641
|
-
}
|
|
642
|
-
],
|
|
643
|
-
style: popupStyle
|
|
644
|
-
},
|
|
645
|
-
(destroyOnClose ? visible : true) ? renderMenus() : []
|
|
656
|
+
watch(
|
|
657
|
+
() => props.modelValue,
|
|
658
|
+
() => {
|
|
659
|
+
handleVisible();
|
|
660
|
+
}
|
|
646
661
|
);
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
662
|
+
handleVisible();
|
|
663
|
+
onMounted(() => {
|
|
664
|
+
globalEvents.on($xeContextMenu, "mousewheel", handleGlobalMousewheelEvent);
|
|
665
|
+
globalEvents.on($xeContextMenu, "keydown", handleGlobalKeydownEvent);
|
|
666
|
+
globalEvents.on($xeContextMenu, "mousedown", handleGlobalMousedownEvent);
|
|
667
|
+
globalEvents.on($xeContextMenu, "blur", handleGlobalBlurEvent);
|
|
652
668
|
});
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
globalEvents.off($xeContextMenu, "keydown");
|
|
674
|
-
globalEvents.off($xeContextMenu, "mousedown");
|
|
675
|
-
globalEvents.off($xeContextMenu, "blur");
|
|
676
|
-
XEUtils.assign(reactData, createReactData());
|
|
677
|
-
XEUtils.assign(internalData, createInternalData());
|
|
678
|
-
});
|
|
679
|
-
$xeContextMenu.renderVN = renderVN;
|
|
680
|
-
return $xeContextMenu;
|
|
681
|
-
},
|
|
682
|
-
render() {
|
|
683
|
-
return this.renderVN();
|
|
684
|
-
}
|
|
685
|
-
});
|
|
669
|
+
onBeforeUnmount(() => {
|
|
670
|
+
const { leaveTime } = internalData;
|
|
671
|
+
if (leaveTime) {
|
|
672
|
+
clearTimeout(leaveTime);
|
|
673
|
+
}
|
|
674
|
+
globalEvents.off($xeContextMenu, "mousewheel");
|
|
675
|
+
globalEvents.off($xeContextMenu, "keydown");
|
|
676
|
+
globalEvents.off($xeContextMenu, "mousedown");
|
|
677
|
+
globalEvents.off($xeContextMenu, "blur");
|
|
678
|
+
XEUtils.assign(reactData, createReactData());
|
|
679
|
+
XEUtils.assign(internalData, createInternalData());
|
|
680
|
+
});
|
|
681
|
+
$xeContextMenu.renderVN = renderVN;
|
|
682
|
+
return $xeContextMenu;
|
|
683
|
+
},
|
|
684
|
+
render() {
|
|
685
|
+
return this.renderVN();
|
|
686
|
+
}
|
|
687
|
+
})
|
|
688
|
+
);
|
|
686
689
|
export {
|
|
687
690
|
context_menu_default as default
|
|
688
691
|
};
|