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
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var step_item_exports = {};
|
|
30
|
+
__export(step_item_exports, {
|
|
31
|
+
StepItem: () => StepItem,
|
|
32
|
+
VxeStepItem: () => VxeStepItem,
|
|
33
|
+
default: () => step_item_default
|
|
34
|
+
});
|
|
35
|
+
module.exports = __toCommonJS(step_item_exports);
|
|
36
|
+
var import_core = require("@vxe-ui/core");
|
|
37
|
+
var import_step_item = __toESM(require("../steps/src/step-item"));
|
|
38
|
+
var import_dynamics = require("../dynamics");
|
|
39
|
+
const VxeStepItem = Object.assign({}, import_step_item.default, {
|
|
40
|
+
install(app) {
|
|
41
|
+
app.component(import_step_item.default.name, import_step_item.default);
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
import_dynamics.dynamicApp.use(VxeStepItem);
|
|
45
|
+
import_core.VxeUI.component(import_step_item.default);
|
|
46
|
+
const StepItem = VxeStepItem;
|
|
47
|
+
var step_item_default = VxeStepItem;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
9
|
+
var __export = (target, all) => {
|
|
10
|
+
for (var name in all)
|
|
11
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
12
|
+
};
|
|
13
|
+
var __copyProps = (to, from, except, desc) => {
|
|
14
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
15
|
+
for (let key of __getOwnPropNames(from))
|
|
16
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
17
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
18
|
+
}
|
|
19
|
+
return to;
|
|
20
|
+
};
|
|
21
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
22
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
23
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
24
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
25
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
26
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
27
|
+
mod
|
|
28
|
+
));
|
|
29
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
30
|
+
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
31
|
+
var step_info_exports = {};
|
|
32
|
+
__export(step_info_exports, {
|
|
33
|
+
StepItemInfo: () => StepItemInfo
|
|
34
|
+
});
|
|
35
|
+
module.exports = __toCommonJS(step_info_exports);
|
|
36
|
+
var import_xe_utils = __toESM(require("xe-utils"));
|
|
37
|
+
class StepItemInfo {
|
|
38
|
+
constructor($xeSteps, _vm) {
|
|
39
|
+
__publicField(this, "id", import_xe_utils.default.uniqueId("step_item_"));
|
|
40
|
+
Object.assign(this, {
|
|
41
|
+
title: _vm.title,
|
|
42
|
+
content: _vm.content,
|
|
43
|
+
status: _vm.status
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
update(name, value) {
|
|
47
|
+
this[name] = value;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var step_item_exports = {};
|
|
20
|
+
__export(step_item_exports, {
|
|
21
|
+
default: () => step_item_default
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(step_item_exports);
|
|
24
|
+
var import_vue = require("vue");
|
|
25
|
+
var import_comp = require("../../ui/src/comp");
|
|
26
|
+
var import_util = require("./util");
|
|
27
|
+
var step_item_default = (
|
|
28
|
+
/* define-vxe-component start */
|
|
29
|
+
(0, import_comp.defineVxeComponent)({
|
|
30
|
+
name: "VxeStepItem",
|
|
31
|
+
props: {
|
|
32
|
+
title: [String, Number],
|
|
33
|
+
content: [String, Number],
|
|
34
|
+
status: String
|
|
35
|
+
},
|
|
36
|
+
setup(props, context) {
|
|
37
|
+
const { slots } = context;
|
|
38
|
+
const refElem = (0, import_vue.ref)();
|
|
39
|
+
const $xeSteps = (0, import_vue.inject)("$xeSteps", {});
|
|
40
|
+
const itemConfig = (0, import_util.createStepItem)($xeSteps, props);
|
|
41
|
+
itemConfig.slots = slots;
|
|
42
|
+
(0, import_util.watchStepItem)(props, itemConfig);
|
|
43
|
+
(0, import_vue.onMounted)(() => {
|
|
44
|
+
const el = refElem.value;
|
|
45
|
+
if (el) {
|
|
46
|
+
(0, import_util.assembleStepItem)($xeSteps, el, itemConfig);
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
(0, import_vue.onUnmounted)(() => {
|
|
50
|
+
(0, import_util.destroyStepItem)($xeSteps, itemConfig);
|
|
51
|
+
});
|
|
52
|
+
return () => {
|
|
53
|
+
return (0, import_vue.h)("div", {
|
|
54
|
+
ref: refElem
|
|
55
|
+
});
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
})
|
|
59
|
+
);
|
package/lib/steps/src/steps.js
CHANGED
|
@@ -35,50 +35,302 @@ var import_vue = require("vue");
|
|
|
35
35
|
var import_comp = require("../../ui/src/comp");
|
|
36
36
|
var import_xe_utils = __toESM(require("xe-utils"));
|
|
37
37
|
var import_core = require("@vxe-ui/core");
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
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
|
-
|
|
38
|
+
var import_utils = require("../../ui/src/utils");
|
|
39
|
+
const { getConfig, getIcon, useFns, createEvent } = import_core.VxeUI;
|
|
40
|
+
function createInternalData() {
|
|
41
|
+
return {
|
|
42
|
+
fullData: []
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
function createReactData() {
|
|
46
|
+
return {
|
|
47
|
+
itemList: [],
|
|
48
|
+
staticItems: [],
|
|
49
|
+
isOptConf: false
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
var steps_default = (
|
|
53
|
+
/* define-vxe-component start */
|
|
54
|
+
(0, import_comp.defineVxeComponent)({
|
|
55
|
+
name: "VxeSteps",
|
|
56
|
+
props: {
|
|
57
|
+
modelValue: [Number, String],
|
|
58
|
+
size: {
|
|
59
|
+
type: String,
|
|
60
|
+
default: () => getConfig().steps.size
|
|
61
|
+
},
|
|
62
|
+
options: Array,
|
|
63
|
+
type: {
|
|
64
|
+
type: String,
|
|
65
|
+
default: () => getConfig().steps.type
|
|
66
|
+
},
|
|
67
|
+
vertical: {
|
|
68
|
+
type: Boolean,
|
|
69
|
+
default: () => getConfig().steps.vertical
|
|
70
|
+
},
|
|
71
|
+
optionProps: Object,
|
|
72
|
+
separator: {
|
|
73
|
+
type: [String, Number],
|
|
74
|
+
default: () => getConfig().steps.separator
|
|
75
|
+
},
|
|
76
|
+
showNumber: {
|
|
77
|
+
type: Boolean,
|
|
78
|
+
default: () => getConfig().steps.showNumber
|
|
79
|
+
},
|
|
80
|
+
showIcon: {
|
|
81
|
+
type: Boolean,
|
|
82
|
+
default: () => getConfig().steps.showIcon
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
emits: [
|
|
86
|
+
"update:modelValue"
|
|
87
|
+
],
|
|
88
|
+
setup(props, context) {
|
|
89
|
+
const { slots, emit } = context;
|
|
90
|
+
const xID = import_xe_utils.default.uniqueId();
|
|
91
|
+
const { computeSize } = useFns.useSize(props);
|
|
92
|
+
const refElem = (0, import_vue.ref)();
|
|
93
|
+
const reactData = (0, import_vue.reactive)(createReactData());
|
|
94
|
+
const internalData = createInternalData();
|
|
95
|
+
const refMaps = {
|
|
96
|
+
refElem
|
|
97
|
+
};
|
|
98
|
+
const computeMaps = {};
|
|
99
|
+
const $xeSteps = {
|
|
100
|
+
xID,
|
|
101
|
+
props,
|
|
102
|
+
context,
|
|
103
|
+
reactData,
|
|
104
|
+
internalData,
|
|
105
|
+
getRefMaps: () => refMaps,
|
|
106
|
+
getComputeMaps: () => computeMaps
|
|
107
|
+
};
|
|
108
|
+
const computePropsOpts = (0, import_vue.computed)(() => {
|
|
109
|
+
return Object.assign({}, getConfig().steps.optionProps, props.optionProps);
|
|
110
|
+
});
|
|
111
|
+
const computeTitleField = (0, import_vue.computed)(() => {
|
|
112
|
+
const propsOpts = computePropsOpts.value;
|
|
113
|
+
return propsOpts.title || "title";
|
|
114
|
+
});
|
|
115
|
+
const computeContentField = (0, import_vue.computed)(() => {
|
|
116
|
+
const propsOpts = computePropsOpts.value;
|
|
117
|
+
return propsOpts.content || "content";
|
|
118
|
+
});
|
|
119
|
+
const computeStatusField = (0, import_vue.computed)(() => {
|
|
120
|
+
const propsOpts = computePropsOpts.value;
|
|
121
|
+
return propsOpts.status || "status";
|
|
122
|
+
});
|
|
123
|
+
const computeSeparatorText = (0, import_vue.computed)(() => {
|
|
124
|
+
const { separator } = props;
|
|
125
|
+
return import_xe_utils.default.toValueString(separator) || "";
|
|
126
|
+
});
|
|
127
|
+
const computeCurrentNum = (0, import_vue.computed)(() => {
|
|
128
|
+
const { modelValue } = props;
|
|
129
|
+
return modelValue ? import_xe_utils.default.toNumber(modelValue) : 0;
|
|
130
|
+
});
|
|
131
|
+
const dispatchEvent = (type, params, evnt) => {
|
|
132
|
+
emit(type, createEvent(evnt, { $steps: $xeSteps }, params));
|
|
133
|
+
};
|
|
134
|
+
const loadData = (opts, isOptConf) => {
|
|
135
|
+
reactData.isOptConf = isOptConf;
|
|
136
|
+
internalData.fullData = opts || [];
|
|
137
|
+
updateItems();
|
|
138
|
+
};
|
|
139
|
+
const updateItems = () => {
|
|
140
|
+
const { fullData } = internalData;
|
|
141
|
+
reactData.itemList = fullData.slice(0);
|
|
142
|
+
};
|
|
143
|
+
const stepsMethods = {
|
|
144
|
+
dispatchEvent
|
|
145
|
+
};
|
|
146
|
+
const stepsPrivateMethods = {};
|
|
147
|
+
Object.assign($xeSteps, stepsMethods, stepsPrivateMethods);
|
|
148
|
+
const renderIcon = (itemStatus, isCurrent, isFinish, index) => {
|
|
149
|
+
const { showNumber, showIcon } = props;
|
|
150
|
+
if (!showNumber) {
|
|
151
|
+
return (0, import_vue.h)("span", {
|
|
152
|
+
class: "vxe-steps--item-icon-dot"
|
|
153
|
+
});
|
|
154
|
+
}
|
|
155
|
+
if (showIcon && (isFinish || itemStatus === "finish" || itemStatus === "error")) {
|
|
156
|
+
return (0, import_vue.h)("span", {
|
|
157
|
+
class: "vxe-steps--item-icon-status"
|
|
158
|
+
}, [
|
|
159
|
+
(0, import_vue.h)("i", {
|
|
160
|
+
class: itemStatus === "error" ? isCurrent ? getIcon().STEPS_STATUS_ERROR_CURRENT : getIcon().STEPS_STATUS_ERROR : isCurrent ? getIcon().STEPS_STATUS_FINISH_CURRENT : getIcon().STEPS_STATUS_FINISH
|
|
161
|
+
})
|
|
162
|
+
]);
|
|
163
|
+
}
|
|
164
|
+
return (0, import_vue.h)("span", {
|
|
165
|
+
class: "vxe-steps--item-icon-num"
|
|
166
|
+
}, `${index + 1}`);
|
|
167
|
+
};
|
|
168
|
+
const renderItem = (item, index) => {
|
|
169
|
+
const { itemList, isOptConf } = reactData;
|
|
170
|
+
const titleField = computeTitleField.value;
|
|
171
|
+
const contentField = computeContentField.value;
|
|
172
|
+
const currentNum = computeCurrentNum.value;
|
|
173
|
+
const statusField = computeStatusField.value;
|
|
174
|
+
const titleVal = (0, import_utils.getText)(isOptConf ? item[titleField] : item.title);
|
|
175
|
+
const contentVal = (0, import_utils.getText)(isOptConf ? item[contentField] : item.content);
|
|
176
|
+
const customStatus = (0, import_utils.getText)(isOptConf ? item[statusField] : item.status);
|
|
177
|
+
const titleSlot = slots.title;
|
|
178
|
+
const contentSlot = slots.content;
|
|
179
|
+
const isFinish = currentNum > index;
|
|
180
|
+
const isCurrent = currentNum === index;
|
|
181
|
+
return (0, import_vue.h)(
|
|
182
|
+
"div",
|
|
183
|
+
{
|
|
184
|
+
key: index,
|
|
185
|
+
class: [
|
|
186
|
+
"vxe-steps--item",
|
|
187
|
+
{
|
|
188
|
+
[`status--${customStatus}`]: customStatus,
|
|
189
|
+
"is--finish": isFinish,
|
|
190
|
+
"is--current": currentNum === index,
|
|
191
|
+
"is--last": index === itemList.length - 1
|
|
192
|
+
}
|
|
193
|
+
]
|
|
194
|
+
},
|
|
195
|
+
[
|
|
196
|
+
(0, import_vue.h)("div", {
|
|
197
|
+
class: "vxe-steps--item-line"
|
|
198
|
+
}),
|
|
199
|
+
(0, import_vue.h)(
|
|
200
|
+
"div",
|
|
201
|
+
{
|
|
202
|
+
class: "vxe-steps--item-icon"
|
|
203
|
+
},
|
|
204
|
+
[
|
|
205
|
+
renderIcon(customStatus, isCurrent, isFinish, index)
|
|
206
|
+
]
|
|
207
|
+
),
|
|
208
|
+
(0, import_vue.h)(
|
|
209
|
+
"div",
|
|
210
|
+
{
|
|
211
|
+
class: "vxe-steps--item-wrapper"
|
|
212
|
+
},
|
|
213
|
+
[
|
|
214
|
+
(0, import_vue.h)("div", {
|
|
215
|
+
class: "vxe-steps--item-title"
|
|
216
|
+
}, titleSlot ? titleSlot({ item }) : titleVal),
|
|
217
|
+
(0, import_vue.h)("div", {
|
|
218
|
+
class: "vxe-steps--item-content"
|
|
219
|
+
}, contentSlot ? contentSlot({ item }) : contentVal)
|
|
220
|
+
]
|
|
221
|
+
)
|
|
222
|
+
]
|
|
223
|
+
);
|
|
224
|
+
};
|
|
225
|
+
const renderSeparator = (index) => {
|
|
226
|
+
const separatorText = computeSeparatorText.value;
|
|
227
|
+
const separatorSlot = slots.separator;
|
|
228
|
+
return (0, import_vue.h)(
|
|
229
|
+
"div",
|
|
230
|
+
{
|
|
231
|
+
key: `s${index}`,
|
|
232
|
+
class: "vxe-steps--item-separator"
|
|
233
|
+
},
|
|
234
|
+
separatorSlot ? separatorSlot({}) : [
|
|
235
|
+
separatorText ? (0, import_vue.h)("span", {
|
|
236
|
+
key: "st"
|
|
237
|
+
}, separatorText) : (0, import_vue.h)("span", {
|
|
238
|
+
key: "si",
|
|
239
|
+
class: getIcon().STEPS_SEPARATOR
|
|
240
|
+
})
|
|
241
|
+
]
|
|
242
|
+
);
|
|
243
|
+
};
|
|
244
|
+
const renderItems = () => {
|
|
245
|
+
const { type, vertical } = props;
|
|
246
|
+
const { itemList } = reactData;
|
|
247
|
+
const isSimple = type === "simple";
|
|
248
|
+
const list = [];
|
|
249
|
+
itemList.forEach((item, index) => {
|
|
250
|
+
list.push(renderItem(item, index));
|
|
251
|
+
if (isSimple && !vertical && index < itemList.length - 1) {
|
|
252
|
+
list.push(renderSeparator(index));
|
|
253
|
+
}
|
|
254
|
+
});
|
|
255
|
+
return list;
|
|
256
|
+
};
|
|
257
|
+
const renderVN = () => {
|
|
258
|
+
const { showNumber, vertical, type } = props;
|
|
259
|
+
const vSize = computeSize.value;
|
|
260
|
+
const defaultSlot = slots.default;
|
|
261
|
+
return (0, import_vue.h)(
|
|
262
|
+
"div",
|
|
263
|
+
{
|
|
264
|
+
ref: refElem,
|
|
265
|
+
class: [
|
|
266
|
+
"vxe-steps",
|
|
267
|
+
{
|
|
268
|
+
[`size--${vSize}`]: vSize,
|
|
269
|
+
"is--number": showNumber,
|
|
270
|
+
"is--vertical": vertical,
|
|
271
|
+
"is--horizontal": !vertical,
|
|
272
|
+
"is--simple": type === "simple"
|
|
273
|
+
}
|
|
274
|
+
]
|
|
275
|
+
},
|
|
276
|
+
[
|
|
277
|
+
(0, import_vue.h)(
|
|
278
|
+
"div",
|
|
279
|
+
{
|
|
280
|
+
class: "vxe-steps--slots"
|
|
281
|
+
},
|
|
282
|
+
defaultSlot ? defaultSlot({}) : []
|
|
283
|
+
),
|
|
284
|
+
(0, import_vue.h)(
|
|
285
|
+
"div",
|
|
286
|
+
{
|
|
287
|
+
class: "vxe-steps--body"
|
|
288
|
+
},
|
|
289
|
+
renderItems()
|
|
290
|
+
)
|
|
291
|
+
]
|
|
292
|
+
);
|
|
293
|
+
};
|
|
294
|
+
(0, import_vue.watch)(
|
|
295
|
+
() => reactData.staticItems,
|
|
296
|
+
(val) => {
|
|
297
|
+
loadData(val, false);
|
|
298
|
+
}
|
|
76
299
|
);
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
300
|
+
const refOptsFlag = (0, import_vue.ref)(0);
|
|
301
|
+
(0, import_vue.watch)(
|
|
302
|
+
() => props.options,
|
|
303
|
+
() => {
|
|
304
|
+
refOptsFlag.value++;
|
|
305
|
+
}
|
|
306
|
+
);
|
|
307
|
+
(0, import_vue.watch)(
|
|
308
|
+
() => props.options ? props.options.length : -1,
|
|
309
|
+
() => {
|
|
310
|
+
refOptsFlag.value++;
|
|
311
|
+
}
|
|
312
|
+
);
|
|
313
|
+
(0, import_vue.watch)(refOptsFlag, () => {
|
|
314
|
+
loadData(props.options || [], true);
|
|
315
|
+
});
|
|
316
|
+
(0, import_vue.onMounted)(() => {
|
|
317
|
+
const { staticItems } = reactData;
|
|
318
|
+
if (staticItems.length) {
|
|
319
|
+
loadData(staticItems, false);
|
|
320
|
+
} else {
|
|
321
|
+
loadData(props.options || [], true);
|
|
322
|
+
}
|
|
323
|
+
});
|
|
324
|
+
(0, import_vue.onBeforeUnmount)(() => {
|
|
325
|
+
import_xe_utils.default.assign(reactData, createReactData());
|
|
326
|
+
import_xe_utils.default.assign(internalData, createInternalData());
|
|
327
|
+
});
|
|
328
|
+
(0, import_vue.provide)("$xeSteps", $xeSteps);
|
|
329
|
+
$xeSteps.renderVN = renderVN;
|
|
330
|
+
return $xeSteps;
|
|
331
|
+
},
|
|
332
|
+
render() {
|
|
333
|
+
return this.renderVN();
|
|
334
|
+
}
|
|
335
|
+
})
|
|
336
|
+
);
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var util_exports = {};
|
|
30
|
+
__export(util_exports, {
|
|
31
|
+
assembleStepItem: () => assembleStepItem,
|
|
32
|
+
createStepItem: () => createStepItem,
|
|
33
|
+
destroyStepItem: () => destroyStepItem,
|
|
34
|
+
isStepItem: () => isStepItem,
|
|
35
|
+
watchStepItem: () => watchStepItem
|
|
36
|
+
});
|
|
37
|
+
module.exports = __toCommonJS(util_exports);
|
|
38
|
+
var import_vue = require("vue");
|
|
39
|
+
var import_xe_utils = __toESM(require("xe-utils"));
|
|
40
|
+
var import_step_info = require("./step-info");
|
|
41
|
+
function isStepItem(item) {
|
|
42
|
+
return item instanceof import_step_info.StepItemInfo;
|
|
43
|
+
}
|
|
44
|
+
function createStepItem($xeSteps, _vm) {
|
|
45
|
+
return isStepItem(_vm) ? _vm : new import_step_info.StepItemInfo($xeSteps, _vm);
|
|
46
|
+
}
|
|
47
|
+
function watchStepItem(props, itemInfo) {
|
|
48
|
+
Object.keys(props).forEach((name) => {
|
|
49
|
+
(0, import_vue.watch)(
|
|
50
|
+
() => props[name],
|
|
51
|
+
(value) => {
|
|
52
|
+
itemInfo.update(name, value);
|
|
53
|
+
}
|
|
54
|
+
);
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
function assembleStepItem($xeSteps, el, itemInfo) {
|
|
58
|
+
const reactData = $xeSteps.reactData;
|
|
59
|
+
const { staticItems } = reactData;
|
|
60
|
+
const parentElem = el.parentNode;
|
|
61
|
+
if (parentElem && staticItems) {
|
|
62
|
+
staticItems.splice(import_xe_utils.default.arrayIndexOf(parentElem.children, el), 0, itemInfo);
|
|
63
|
+
reactData.staticItems = staticItems.slice(0);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
function destroyStepItem($xeSteps, itemInfo) {
|
|
67
|
+
const { reactData } = $xeSteps;
|
|
68
|
+
const { staticItems } = reactData;
|
|
69
|
+
const index = import_xe_utils.default.findIndexOf(staticItems, (item) => item.id === itemInfo.id);
|
|
70
|
+
if (index > -1) {
|
|
71
|
+
staticItems.splice(index, 1);
|
|
72
|
+
}
|
|
73
|
+
reactData.staticItems = staticItems.slice(0);
|
|
74
|
+
}
|