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
|
@@ -39,420 +39,423 @@ var import_dom = require("../../ui/src/dom");
|
|
|
39
39
|
var import_loading = __toESM(require("../../loading"));
|
|
40
40
|
var import_xe_utils = __toESM(require("xe-utils"));
|
|
41
41
|
const { getConfig, getIcon, createEvent, renderEmptyElement } = import_core.VxeUI;
|
|
42
|
-
var carousel_default = (
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
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
|
-
emits: ["update:modelValue", "change"],
|
|
78
|
-
setup(props, context) {
|
|
79
|
-
const { emit, slots } = context;
|
|
80
|
-
const xID = import_xe_utils.default.uniqueId();
|
|
81
|
-
const refElem = (0, import_vue.ref)();
|
|
82
|
-
const refWrapperElem = (0, import_vue.ref)();
|
|
83
|
-
const reactData = (0, import_vue.reactive)({
|
|
84
|
-
activeName: "",
|
|
85
|
-
staticItems: [],
|
|
86
|
-
itemWidth: 0,
|
|
87
|
-
itemHeight: 0
|
|
88
|
-
});
|
|
89
|
-
const internalData = {
|
|
90
|
-
apTimeout: void 0,
|
|
91
|
-
stopFlag: false
|
|
92
|
-
};
|
|
93
|
-
const refMaps = {
|
|
94
|
-
refElem
|
|
95
|
-
};
|
|
96
|
-
const computeListStyle = (0, import_vue.computed)(() => {
|
|
97
|
-
const { vertical, options } = props;
|
|
98
|
-
const { activeName, itemWidth, itemHeight, staticItems } = reactData;
|
|
99
|
-
const list = (staticItems && staticItems.length ? staticItems : options) || [];
|
|
100
|
-
const activeIndex = Math.max(
|
|
101
|
-
0,
|
|
102
|
-
import_xe_utils.default.findIndexOf(list, (item) => item.name === activeName)
|
|
103
|
-
);
|
|
104
|
-
const stys = {};
|
|
105
|
-
if (vertical) {
|
|
106
|
-
stys.transform = `translateY(-${activeIndex * itemHeight}px)`;
|
|
107
|
-
} else {
|
|
108
|
-
stys.width = `${itemWidth * list.length}px`;
|
|
109
|
-
stys.transform = `translateX(-${activeIndex * itemWidth}px)`;
|
|
42
|
+
var carousel_default = (
|
|
43
|
+
/* define-vxe-component start */
|
|
44
|
+
(0, import_comp.defineVxeComponent)({
|
|
45
|
+
name: "VxeCarousel",
|
|
46
|
+
props: {
|
|
47
|
+
modelValue: [String, Number],
|
|
48
|
+
options: Array,
|
|
49
|
+
loading: Boolean,
|
|
50
|
+
height: {
|
|
51
|
+
type: [Number, String],
|
|
52
|
+
default: () => getConfig().carousel.height
|
|
53
|
+
},
|
|
54
|
+
width: {
|
|
55
|
+
type: [Number, String],
|
|
56
|
+
default: () => getConfig().carousel.width
|
|
57
|
+
},
|
|
58
|
+
autoPlay: {
|
|
59
|
+
type: Boolean,
|
|
60
|
+
default: () => getConfig().carousel.autoPlay
|
|
61
|
+
},
|
|
62
|
+
interval: {
|
|
63
|
+
type: [Number, String],
|
|
64
|
+
default: () => getConfig().carousel.interval
|
|
65
|
+
},
|
|
66
|
+
loop: {
|
|
67
|
+
type: Boolean,
|
|
68
|
+
default: () => getConfig().carousel.loop
|
|
69
|
+
},
|
|
70
|
+
vertical: {
|
|
71
|
+
type: Boolean,
|
|
72
|
+
default: () => getConfig().carousel.vertical
|
|
73
|
+
},
|
|
74
|
+
showIndicators: {
|
|
75
|
+
type: Boolean,
|
|
76
|
+
default: () => getConfig().carousel.showIndicators
|
|
110
77
|
}
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
xID
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
reactData,
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
78
|
+
},
|
|
79
|
+
emits: ["update:modelValue", "change"],
|
|
80
|
+
setup(props, context) {
|
|
81
|
+
const { emit, slots } = context;
|
|
82
|
+
const xID = import_xe_utils.default.uniqueId();
|
|
83
|
+
const refElem = (0, import_vue.ref)();
|
|
84
|
+
const refWrapperElem = (0, import_vue.ref)();
|
|
85
|
+
const reactData = (0, import_vue.reactive)({
|
|
86
|
+
activeName: "",
|
|
87
|
+
staticItems: [],
|
|
88
|
+
itemWidth: 0,
|
|
89
|
+
itemHeight: 0
|
|
90
|
+
});
|
|
91
|
+
const internalData = {
|
|
92
|
+
apTimeout: void 0,
|
|
93
|
+
stopFlag: false
|
|
94
|
+
};
|
|
95
|
+
const refMaps = {
|
|
96
|
+
refElem
|
|
97
|
+
};
|
|
98
|
+
const computeListStyle = (0, import_vue.computed)(() => {
|
|
99
|
+
const { vertical, options } = props;
|
|
100
|
+
const { activeName, itemWidth, itemHeight, staticItems } = reactData;
|
|
101
|
+
const list = (staticItems && staticItems.length ? staticItems : options) || [];
|
|
102
|
+
const activeIndex = Math.max(
|
|
103
|
+
0,
|
|
104
|
+
import_xe_utils.default.findIndexOf(list, (item) => item.name === activeName)
|
|
105
|
+
);
|
|
106
|
+
const stys = {};
|
|
107
|
+
if (vertical) {
|
|
108
|
+
stys.transform = `translateY(-${activeIndex * itemHeight}px)`;
|
|
109
|
+
} else {
|
|
110
|
+
stys.width = `${itemWidth * list.length}px`;
|
|
111
|
+
stys.transform = `translateX(-${activeIndex * itemWidth}px)`;
|
|
129
112
|
}
|
|
113
|
+
return stys;
|
|
130
114
|
});
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
115
|
+
const computeMaps = {};
|
|
116
|
+
const $xeCarousel = {
|
|
117
|
+
xID,
|
|
118
|
+
props,
|
|
119
|
+
context,
|
|
120
|
+
reactData,
|
|
121
|
+
internalData,
|
|
122
|
+
getRefMaps: () => refMaps,
|
|
123
|
+
getComputeMaps: () => computeMaps
|
|
124
|
+
};
|
|
125
|
+
const updateStyle = () => {
|
|
126
|
+
(0, import_vue.nextTick)(() => {
|
|
127
|
+
const wrapperElem = refWrapperElem.value;
|
|
128
|
+
if (wrapperElem) {
|
|
129
|
+
reactData.itemWidth = wrapperElem.clientWidth;
|
|
130
|
+
reactData.itemHeight = wrapperElem.clientHeight;
|
|
147
131
|
}
|
|
148
132
|
});
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
import_xe_utils.default.findIndexOf(list, (item) => item.name === activeName)
|
|
166
|
-
);
|
|
167
|
-
if (index > -1) {
|
|
168
|
-
let item = null;
|
|
169
|
-
if (isNext) {
|
|
170
|
-
if (index < list.length - 1) {
|
|
171
|
-
item = list[index + 1];
|
|
172
|
-
} else {
|
|
173
|
-
if (loop) {
|
|
174
|
-
item = list[0];
|
|
133
|
+
};
|
|
134
|
+
const clickItemEvent = (evnt, item) => {
|
|
135
|
+
const value = item.name;
|
|
136
|
+
reactData.activeName = item.name;
|
|
137
|
+
emit("update:modelValue", value);
|
|
138
|
+
emit("change", { value }, evnt);
|
|
139
|
+
updateStyle();
|
|
140
|
+
};
|
|
141
|
+
const initDefaultActive = (list) => {
|
|
142
|
+
let activeName = null;
|
|
143
|
+
if (list && list.length) {
|
|
144
|
+
let validVal = false;
|
|
145
|
+
activeName = props.modelValue;
|
|
146
|
+
list.forEach((item) => {
|
|
147
|
+
if (activeName === item.name) {
|
|
148
|
+
validVal = true;
|
|
175
149
|
}
|
|
150
|
+
});
|
|
151
|
+
if (!validVal) {
|
|
152
|
+
activeName = list[0].name;
|
|
153
|
+
emit("update:modelValue", activeName);
|
|
176
154
|
}
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
|
|
155
|
+
}
|
|
156
|
+
reactData.activeName = activeName;
|
|
157
|
+
};
|
|
158
|
+
const dispatchEvent = (type, params, evnt) => {
|
|
159
|
+
emit(type, createEvent(evnt, { $carousel: $xeCarousel }, params));
|
|
160
|
+
};
|
|
161
|
+
const handlePrevNext = (isNext) => {
|
|
162
|
+
const { options, loop } = props;
|
|
163
|
+
const { activeName, staticItems } = reactData;
|
|
164
|
+
const list = (staticItems && staticItems.length ? staticItems : options) || [];
|
|
165
|
+
const index = Math.max(
|
|
166
|
+
0,
|
|
167
|
+
import_xe_utils.default.findIndexOf(list, (item) => item.name === activeName)
|
|
168
|
+
);
|
|
169
|
+
if (index > -1) {
|
|
170
|
+
let item = null;
|
|
171
|
+
if (isNext) {
|
|
172
|
+
if (index < list.length - 1) {
|
|
173
|
+
item = list[index + 1];
|
|
174
|
+
} else {
|
|
175
|
+
if (loop) {
|
|
176
|
+
item = list[0];
|
|
177
|
+
}
|
|
178
|
+
}
|
|
180
179
|
} else {
|
|
181
|
-
if (
|
|
182
|
-
item = list[
|
|
180
|
+
if (index > 0) {
|
|
181
|
+
item = list[index - 1];
|
|
182
|
+
} else {
|
|
183
|
+
if (loop) {
|
|
184
|
+
item = list[list.length - 1];
|
|
185
|
+
}
|
|
183
186
|
}
|
|
184
187
|
}
|
|
188
|
+
if (item) {
|
|
189
|
+
const name = item.name;
|
|
190
|
+
const value = name;
|
|
191
|
+
reactData.activeName = name;
|
|
192
|
+
emit("update:modelValue", value);
|
|
193
|
+
return true;
|
|
194
|
+
}
|
|
185
195
|
}
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
196
|
+
return false;
|
|
197
|
+
};
|
|
198
|
+
const carouselMethods = {
|
|
199
|
+
dispatchEvent,
|
|
200
|
+
prev() {
|
|
201
|
+
if (handlePrevNext(false)) {
|
|
202
|
+
handleAutoPlay();
|
|
203
|
+
}
|
|
204
|
+
return (0, import_vue.nextTick)();
|
|
205
|
+
},
|
|
206
|
+
next() {
|
|
207
|
+
if (handlePrevNext(true)) {
|
|
208
|
+
handleAutoPlay();
|
|
209
|
+
}
|
|
210
|
+
return (0, import_vue.nextTick)();
|
|
192
211
|
}
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
};
|
|
196
|
-
const carouselMethods = {
|
|
197
|
-
dispatchEvent,
|
|
198
|
-
prev() {
|
|
212
|
+
};
|
|
213
|
+
const prevEvent = (evnt) => {
|
|
199
214
|
if (handlePrevNext(false)) {
|
|
200
|
-
|
|
215
|
+
const value = reactData.activeName;
|
|
216
|
+
emit("change", { value }, evnt);
|
|
201
217
|
}
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
next() {
|
|
218
|
+
};
|
|
219
|
+
const nextEvent = (evnt) => {
|
|
205
220
|
if (handlePrevNext(true)) {
|
|
206
|
-
|
|
221
|
+
const value = reactData.activeName;
|
|
222
|
+
emit("change", { value }, evnt);
|
|
207
223
|
}
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
}
|
|
216
|
-
};
|
|
217
|
-
const nextEvent = (evnt) => {
|
|
218
|
-
if (handlePrevNext(true)) {
|
|
219
|
-
const value = reactData.activeName;
|
|
220
|
-
emit("change", { value }, evnt);
|
|
221
|
-
}
|
|
222
|
-
};
|
|
223
|
-
const stopAutoPlay = () => {
|
|
224
|
-
const { apTimeout } = internalData;
|
|
225
|
-
internalData.stopFlag = true;
|
|
226
|
-
if (apTimeout) {
|
|
227
|
-
clearTimeout(apTimeout);
|
|
228
|
-
internalData.apTimeout = void 0;
|
|
229
|
-
}
|
|
230
|
-
};
|
|
231
|
-
const handleAutoPlay = () => {
|
|
232
|
-
const { autoPlay, interval } = props;
|
|
233
|
-
const { stopFlag } = internalData;
|
|
234
|
-
stopAutoPlay();
|
|
235
|
-
if (autoPlay) {
|
|
236
|
-
internalData.stopFlag = false;
|
|
237
|
-
internalData.apTimeout = setTimeout(
|
|
238
|
-
() => {
|
|
239
|
-
if (!stopFlag) {
|
|
240
|
-
handlePrevNext(true);
|
|
241
|
-
}
|
|
242
|
-
},
|
|
243
|
-
import_xe_utils.default.toNumber(interval) || 300
|
|
244
|
-
);
|
|
245
|
-
}
|
|
246
|
-
};
|
|
247
|
-
const mouseenterEvent = () => {
|
|
248
|
-
stopAutoPlay();
|
|
249
|
-
};
|
|
250
|
-
const mouseleaveEvent = () => {
|
|
251
|
-
handleAutoPlay();
|
|
252
|
-
};
|
|
253
|
-
const carouselPrivateMethods = {};
|
|
254
|
-
const callSlot = (slotFunc, params) => {
|
|
255
|
-
if (slotFunc) {
|
|
256
|
-
if (import_xe_utils.default.isString(slotFunc)) {
|
|
257
|
-
slotFunc = slots[slotFunc] || null;
|
|
224
|
+
};
|
|
225
|
+
const stopAutoPlay = () => {
|
|
226
|
+
const { apTimeout } = internalData;
|
|
227
|
+
internalData.stopFlag = true;
|
|
228
|
+
if (apTimeout) {
|
|
229
|
+
clearTimeout(apTimeout);
|
|
230
|
+
internalData.apTimeout = void 0;
|
|
258
231
|
}
|
|
259
|
-
|
|
260
|
-
|
|
232
|
+
};
|
|
233
|
+
const handleAutoPlay = () => {
|
|
234
|
+
const { autoPlay, interval } = props;
|
|
235
|
+
const { stopFlag } = internalData;
|
|
236
|
+
stopAutoPlay();
|
|
237
|
+
if (autoPlay) {
|
|
238
|
+
internalData.stopFlag = false;
|
|
239
|
+
internalData.apTimeout = setTimeout(
|
|
240
|
+
() => {
|
|
241
|
+
if (!stopFlag) {
|
|
242
|
+
handlePrevNext(true);
|
|
243
|
+
}
|
|
244
|
+
},
|
|
245
|
+
import_xe_utils.default.toNumber(interval) || 300
|
|
246
|
+
);
|
|
261
247
|
}
|
|
262
|
-
}
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
const
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
248
|
+
};
|
|
249
|
+
const mouseenterEvent = () => {
|
|
250
|
+
stopAutoPlay();
|
|
251
|
+
};
|
|
252
|
+
const mouseleaveEvent = () => {
|
|
253
|
+
handleAutoPlay();
|
|
254
|
+
};
|
|
255
|
+
const carouselPrivateMethods = {};
|
|
256
|
+
const callSlot = (slotFunc, params) => {
|
|
257
|
+
if (slotFunc) {
|
|
258
|
+
if (import_xe_utils.default.isString(slotFunc)) {
|
|
259
|
+
slotFunc = slots[slotFunc] || null;
|
|
260
|
+
}
|
|
261
|
+
if (import_xe_utils.default.isFunction(slotFunc)) {
|
|
262
|
+
return (0, import_vn.getSlotVNs)(slotFunc(params));
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
return [];
|
|
266
|
+
};
|
|
267
|
+
Object.assign($xeCarousel, carouselMethods, carouselPrivateMethods);
|
|
268
|
+
const renderItemWrapper = (list) => {
|
|
269
|
+
const { height } = props;
|
|
270
|
+
const { activeName } = reactData;
|
|
271
|
+
const listStyle = computeListStyle.value;
|
|
272
|
+
return (0, import_vue.h)(
|
|
273
|
+
"div",
|
|
274
|
+
{
|
|
275
|
+
class: "vxe-carousel--list",
|
|
276
|
+
style: listStyle
|
|
277
|
+
},
|
|
278
|
+
list.map((item) => {
|
|
279
|
+
const { name, url, slots: slots2 } = item;
|
|
280
|
+
const defaultSlot = slots2 ? slots2.default : null;
|
|
281
|
+
return (0, import_vue.h)(
|
|
282
|
+
"div",
|
|
283
|
+
{
|
|
284
|
+
key: `${name}`,
|
|
285
|
+
class: [
|
|
286
|
+
"vxe-carousel--item-inner",
|
|
287
|
+
{
|
|
288
|
+
"is--active": activeName === name
|
|
289
|
+
}
|
|
290
|
+
],
|
|
291
|
+
style: height ? {
|
|
292
|
+
height: (0, import_dom.toCssUnit)(height)
|
|
293
|
+
} : null
|
|
294
|
+
},
|
|
295
|
+
defaultSlot ? callSlot(defaultSlot, {}) : [
|
|
296
|
+
(0, import_vue.h)("img", {
|
|
297
|
+
class: "vxe-carousel--item-img",
|
|
298
|
+
src: url
|
|
299
|
+
})
|
|
300
|
+
]
|
|
301
|
+
);
|
|
302
|
+
})
|
|
303
|
+
);
|
|
304
|
+
};
|
|
305
|
+
const renderIndicators = (list) => {
|
|
306
|
+
const { activeName } = reactData;
|
|
307
|
+
return (0, import_vue.h)(
|
|
308
|
+
"div",
|
|
309
|
+
{
|
|
310
|
+
class: "vxe-carousel--indicators"
|
|
311
|
+
},
|
|
312
|
+
list.map((item) => {
|
|
313
|
+
const { name } = item;
|
|
314
|
+
return (0, import_vue.h)("div", {
|
|
282
315
|
key: `${name}`,
|
|
283
316
|
class: [
|
|
284
|
-
"vxe-carousel--item
|
|
317
|
+
"vxe-carousel--indicators-item",
|
|
285
318
|
{
|
|
286
319
|
"is--active": activeName === name
|
|
287
320
|
}
|
|
288
321
|
],
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
} : null
|
|
292
|
-
},
|
|
293
|
-
defaultSlot ? callSlot(defaultSlot, {}) : [
|
|
294
|
-
(0, import_vue.h)("img", {
|
|
295
|
-
class: "vxe-carousel--item-img",
|
|
296
|
-
src: url
|
|
297
|
-
})
|
|
298
|
-
]
|
|
299
|
-
);
|
|
300
|
-
})
|
|
301
|
-
);
|
|
302
|
-
};
|
|
303
|
-
const renderIndicators = (list) => {
|
|
304
|
-
const { activeName } = reactData;
|
|
305
|
-
return (0, import_vue.h)(
|
|
306
|
-
"div",
|
|
307
|
-
{
|
|
308
|
-
class: "vxe-carousel--indicators"
|
|
309
|
-
},
|
|
310
|
-
list.map((item) => {
|
|
311
|
-
const { name } = item;
|
|
312
|
-
return (0, import_vue.h)("div", {
|
|
313
|
-
key: `${name}`,
|
|
314
|
-
class: [
|
|
315
|
-
"vxe-carousel--indicators-item",
|
|
316
|
-
{
|
|
317
|
-
"is--active": activeName === name
|
|
322
|
+
onClick(evnt) {
|
|
323
|
+
clickItemEvent(evnt, item);
|
|
318
324
|
}
|
|
319
|
-
|
|
320
|
-
onClick(evnt) {
|
|
321
|
-
clickItemEvent(evnt, item);
|
|
322
|
-
}
|
|
323
|
-
});
|
|
324
|
-
})
|
|
325
|
-
);
|
|
326
|
-
};
|
|
327
|
-
const renderVN = () => {
|
|
328
|
-
const { loading, height, width, showIndicators, vertical, options } = props;
|
|
329
|
-
const { staticItems } = reactData;
|
|
330
|
-
const defaultSlot = slots.default;
|
|
331
|
-
const list = (staticItems && staticItems.length ? staticItems : options) || [];
|
|
332
|
-
return (0, import_vue.h)(
|
|
333
|
-
"div",
|
|
334
|
-
{
|
|
335
|
-
ref: refElem,
|
|
336
|
-
class: ["vxe-carousel", `is--${vertical ? "vertical" : "horizontal"}`],
|
|
337
|
-
style: width ? {
|
|
338
|
-
width: (0, import_dom.toCssUnit)(width)
|
|
339
|
-
} : null,
|
|
340
|
-
onMouseenter: mouseenterEvent,
|
|
341
|
-
onMouseleave: mouseleaveEvent
|
|
342
|
-
},
|
|
343
|
-
[
|
|
344
|
-
(0, import_vue.h)(
|
|
345
|
-
"div",
|
|
346
|
-
{
|
|
347
|
-
class: "vxe-carousel--slots"
|
|
348
|
-
},
|
|
349
|
-
defaultSlot ? defaultSlot({}) : []
|
|
350
|
-
),
|
|
351
|
-
(0, import_vue.h)(
|
|
352
|
-
"div",
|
|
353
|
-
{
|
|
354
|
-
ref: refWrapperElem,
|
|
355
|
-
class: "vxe-carousel--item-wrapper",
|
|
356
|
-
style: height ? {
|
|
357
|
-
height: (0, import_dom.toCssUnit)(height)
|
|
358
|
-
} : null
|
|
359
|
-
},
|
|
360
|
-
[renderItemWrapper(list)]
|
|
361
|
-
),
|
|
362
|
-
showIndicators ? renderIndicators(list) : renderEmptyElement($xeCarousel),
|
|
363
|
-
(0, import_vue.h)(
|
|
364
|
-
"div",
|
|
365
|
-
{
|
|
366
|
-
class: "vxe-carousel--btn-wrapper"
|
|
367
|
-
},
|
|
368
|
-
[
|
|
369
|
-
(0, import_vue.h)(
|
|
370
|
-
"div",
|
|
371
|
-
{
|
|
372
|
-
class: "vxe-carousel--previous-btn",
|
|
373
|
-
onClick: prevEvent
|
|
374
|
-
},
|
|
375
|
-
[
|
|
376
|
-
(0, import_vue.h)("i", {
|
|
377
|
-
class: vertical ? getIcon().CAROUSEL_VERTICAL_PREVIOUS : getIcon().CAROUSEL_HORIZONTAL_PREVIOUS
|
|
378
|
-
})
|
|
379
|
-
]
|
|
380
|
-
),
|
|
381
|
-
(0, import_vue.h)(
|
|
382
|
-
"div",
|
|
383
|
-
{
|
|
384
|
-
class: "vxe-carousel--next-btn",
|
|
385
|
-
onClick: nextEvent
|
|
386
|
-
},
|
|
387
|
-
[
|
|
388
|
-
(0, import_vue.h)("i", {
|
|
389
|
-
class: vertical ? getIcon().CAROUSEL_VERTICAL_NEXT : getIcon().CAROUSEL_HORIZONTAL_NEXT
|
|
390
|
-
})
|
|
391
|
-
]
|
|
392
|
-
)
|
|
393
|
-
]
|
|
394
|
-
),
|
|
395
|
-
/**
|
|
396
|
-
* 加载中
|
|
397
|
-
*/
|
|
398
|
-
(0, import_vue.h)(import_loading.default, {
|
|
399
|
-
class: "vxe-carousel--loading",
|
|
400
|
-
modelValue: loading
|
|
325
|
+
});
|
|
401
326
|
})
|
|
402
|
-
|
|
327
|
+
);
|
|
328
|
+
};
|
|
329
|
+
const renderVN = () => {
|
|
330
|
+
const { loading, height, width, showIndicators, vertical, options } = props;
|
|
331
|
+
const { staticItems } = reactData;
|
|
332
|
+
const defaultSlot = slots.default;
|
|
333
|
+
const list = (staticItems && staticItems.length ? staticItems : options) || [];
|
|
334
|
+
return (0, import_vue.h)(
|
|
335
|
+
"div",
|
|
336
|
+
{
|
|
337
|
+
ref: refElem,
|
|
338
|
+
class: ["vxe-carousel", `is--${vertical ? "vertical" : "horizontal"}`],
|
|
339
|
+
style: width ? {
|
|
340
|
+
width: (0, import_dom.toCssUnit)(width)
|
|
341
|
+
} : null,
|
|
342
|
+
onMouseenter: mouseenterEvent,
|
|
343
|
+
onMouseleave: mouseleaveEvent
|
|
344
|
+
},
|
|
345
|
+
[
|
|
346
|
+
(0, import_vue.h)(
|
|
347
|
+
"div",
|
|
348
|
+
{
|
|
349
|
+
class: "vxe-carousel--slots"
|
|
350
|
+
},
|
|
351
|
+
defaultSlot ? defaultSlot({}) : []
|
|
352
|
+
),
|
|
353
|
+
(0, import_vue.h)(
|
|
354
|
+
"div",
|
|
355
|
+
{
|
|
356
|
+
ref: refWrapperElem,
|
|
357
|
+
class: "vxe-carousel--item-wrapper",
|
|
358
|
+
style: height ? {
|
|
359
|
+
height: (0, import_dom.toCssUnit)(height)
|
|
360
|
+
} : null
|
|
361
|
+
},
|
|
362
|
+
[renderItemWrapper(list)]
|
|
363
|
+
),
|
|
364
|
+
showIndicators ? renderIndicators(list) : renderEmptyElement($xeCarousel),
|
|
365
|
+
(0, import_vue.h)(
|
|
366
|
+
"div",
|
|
367
|
+
{
|
|
368
|
+
class: "vxe-carousel--btn-wrapper"
|
|
369
|
+
},
|
|
370
|
+
[
|
|
371
|
+
(0, import_vue.h)(
|
|
372
|
+
"div",
|
|
373
|
+
{
|
|
374
|
+
class: "vxe-carousel--previous-btn",
|
|
375
|
+
onClick: prevEvent
|
|
376
|
+
},
|
|
377
|
+
[
|
|
378
|
+
(0, import_vue.h)("i", {
|
|
379
|
+
class: vertical ? getIcon().CAROUSEL_VERTICAL_PREVIOUS : getIcon().CAROUSEL_HORIZONTAL_PREVIOUS
|
|
380
|
+
})
|
|
381
|
+
]
|
|
382
|
+
),
|
|
383
|
+
(0, import_vue.h)(
|
|
384
|
+
"div",
|
|
385
|
+
{
|
|
386
|
+
class: "vxe-carousel--next-btn",
|
|
387
|
+
onClick: nextEvent
|
|
388
|
+
},
|
|
389
|
+
[
|
|
390
|
+
(0, import_vue.h)("i", {
|
|
391
|
+
class: vertical ? getIcon().CAROUSEL_VERTICAL_NEXT : getIcon().CAROUSEL_HORIZONTAL_NEXT
|
|
392
|
+
})
|
|
393
|
+
]
|
|
394
|
+
)
|
|
395
|
+
]
|
|
396
|
+
),
|
|
397
|
+
/**
|
|
398
|
+
* 加载中
|
|
399
|
+
*/
|
|
400
|
+
(0, import_vue.h)(import_loading.default, {
|
|
401
|
+
class: "vxe-carousel--loading",
|
|
402
|
+
modelValue: loading
|
|
403
|
+
})
|
|
404
|
+
]
|
|
405
|
+
);
|
|
406
|
+
};
|
|
407
|
+
const optsFlag = (0, import_vue.ref)(0);
|
|
408
|
+
(0, import_vue.watch)(
|
|
409
|
+
() => props.options ? props.options.length : -1,
|
|
410
|
+
() => {
|
|
411
|
+
optsFlag.value++;
|
|
412
|
+
}
|
|
403
413
|
);
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
(
|
|
414
|
-
()
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
(
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
initDefaultActive(reactData.staticItems);
|
|
436
|
-
|
|
437
|
-
(0, import_vue.watch)(
|
|
438
|
-
() => props.autoPlay,
|
|
439
|
-
() => {
|
|
414
|
+
(0, import_vue.watch)(
|
|
415
|
+
() => props.options,
|
|
416
|
+
() => {
|
|
417
|
+
optsFlag.value++;
|
|
418
|
+
}
|
|
419
|
+
);
|
|
420
|
+
(0, import_vue.watch)(optsFlag, () => {
|
|
421
|
+
initDefaultActive(props.options);
|
|
422
|
+
});
|
|
423
|
+
const stFlag = (0, import_vue.ref)(0);
|
|
424
|
+
(0, import_vue.watch)(
|
|
425
|
+
() => reactData.staticItems ? reactData.staticItems.length : -1,
|
|
426
|
+
() => {
|
|
427
|
+
stFlag.value++;
|
|
428
|
+
}
|
|
429
|
+
);
|
|
430
|
+
(0, import_vue.watch)(
|
|
431
|
+
() => reactData.staticItems,
|
|
432
|
+
() => {
|
|
433
|
+
stFlag.value++;
|
|
434
|
+
}
|
|
435
|
+
);
|
|
436
|
+
(0, import_vue.watch)(stFlag, () => {
|
|
437
|
+
initDefaultActive(reactData.staticItems);
|
|
438
|
+
});
|
|
439
|
+
(0, import_vue.watch)(
|
|
440
|
+
() => props.autoPlay,
|
|
441
|
+
() => {
|
|
442
|
+
handleAutoPlay();
|
|
443
|
+
}
|
|
444
|
+
);
|
|
445
|
+
initDefaultActive(reactData.staticItems.length ? reactData.staticItems : props.options);
|
|
446
|
+
(0, import_vue.onMounted)(() => {
|
|
440
447
|
handleAutoPlay();
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
render() {
|
|
456
|
-
return this.renderVN();
|
|
457
|
-
}
|
|
458
|
-
});
|
|
448
|
+
updateStyle();
|
|
449
|
+
});
|
|
450
|
+
(0, import_vue.onUnmounted)(() => {
|
|
451
|
+
stopAutoPlay();
|
|
452
|
+
});
|
|
453
|
+
(0, import_vue.provide)("$xeCarousel", $xeCarousel);
|
|
454
|
+
$xeCarousel.renderVN = renderVN;
|
|
455
|
+
return $xeCarousel;
|
|
456
|
+
},
|
|
457
|
+
render() {
|
|
458
|
+
return this.renderVN();
|
|
459
|
+
}
|
|
460
|
+
})
|
|
461
|
+
);
|