vxe-table 4.3.4 → 4.3.6-beta.0
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/es/button/style.css +465 -341
- package/es/checkbox/style.css +156 -127
- package/es/checkbox-group/style.css +1 -1
- package/es/colgroup/style.css +1 -1
- package/es/column/style.css +1 -1
- package/es/edit/style.css +1 -1
- package/es/export/src/hook.js +1 -0
- package/es/export/style.css +136 -108
- package/es/filter/src/hook.js +1 -1
- package/es/filter/style.css +103 -82
- package/es/footer/src/footer.js +3 -3
- package/es/form/src/form.js +5 -4
- package/es/form/style.css +201 -168
- package/es/form-gather/style.css +1 -1
- package/es/form-item/style.css +1 -1
- package/es/grid/style.css +61 -50
- package/es/header/src/header.js +10 -5
- package/es/icon/style/iconfont.1669214286403.ttf +0 -0
- package/es/icon/style/iconfont.1669214286403.woff +0 -0
- package/es/icon/style/iconfont.1669214286403.woff2 +0 -0
- package/es/icon/style.css +406 -178
- package/es/iconfont.1669214286403.ttf +0 -0
- package/es/iconfont.1669214286403.woff +0 -0
- package/es/iconfont.1669214286403.woff2 +0 -0
- package/es/input/style.css +771 -595
- package/es/keyboard/style.css +1 -1
- package/es/list/src/list.js +7 -1
- package/es/list/style.css +19 -14
- package/es/loading/style.css +52 -48
- package/es/locale/lang/en-US.js +0 -1
- package/es/locale/lang/ja-JP.js +0 -1
- package/es/locale/lang/zh-CN.js +0 -1
- package/es/locale/lang/zh-TC.js +0 -1
- package/es/menu/style.css +79 -59
- package/es/modal/style.css +311 -247
- package/es/optgroup/style.css +1 -1
- package/es/option/style.css +1 -1
- package/es/pager/style.css +307 -257
- package/es/pulldown/src/pulldown.js +9 -3
- package/es/pulldown/style.css +42 -31
- package/es/radio/style.css +184 -151
- package/es/radio-button/style.css +1 -1
- package/es/radio-group/style.css +1 -1
- package/es/select/style.css +108 -79
- package/es/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/switch/style.css +87 -67
- package/es/table/src/column.js +2 -0
- package/es/table/src/columnInfo.js +1 -0
- package/es/table/src/table.js +36 -40
- package/es/table/style.css +1025 -835
- package/es/textarea/style.css +57 -41
- package/es/toolbar/style.css +216 -174
- package/es/tools/log.js +1 -1
- package/es/tooltip/style.css +87 -63
- package/es/v-x-e-table/index.js +1 -1
- package/es/v-x-e-table/style.css +458 -226
- package/es/validator/style.css +1 -1
- package/es/vxe-button/style.css +465 -341
- package/es/vxe-checkbox/style.css +156 -127
- package/es/vxe-checkbox-group/style.css +1 -1
- package/es/vxe-colgroup/style.css +1 -1
- package/es/vxe-column/style.css +1 -1
- package/es/vxe-form/style.css +201 -168
- package/es/vxe-form-gather/style.css +1 -1
- package/es/vxe-form-item/style.css +1 -1
- package/es/vxe-grid/style.css +61 -50
- package/es/vxe-icon/style.css +406 -178
- package/es/vxe-input/style.css +771 -595
- package/es/vxe-list/style.css +19 -14
- package/es/vxe-loading/style.css +52 -48
- package/es/vxe-modal/style.css +311 -247
- package/es/vxe-module-edit/style.css +1 -1
- package/es/vxe-module-export/style.css +136 -108
- package/es/vxe-module-filter/style.css +103 -82
- package/es/vxe-module-keyboard/style.css +1 -1
- package/es/vxe-module-menu/style.css +79 -59
- package/es/vxe-module-validator/style.css +1 -1
- package/es/vxe-optgroup/style.css +1 -1
- package/es/vxe-option/style.css +1 -1
- package/es/vxe-pager/style.css +307 -257
- package/es/vxe-pulldown/style.css +42 -31
- package/es/vxe-radio/style.css +184 -151
- package/es/vxe-radio-button/style.css +1 -1
- package/es/vxe-radio-group/style.css +1 -1
- package/es/vxe-select/style.css +108 -79
- package/es/vxe-switch/style.css +87 -67
- package/es/vxe-table/style.css +1025 -835
- package/es/vxe-textarea/style.css +57 -41
- package/es/vxe-toolbar/style.css +216 -174
- package/es/vxe-tooltip/style.css +87 -63
- package/lib/all.js +45 -115
- package/lib/all.min.js +1 -1
- package/lib/button/index.js +1 -7
- package/lib/button/index.min.js +1 -1
- package/lib/button/src/button.js +48 -113
- package/lib/button/src/button.min.js +1 -1
- package/lib/button/style/style.css +465 -341
- package/lib/button/style/style.min.css +1 -1
- package/lib/checkbox/index.js +1 -7
- package/lib/checkbox/index.min.js +1 -1
- package/lib/checkbox/src/checkbox.js +12 -32
- package/lib/checkbox/src/checkbox.min.js +1 -1
- package/lib/checkbox/src/group.js +13 -28
- package/lib/checkbox/src/group.min.js +1 -1
- package/lib/checkbox/style/style.css +156 -127
- package/lib/checkbox/style/style.min.css +1 -1
- package/lib/checkbox-group/index.js +1 -7
- package/lib/checkbox-group/index.min.js +1 -1
- package/lib/checkbox-group/style/style.css +1 -1
- package/lib/colgroup/index.js +5 -12
- package/lib/colgroup/index.min.js +1 -1
- package/lib/colgroup/style/style.css +1 -1
- package/lib/column/index.js +5 -12
- package/lib/column/index.min.js +1 -1
- package/lib/column/style/style.css +1 -1
- package/lib/dynamics/index.js +1 -5
- package/lib/dynamics/index.min.js +1 -1
- package/lib/edit/index.js +1 -5
- package/lib/edit/index.min.js +1 -1
- package/lib/edit/src/hook.js +102 -248
- package/lib/edit/src/hook.min.js +1 -1
- package/lib/edit/style/style.css +1 -1
- package/lib/export/index.js +4 -19
- package/lib/export/index.min.js +1 -1
- package/lib/export/src/export-panel.js +38 -77
- package/lib/export/src/export-panel.min.js +1 -1
- package/lib/export/src/hook.js +127 -380
- package/lib/export/src/hook.min.js +1 -1
- package/lib/export/src/import-panel.js +17 -39
- package/lib/export/src/import-panel.min.js +1 -1
- package/lib/export/src/util.js +10 -52
- package/lib/export/src/util.min.js +1 -1
- package/lib/export/style/style.css +136 -108
- package/lib/export/style/style.min.css +1 -1
- package/lib/filter/index.js +1 -10
- package/lib/filter/index.min.js +1 -1
- package/lib/filter/src/hook.js +31 -82
- package/lib/filter/src/hook.min.js +1 -1
- package/lib/filter/src/panel.js +25 -52
- package/lib/filter/src/panel.min.js +1 -1
- package/lib/filter/style/style.css +103 -82
- package/lib/filter/style/style.min.css +1 -1
- package/lib/footer/index.js +1 -7
- package/lib/footer/index.min.js +1 -1
- package/lib/footer/src/footer.js +54 -99
- package/lib/footer/src/footer.min.js +1 -1
- package/lib/form/index.js +1 -7
- package/lib/form/index.min.js +1 -1
- package/lib/form/src/form-config-item.js +27 -56
- package/lib/form/src/form-config-item.min.js +1 -1
- package/lib/form/src/form-gather.js +3 -12
- package/lib/form/src/form-gather.min.js +1 -1
- package/lib/form/src/form-item.js +23 -52
- package/lib/form/src/form-item.min.js +1 -1
- package/lib/form/src/form.js +78 -185
- package/lib/form/src/form.min.js +1 -1
- package/lib/form/src/itemInfo.js +1 -9
- package/lib/form/src/render.js +7 -26
- package/lib/form/src/render.min.js +1 -1
- package/lib/form/src/util.js +4 -28
- package/lib/form/src/util.min.js +1 -1
- package/lib/form/style/style.css +201 -168
- package/lib/form/style/style.min.css +1 -1
- package/lib/form-gather/index.js +1 -7
- package/lib/form-gather/index.min.js +1 -1
- package/lib/form-gather/style/style.css +1 -1
- package/lib/form-item/index.js +1 -7
- package/lib/form-item/index.min.js +1 -1
- package/lib/form-item/style/style.css +1 -1
- package/lib/grid/index.js +1 -7
- package/lib/grid/index.min.js +1 -1
- package/lib/grid/src/grid.js +97 -315
- package/lib/grid/src/grid.min.js +1 -1
- package/lib/grid/style/style.css +61 -50
- package/lib/grid/style/style.min.css +1 -1
- package/lib/header/index.js +1 -7
- package/lib/header/index.min.js +1 -1
- package/lib/header/src/header.js +57 -92
- package/lib/header/src/header.min.js +1 -1
- package/lib/header/src/util.js +3 -14
- package/lib/header/src/util.min.js +1 -1
- package/lib/hooks/size.js +0 -2
- package/lib/icon/index.js +1 -7
- package/lib/icon/index.min.js +1 -1
- package/lib/icon/src/icon.js +2 -7
- package/lib/icon/style/iconfont.1669214286403.ttf +0 -0
- package/lib/icon/style/iconfont.1669214286403.woff +0 -0
- package/lib/icon/style/iconfont.1669214286403.woff2 +0 -0
- package/lib/icon/style/style.css +406 -178
- package/lib/icon/style/style.min.css +719 -1
- package/lib/iconfont.1669214286403.ttf +0 -0
- package/lib/iconfont.1669214286403.woff +0 -0
- package/lib/iconfont.1669214286403.woff2 +0 -0
- package/lib/index.common.js +3 -10
- package/lib/index.common.min.js +1 -1
- package/lib/index.umd.js +14514 -23890
- package/lib/index.umd.min.js +1 -1
- package/lib/input/index.js +1 -7
- package/lib/input/index.min.js +1 -1
- package/lib/input/src/date.js +0 -10
- package/lib/input/src/date.min.js +1 -1
- package/lib/input/src/input.js +217 -553
- package/lib/input/src/input.min.js +1 -1
- package/lib/input/src/number.js +0 -5
- package/lib/input/style/style.css +771 -595
- package/lib/input/style/style.min.css +1 -1
- package/lib/keyboard/index.js +1 -5
- package/lib/keyboard/index.min.js +1 -1
- package/lib/keyboard/src/hook.js +40 -106
- package/lib/keyboard/src/hook.min.js +1 -1
- package/lib/keyboard/style/style.css +1 -1
- package/lib/list/index.js +1 -7
- package/lib/list/index.min.js +1 -1
- package/lib/list/src/list.js +39 -91
- package/lib/list/src/list.min.js +1 -1
- package/lib/list/style/style.css +19 -14
- package/lib/loading/index.js +1 -4
- package/lib/loading/index.min.js +1 -1
- package/lib/loading/src/loading.js +1 -6
- package/lib/loading/style/style.css +52 -48
- package/lib/loading/style/style.min.css +1 -1
- package/lib/locale/lang/en-US.js +0 -1
- package/lib/locale/lang/en-US.min.js +1 -1
- package/lib/locale/lang/en-US.umd.js +0 -1
- package/lib/locale/lang/ja-JP.js +0 -1
- package/lib/locale/lang/ja-JP.min.js +1 -1
- package/lib/locale/lang/ja-JP.umd.js +0 -1
- package/lib/locale/lang/zh-CN.js +0 -1
- package/lib/locale/lang/zh-CN.min.js +1 -1
- package/lib/locale/lang/zh-CN.umd.js +0 -1
- package/lib/locale/lang/zh-HK.js +0 -3
- package/lib/locale/lang/zh-HK.min.js +1 -1
- package/lib/locale/lang/zh-HK.umd.js +0 -1
- package/lib/locale/lang/zh-MO.js +0 -3
- package/lib/locale/lang/zh-MO.min.js +1 -1
- package/lib/locale/lang/zh-MO.umd.js +0 -1
- package/lib/locale/lang/zh-TC.js +0 -1
- package/lib/locale/lang/zh-TC.min.js +1 -1
- package/lib/locale/lang/zh-TC.umd.js +0 -1
- package/lib/locale/lang/zh-TW.js +0 -3
- package/lib/locale/lang/zh-TW.min.js +1 -1
- package/lib/locale/lang/zh-TW.umd.js +0 -1
- package/lib/menu/index.js +1 -10
- package/lib/menu/index.min.js +1 -1
- package/lib/menu/src/hooks.js +45 -109
- package/lib/menu/src/hooks.min.js +1 -1
- package/lib/menu/src/panel.js +10 -19
- package/lib/menu/src/panel.min.js +1 -1
- package/lib/menu/style/style.css +79 -59
- package/lib/menu/style/style.min.css +1 -1
- package/lib/modal/index.js +5 -36
- package/lib/modal/index.min.js +1 -1
- package/lib/modal/src/modal.js +128 -315
- package/lib/modal/src/modal.min.js +1 -1
- package/lib/modal/style/style.css +311 -247
- package/lib/modal/style/style.min.css +1 -1
- package/lib/optgroup/index.js +1 -7
- package/lib/optgroup/index.min.js +1 -1
- package/lib/optgroup/style/style.css +1 -1
- package/lib/option/index.js +1 -7
- package/lib/option/index.min.js +1 -1
- package/lib/option/style/style.css +1 -1
- package/lib/pager/index.js +1 -7
- package/lib/pager/index.min.js +1 -1
- package/lib/pager/src/pager.js +74 -151
- package/lib/pager/src/pager.min.js +1 -1
- package/lib/pager/style/style.css +307 -257
- package/lib/pager/style/style.min.css +1 -1
- package/lib/pulldown/index.js +1 -7
- package/lib/pulldown/index.min.js +1 -1
- package/lib/pulldown/src/pulldown.js +46 -90
- package/lib/pulldown/src/pulldown.min.js +1 -1
- package/lib/pulldown/style/style.css +42 -31
- package/lib/pulldown/style/style.min.css +1 -1
- package/lib/radio/index.js +1 -7
- package/lib/radio/index.min.js +1 -1
- package/lib/radio/src/button.js +14 -32
- package/lib/radio/src/button.min.js +1 -1
- package/lib/radio/src/group.js +11 -22
- package/lib/radio/src/group.min.js +1 -1
- package/lib/radio/src/radio.js +15 -34
- package/lib/radio/src/radio.min.js +1 -1
- package/lib/radio/style/style.css +184 -151
- package/lib/radio/style/style.min.css +1 -1
- package/lib/radio-button/index.js +1 -7
- package/lib/radio-button/index.min.js +1 -1
- package/lib/radio-button/style/style.css +1 -1
- package/lib/radio-group/index.js +1 -7
- package/lib/radio-group/index.min.js +1 -1
- package/lib/radio-group/style/style.css +1 -1
- package/lib/select/index.js +1 -7
- package/lib/select/index.min.js +1 -1
- package/lib/select/src/optgroup.js +1 -5
- package/lib/select/src/option.js +1 -5
- package/lib/select/src/optionInfo.js +1 -9
- package/lib/select/src/select.js +103 -256
- package/lib/select/src/select.min.js +1 -1
- package/lib/select/src/util.js +0 -13
- package/lib/select/src/util.min.js +1 -1
- package/lib/select/style/style.css +108 -79
- package/lib/select/style/style.min.css +1 -1
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/switch/index.js +1 -7
- package/lib/switch/index.min.js +1 -1
- package/lib/switch/src/switch.js +16 -35
- package/lib/switch/src/switch.min.js +1 -1
- package/lib/switch/style/style.css +87 -67
- package/lib/switch/style/style.min.css +1 -1
- package/lib/table/index.js +1 -7
- package/lib/table/index.min.js +1 -1
- package/lib/table/src/body.js +143 -262
- package/lib/table/src/body.min.js +1 -1
- package/lib/table/src/cell.js +138 -259
- package/lib/table/src/cell.min.js +1 -1
- package/lib/table/src/column.js +4 -13
- package/lib/table/src/column.min.js +1 -1
- package/lib/table/src/columnInfo.js +6 -35
- package/lib/table/src/columnInfo.min.js +1 -1
- package/lib/table/src/group.js +2 -15
- package/lib/table/src/group.min.js +1 -1
- package/lib/table/src/props.js +25 -29
- package/lib/table/src/props.min.js +1 -1
- package/lib/table/src/table.js +670 -1620
- package/lib/table/src/table.min.js +1 -1
- package/lib/table/src/util.js +32 -102
- package/lib/table/src/util.min.js +1 -1
- package/lib/table/style/style.css +1025 -835
- package/lib/table/style/style.min.css +1 -1
- package/lib/textarea/index.js +1 -7
- package/lib/textarea/index.min.js +1 -1
- package/lib/textarea/src/textarea.js +31 -71
- package/lib/textarea/src/textarea.min.js +1 -1
- package/lib/textarea/style/style.css +57 -41
- package/lib/textarea/style/style.min.css +1 -1
- package/lib/toolbar/index.js +1 -7
- package/lib/toolbar/index.min.js +1 -1
- package/lib/toolbar/src/toolbar.js +60 -167
- package/lib/toolbar/src/toolbar.min.js +1 -1
- package/lib/toolbar/style/style.css +216 -174
- package/lib/toolbar/style/style.min.css +1 -1
- package/lib/tools/dom.js +6 -48
- package/lib/tools/dom.min.js +1 -1
- package/lib/tools/event.js +8 -20
- package/lib/tools/event.min.js +1 -1
- package/lib/tools/log.js +1 -6
- package/lib/tools/log.min.js +1 -1
- package/lib/tools/resize.js +3 -27
- package/lib/tools/utils.js +0 -16
- package/lib/tools/utils.min.js +1 -1
- package/lib/tools/vn.js +0 -5
- package/lib/tooltip/index.js +1 -8
- package/lib/tooltip/index.min.js +1 -1
- package/lib/tooltip/src/tooltip.js +47 -111
- package/lib/tooltip/src/tooltip.min.js +1 -1
- package/lib/tooltip/style/style.css +87 -63
- package/lib/v-x-e-table/index.js +13 -44
- package/lib/v-x-e-table/index.min.js +1 -1
- package/lib/v-x-e-table/src/commands.js +0 -4
- package/lib/v-x-e-table/src/conf.js +31 -19
- package/lib/v-x-e-table/src/formats.js +0 -4
- package/lib/v-x-e-table/src/hooks.js +0 -3
- package/lib/v-x-e-table/src/interceptor.js +6 -18
- package/lib/v-x-e-table/src/interceptor.min.js +1 -1
- package/lib/v-x-e-table/src/menus.js +0 -4
- package/lib/v-x-e-table/src/renderer.js +66 -199
- package/lib/v-x-e-table/src/renderer.min.js +1 -1
- package/lib/v-x-e-table/src/setup.js +1 -6
- package/lib/v-x-e-table/src/store.js +3 -19
- package/lib/v-x-e-table/style/style.css +458 -226
- package/lib/v-x-e-table/style/style.min.css +1 -1
- package/lib/validator/index.js +1 -5
- package/lib/validator/index.min.js +1 -1
- package/lib/validator/src/hook.js +50 -116
- package/lib/validator/src/hook.min.js +1 -1
- package/lib/validator/style/style.css +1 -1
- package/lib/vxe-button/index.js +3 -10
- package/lib/vxe-button/index.min.js +1 -1
- package/lib/vxe-button/style/style.css +465 -341
- package/lib/vxe-button/style/style.min.css +1 -1
- package/lib/vxe-checkbox/index.js +3 -10
- package/lib/vxe-checkbox/index.min.js +1 -1
- package/lib/vxe-checkbox/style/style.css +156 -127
- package/lib/vxe-checkbox/style/style.min.css +1 -1
- package/lib/vxe-checkbox-group/index.js +3 -10
- package/lib/vxe-checkbox-group/index.min.js +1 -1
- package/lib/vxe-checkbox-group/style/style.css +1 -1
- package/lib/vxe-colgroup/index.js +3 -10
- package/lib/vxe-colgroup/index.min.js +1 -1
- package/lib/vxe-colgroup/style/style.css +1 -1
- package/lib/vxe-column/index.js +3 -10
- package/lib/vxe-column/index.min.js +1 -1
- package/lib/vxe-column/style/style.css +1 -1
- package/lib/vxe-form/index.js +3 -10
- package/lib/vxe-form/index.min.js +1 -1
- package/lib/vxe-form/style/style.css +201 -168
- package/lib/vxe-form/style/style.min.css +1 -1
- package/lib/vxe-form-gather/index.js +3 -10
- package/lib/vxe-form-gather/index.min.js +1 -1
- package/lib/vxe-form-gather/style/style.css +1 -1
- package/lib/vxe-form-item/index.js +3 -10
- package/lib/vxe-form-item/index.min.js +1 -1
- package/lib/vxe-form-item/style/style.css +1 -1
- package/lib/vxe-grid/index.js +3 -10
- package/lib/vxe-grid/index.min.js +1 -1
- package/lib/vxe-grid/style/style.css +61 -50
- package/lib/vxe-grid/style/style.min.css +1 -1
- package/lib/vxe-icon/index.js +3 -10
- package/lib/vxe-icon/index.min.js +1 -1
- package/lib/vxe-icon/style/style.css +406 -178
- package/lib/vxe-icon/style/style.min.css +1 -1
- package/lib/vxe-input/index.js +3 -10
- package/lib/vxe-input/index.min.js +1 -1
- package/lib/vxe-input/style/style.css +771 -595
- package/lib/vxe-input/style/style.min.css +1 -1
- package/lib/vxe-list/index.js +3 -10
- package/lib/vxe-list/index.min.js +1 -1
- package/lib/vxe-list/style/style.css +19 -14
- package/lib/vxe-loading/index.js +3 -10
- package/lib/vxe-loading/index.min.js +1 -1
- package/lib/vxe-loading/style/style.css +52 -48
- package/lib/vxe-loading/style/style.min.css +1 -1
- package/lib/vxe-modal/index.js +3 -10
- package/lib/vxe-modal/index.min.js +1 -1
- package/lib/vxe-modal/style/style.css +311 -247
- package/lib/vxe-modal/style/style.min.css +1 -1
- package/lib/vxe-module-edit/index.js +3 -10
- package/lib/vxe-module-edit/index.min.js +1 -1
- package/lib/vxe-module-edit/style/style.css +1 -1
- package/lib/vxe-module-export/index.js +3 -10
- package/lib/vxe-module-export/index.min.js +1 -1
- package/lib/vxe-module-export/style/style.css +136 -108
- package/lib/vxe-module-export/style/style.min.css +1 -1
- package/lib/vxe-module-filter/index.js +3 -10
- package/lib/vxe-module-filter/index.min.js +1 -1
- package/lib/vxe-module-filter/style/style.css +103 -82
- package/lib/vxe-module-filter/style/style.min.css +1 -1
- package/lib/vxe-module-keyboard/index.js +3 -10
- package/lib/vxe-module-keyboard/index.min.js +1 -1
- package/lib/vxe-module-keyboard/style/style.css +1 -1
- package/lib/vxe-module-menu/index.js +3 -10
- package/lib/vxe-module-menu/index.min.js +1 -1
- package/lib/vxe-module-menu/style/style.css +79 -59
- package/lib/vxe-module-menu/style/style.min.css +1 -1
- package/lib/vxe-module-validator/index.js +3 -10
- package/lib/vxe-module-validator/index.min.js +1 -1
- package/lib/vxe-module-validator/style/style.css +1 -1
- package/lib/vxe-optgroup/index.js +3 -10
- package/lib/vxe-optgroup/index.min.js +1 -1
- package/lib/vxe-optgroup/style/style.css +1 -1
- package/lib/vxe-option/index.js +3 -10
- package/lib/vxe-option/index.min.js +1 -1
- package/lib/vxe-option/style/style.css +1 -1
- package/lib/vxe-pager/index.js +3 -10
- package/lib/vxe-pager/index.min.js +1 -1
- package/lib/vxe-pager/style/style.css +307 -257
- package/lib/vxe-pager/style/style.min.css +1 -1
- package/lib/vxe-pulldown/index.js +3 -10
- package/lib/vxe-pulldown/index.min.js +1 -1
- package/lib/vxe-pulldown/style/style.css +42 -31
- package/lib/vxe-pulldown/style/style.min.css +1 -1
- package/lib/vxe-radio/index.js +3 -10
- package/lib/vxe-radio/index.min.js +1 -1
- package/lib/vxe-radio/style/style.css +184 -151
- package/lib/vxe-radio/style/style.min.css +1 -1
- package/lib/vxe-radio-button/index.js +3 -10
- package/lib/vxe-radio-button/index.min.js +1 -1
- package/lib/vxe-radio-button/style/style.css +1 -1
- package/lib/vxe-radio-group/index.js +3 -10
- package/lib/vxe-radio-group/index.min.js +1 -1
- package/lib/vxe-radio-group/style/style.css +1 -1
- package/lib/vxe-select/index.js +3 -10
- package/lib/vxe-select/index.min.js +1 -1
- package/lib/vxe-select/style/style.css +108 -79
- package/lib/vxe-select/style/style.min.css +1 -1
- package/lib/vxe-switch/index.js +3 -10
- package/lib/vxe-switch/index.min.js +1 -1
- package/lib/vxe-switch/style/style.css +87 -67
- package/lib/vxe-switch/style/style.min.css +1 -1
- package/lib/vxe-table/index.js +3 -10
- package/lib/vxe-table/index.min.js +1 -1
- package/lib/vxe-table/style/style.css +1025 -835
- package/lib/vxe-table/style/style.min.css +1 -1
- package/lib/vxe-textarea/index.js +3 -10
- package/lib/vxe-textarea/index.min.js +1 -1
- package/lib/vxe-textarea/style/style.css +57 -41
- package/lib/vxe-textarea/style/style.min.css +1 -1
- package/lib/vxe-toolbar/index.js +3 -10
- package/lib/vxe-toolbar/index.min.js +1 -1
- package/lib/vxe-toolbar/style/style.css +216 -174
- package/lib/vxe-toolbar/style/style.min.css +1 -1
- package/lib/vxe-tooltip/index.js +3 -10
- package/lib/vxe-tooltip/index.min.js +1 -1
- package/lib/vxe-tooltip/style/style.css +87 -63
- package/package.json +27 -33
- package/packages/export/src/hook.ts +1 -0
- package/packages/filter/src/hook.ts +1 -1
- package/packages/footer/src/footer.ts +3 -3
- package/packages/form/src/form.ts +5 -4
- package/packages/header/src/header.ts +13 -9
- package/packages/list/src/list.ts +8 -2
- package/packages/locale/lang/en-US.ts +0 -1
- package/packages/locale/lang/ja-JP.ts +0 -1
- package/packages/locale/lang/zh-CN.ts +0 -1
- package/packages/locale/lang/zh-TC.ts +0 -1
- package/packages/pulldown/src/pulldown.ts +11 -5
- package/packages/table/src/column.ts +2 -0
- package/packages/table/src/columnInfo.ts +1 -0
- package/packages/table/src/table.ts +117 -113
- package/packages/table/src/util.ts +1 -1
- package/styles/icon/iconfont.ttf +0 -0
- package/styles/icon/iconfont.woff +0 -0
- package/styles/icon/iconfont.woff2 +0 -0
- package/styles/icon.scss +78 -2
- package/styles/table.scss +1 -1
- package/styles/variable.scss +2 -2
- package/types/column.d.ts +6 -1
- package/types/list.d.ts +4 -4
- package/types/pulldown.d.ts +61 -61
- package/types/table.d.ts +11 -1
package/lib/modal/src/modal.js
CHANGED
|
@@ -4,53 +4,33 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.msgQueue = exports.default = exports.allActivedModals = void 0;
|
|
7
|
-
|
|
8
7
|
var _vue = require("vue");
|
|
9
|
-
|
|
10
8
|
var _xeUtils = _interopRequireDefault(require("xe-utils"));
|
|
11
|
-
|
|
12
9
|
var _size = require("../../hooks/size");
|
|
13
|
-
|
|
14
10
|
var _dom = require("../../tools/dom");
|
|
15
|
-
|
|
16
11
|
var _utils = require("../../tools/utils");
|
|
17
|
-
|
|
18
12
|
var _log = require("../../tools/log");
|
|
19
|
-
|
|
20
13
|
var _event = require("../../tools/event");
|
|
21
|
-
|
|
22
14
|
var _conf = _interopRequireDefault(require("../../v-x-e-table/src/conf"));
|
|
23
|
-
|
|
24
15
|
var _button = _interopRequireDefault(require("../../button/src/button"));
|
|
25
|
-
|
|
26
16
|
var _index = _interopRequireDefault(require("../../loading/index"));
|
|
27
|
-
|
|
28
17
|
var _vn = require("../../tools/vn");
|
|
29
|
-
|
|
30
18
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
31
|
-
|
|
32
19
|
var __assign = void 0 && (void 0).__assign || function () {
|
|
33
20
|
__assign = Object.assign || function (t) {
|
|
34
21
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
35
22
|
s = arguments[i];
|
|
36
|
-
|
|
37
|
-
for (var p in s) {
|
|
38
|
-
if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
39
|
-
}
|
|
23
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
40
24
|
}
|
|
41
|
-
|
|
42
25
|
return t;
|
|
43
26
|
};
|
|
44
|
-
|
|
45
27
|
return __assign.apply(this, arguments);
|
|
46
28
|
};
|
|
47
|
-
|
|
48
29
|
var allActivedModals = [];
|
|
49
30
|
exports.allActivedModals = allActivedModals;
|
|
50
31
|
var msgQueue = [];
|
|
51
32
|
exports.msgQueue = msgQueue;
|
|
52
|
-
|
|
53
|
-
var _default2 = (0, _vue.defineComponent)({
|
|
33
|
+
var _default = (0, _vue.defineComponent)({
|
|
54
34
|
name: 'VxeModal',
|
|
55
35
|
props: {
|
|
56
36
|
modelValue: Boolean,
|
|
@@ -68,7 +48,7 @@ var _default2 = (0, _vue.defineComponent)({
|
|
|
68
48
|
className: String,
|
|
69
49
|
top: {
|
|
70
50
|
type: [Number, String],
|
|
71
|
-
default: function
|
|
51
|
+
default: function () {
|
|
72
52
|
return _conf.default.modal.top;
|
|
73
53
|
}
|
|
74
54
|
},
|
|
@@ -76,7 +56,7 @@ var _default2 = (0, _vue.defineComponent)({
|
|
|
76
56
|
title: String,
|
|
77
57
|
duration: {
|
|
78
58
|
type: [Number, String],
|
|
79
|
-
default: function
|
|
59
|
+
default: function () {
|
|
80
60
|
return _conf.default.modal.duration;
|
|
81
61
|
}
|
|
82
62
|
},
|
|
@@ -84,64 +64,64 @@ var _default2 = (0, _vue.defineComponent)({
|
|
|
84
64
|
content: [Number, String],
|
|
85
65
|
cancelButtonText: {
|
|
86
66
|
type: String,
|
|
87
|
-
default: function
|
|
67
|
+
default: function () {
|
|
88
68
|
return _conf.default.modal.cancelButtonText;
|
|
89
69
|
}
|
|
90
70
|
},
|
|
91
71
|
confirmButtonText: {
|
|
92
72
|
type: String,
|
|
93
|
-
default: function
|
|
73
|
+
default: function () {
|
|
94
74
|
return _conf.default.modal.confirmButtonText;
|
|
95
75
|
}
|
|
96
76
|
},
|
|
97
77
|
lockView: {
|
|
98
78
|
type: Boolean,
|
|
99
|
-
default: function
|
|
79
|
+
default: function () {
|
|
100
80
|
return _conf.default.modal.lockView;
|
|
101
81
|
}
|
|
102
82
|
},
|
|
103
83
|
lockScroll: Boolean,
|
|
104
84
|
mask: {
|
|
105
85
|
type: Boolean,
|
|
106
|
-
default: function
|
|
86
|
+
default: function () {
|
|
107
87
|
return _conf.default.modal.mask;
|
|
108
88
|
}
|
|
109
89
|
},
|
|
110
90
|
maskClosable: {
|
|
111
91
|
type: Boolean,
|
|
112
|
-
default: function
|
|
92
|
+
default: function () {
|
|
113
93
|
return _conf.default.modal.maskClosable;
|
|
114
94
|
}
|
|
115
95
|
},
|
|
116
96
|
escClosable: {
|
|
117
97
|
type: Boolean,
|
|
118
|
-
default: function
|
|
98
|
+
default: function () {
|
|
119
99
|
return _conf.default.modal.escClosable;
|
|
120
100
|
}
|
|
121
101
|
},
|
|
122
102
|
resize: Boolean,
|
|
123
103
|
showHeader: {
|
|
124
104
|
type: Boolean,
|
|
125
|
-
default: function
|
|
105
|
+
default: function () {
|
|
126
106
|
return _conf.default.modal.showHeader;
|
|
127
107
|
}
|
|
128
108
|
},
|
|
129
109
|
showFooter: {
|
|
130
110
|
type: Boolean,
|
|
131
|
-
default: function
|
|
111
|
+
default: function () {
|
|
132
112
|
return _conf.default.modal.showFooter;
|
|
133
113
|
}
|
|
134
114
|
},
|
|
135
115
|
showZoom: Boolean,
|
|
136
116
|
showClose: {
|
|
137
117
|
type: Boolean,
|
|
138
|
-
default: function
|
|
118
|
+
default: function () {
|
|
139
119
|
return _conf.default.modal.showClose;
|
|
140
120
|
}
|
|
141
121
|
},
|
|
142
122
|
dblclickZoom: {
|
|
143
123
|
type: Boolean,
|
|
144
|
-
default: function
|
|
124
|
+
default: function () {
|
|
145
125
|
return _conf.default.modal.dblclickZoom;
|
|
146
126
|
}
|
|
147
127
|
},
|
|
@@ -149,93 +129,91 @@ var _default2 = (0, _vue.defineComponent)({
|
|
|
149
129
|
height: [Number, String],
|
|
150
130
|
minWidth: {
|
|
151
131
|
type: [Number, String],
|
|
152
|
-
default: function
|
|
132
|
+
default: function () {
|
|
153
133
|
return _conf.default.modal.minWidth;
|
|
154
134
|
}
|
|
155
135
|
},
|
|
156
136
|
minHeight: {
|
|
157
137
|
type: [Number, String],
|
|
158
|
-
default: function
|
|
138
|
+
default: function () {
|
|
159
139
|
return _conf.default.modal.minHeight;
|
|
160
140
|
}
|
|
161
141
|
},
|
|
162
142
|
zIndex: Number,
|
|
163
143
|
marginSize: {
|
|
164
144
|
type: [Number, String],
|
|
165
|
-
default: function
|
|
145
|
+
default: function () {
|
|
166
146
|
return _conf.default.modal.marginSize;
|
|
167
147
|
}
|
|
168
148
|
},
|
|
169
149
|
fullscreen: Boolean,
|
|
170
150
|
draggable: {
|
|
171
151
|
type: Boolean,
|
|
172
|
-
default: function
|
|
152
|
+
default: function () {
|
|
173
153
|
return _conf.default.modal.draggable;
|
|
174
154
|
}
|
|
175
155
|
},
|
|
176
156
|
remember: {
|
|
177
157
|
type: Boolean,
|
|
178
|
-
default: function
|
|
158
|
+
default: function () {
|
|
179
159
|
return _conf.default.modal.remember;
|
|
180
160
|
}
|
|
181
161
|
},
|
|
182
162
|
destroyOnClose: {
|
|
183
163
|
type: Boolean,
|
|
184
|
-
default: function
|
|
164
|
+
default: function () {
|
|
185
165
|
return _conf.default.modal.destroyOnClose;
|
|
186
166
|
}
|
|
187
167
|
},
|
|
188
168
|
showTitleOverflow: {
|
|
189
169
|
type: Boolean,
|
|
190
|
-
default: function
|
|
170
|
+
default: function () {
|
|
191
171
|
return _conf.default.modal.showTitleOverflow;
|
|
192
172
|
}
|
|
193
173
|
},
|
|
194
174
|
transfer: {
|
|
195
175
|
type: Boolean,
|
|
196
|
-
default: function
|
|
176
|
+
default: function () {
|
|
197
177
|
return _conf.default.modal.transfer;
|
|
198
178
|
}
|
|
199
179
|
},
|
|
200
180
|
storage: {
|
|
201
181
|
type: Boolean,
|
|
202
|
-
default: function
|
|
182
|
+
default: function () {
|
|
203
183
|
return _conf.default.modal.storage;
|
|
204
184
|
}
|
|
205
185
|
},
|
|
206
186
|
storageKey: {
|
|
207
187
|
type: String,
|
|
208
|
-
default: function
|
|
188
|
+
default: function () {
|
|
209
189
|
return _conf.default.modal.storageKey;
|
|
210
190
|
}
|
|
211
191
|
},
|
|
212
192
|
animat: {
|
|
213
193
|
type: Boolean,
|
|
214
|
-
default: function
|
|
194
|
+
default: function () {
|
|
215
195
|
return _conf.default.modal.animat;
|
|
216
196
|
}
|
|
217
197
|
},
|
|
218
198
|
size: {
|
|
219
199
|
type: String,
|
|
220
|
-
default: function
|
|
200
|
+
default: function () {
|
|
221
201
|
return _conf.default.modal.size || _conf.default.size;
|
|
222
202
|
}
|
|
223
203
|
},
|
|
224
204
|
beforeHideMethod: {
|
|
225
205
|
type: Function,
|
|
226
|
-
default: function
|
|
206
|
+
default: function () {
|
|
227
207
|
return _conf.default.modal.beforeHideMethod;
|
|
228
208
|
}
|
|
229
209
|
},
|
|
230
210
|
slots: Object
|
|
231
211
|
},
|
|
232
212
|
emits: ['update:modelValue', 'show', 'hide', 'before-hide', 'close', 'confirm', 'cancel', 'zoom'],
|
|
233
|
-
setup: function
|
|
213
|
+
setup: function (props, context) {
|
|
234
214
|
var slots = context.slots,
|
|
235
|
-
|
|
236
|
-
|
|
215
|
+
emit = context.emit;
|
|
237
216
|
var xID = _xeUtils.default.uniqueId();
|
|
238
|
-
|
|
239
217
|
var computeSize = (0, _size.useSize)(props);
|
|
240
218
|
var reactData = (0, _vue.reactive)({
|
|
241
219
|
inited: false,
|
|
@@ -258,7 +236,7 @@ var _default2 = (0, _vue.defineComponent)({
|
|
|
258
236
|
props: props,
|
|
259
237
|
context: context,
|
|
260
238
|
reactData: reactData,
|
|
261
|
-
getRefMaps: function
|
|
239
|
+
getRefMaps: function () {
|
|
262
240
|
return refMaps;
|
|
263
241
|
}
|
|
264
242
|
};
|
|
@@ -266,73 +244,60 @@ var _default2 = (0, _vue.defineComponent)({
|
|
|
266
244
|
var computeIsMsg = (0, _vue.computed)(function () {
|
|
267
245
|
return props.type === 'message';
|
|
268
246
|
});
|
|
269
|
-
|
|
270
|
-
var getBox = function getBox() {
|
|
247
|
+
var getBox = function () {
|
|
271
248
|
var boxElem = refModalBox.value;
|
|
272
249
|
return boxElem;
|
|
273
250
|
};
|
|
274
|
-
|
|
275
|
-
var recalculate = function recalculate() {
|
|
251
|
+
var recalculate = function () {
|
|
276
252
|
var width = props.width,
|
|
277
|
-
|
|
253
|
+
height = props.height;
|
|
278
254
|
var boxElem = getBox();
|
|
279
255
|
boxElem.style.width = "".concat(width ? isNaN(width) ? width : "".concat(width, "px") : '');
|
|
280
256
|
boxElem.style.height = "".concat(height ? isNaN(height) ? height : "".concat(height, "px") : '');
|
|
281
257
|
return (0, _vue.nextTick)();
|
|
282
258
|
};
|
|
283
|
-
|
|
284
|
-
var updateZindex = function updateZindex() {
|
|
259
|
+
var updateZindex = function () {
|
|
285
260
|
var zIndex = props.zIndex;
|
|
286
261
|
var modalZindex = reactData.modalZindex;
|
|
287
|
-
|
|
288
262
|
if (zIndex) {
|
|
289
263
|
reactData.modalZindex = zIndex;
|
|
290
264
|
} else if (modalZindex < (0, _utils.getLastZIndex)()) {
|
|
291
265
|
reactData.modalZindex = (0, _utils.nextZIndex)();
|
|
292
266
|
}
|
|
293
267
|
};
|
|
294
|
-
|
|
295
|
-
var updatePosition = function updatePosition() {
|
|
268
|
+
var updatePosition = function () {
|
|
296
269
|
return (0, _vue.nextTick)().then(function () {
|
|
297
270
|
var position = props.position;
|
|
298
|
-
|
|
299
271
|
var marginSize = _xeUtils.default.toNumber(props.marginSize);
|
|
300
|
-
|
|
301
272
|
var boxElem = getBox();
|
|
302
273
|
var clientVisibleWidth = document.documentElement.clientWidth || document.body.clientWidth;
|
|
303
274
|
var clientVisibleHeight = document.documentElement.clientHeight || document.body.clientHeight;
|
|
304
275
|
var isPosCenter = position === 'center';
|
|
305
|
-
|
|
306
276
|
var _a = _xeUtils.default.isString(position) ? {
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
277
|
+
top: position,
|
|
278
|
+
left: position
|
|
279
|
+
} : Object.assign({}, position),
|
|
280
|
+
top = _a.top,
|
|
281
|
+
left = _a.left;
|
|
313
282
|
var topCenter = isPosCenter || top === 'center';
|
|
314
283
|
var leftCenter = isPosCenter || left === 'center';
|
|
315
284
|
var posTop = '';
|
|
316
285
|
var posLeft = '';
|
|
317
|
-
|
|
318
286
|
if (left && !leftCenter) {
|
|
319
287
|
posLeft = isNaN(left) ? left : "".concat(left, "px");
|
|
320
288
|
} else {
|
|
321
289
|
posLeft = "".concat(Math.max(marginSize, clientVisibleWidth / 2 - boxElem.offsetWidth / 2), "px");
|
|
322
290
|
}
|
|
323
|
-
|
|
324
291
|
if (top && !topCenter) {
|
|
325
292
|
posTop = isNaN(top) ? top : "".concat(top, "px");
|
|
326
293
|
} else {
|
|
327
294
|
posTop = "".concat(Math.max(marginSize, clientVisibleHeight / 2 - boxElem.offsetHeight / 2), "px");
|
|
328
295
|
}
|
|
329
|
-
|
|
330
296
|
boxElem.style.top = posTop;
|
|
331
297
|
boxElem.style.left = posLeft;
|
|
332
298
|
});
|
|
333
299
|
};
|
|
334
|
-
|
|
335
|
-
var updateStyle = function updateStyle() {
|
|
300
|
+
var updateStyle = function () {
|
|
336
301
|
(0, _vue.nextTick)(function () {
|
|
337
302
|
var offsetTop = 0;
|
|
338
303
|
msgQueue.forEach(function (comp) {
|
|
@@ -343,43 +308,35 @@ var _default2 = (0, _vue.defineComponent)({
|
|
|
343
308
|
});
|
|
344
309
|
});
|
|
345
310
|
};
|
|
346
|
-
|
|
347
|
-
var removeMsgQueue = function removeMsgQueue() {
|
|
311
|
+
var removeMsgQueue = function () {
|
|
348
312
|
if (msgQueue.indexOf($xemodal) > -1) {
|
|
349
313
|
_xeUtils.default.remove(msgQueue, function (comp) {
|
|
350
314
|
return comp === $xemodal;
|
|
351
315
|
});
|
|
352
316
|
}
|
|
353
|
-
|
|
354
317
|
updateStyle();
|
|
355
318
|
};
|
|
356
|
-
|
|
357
|
-
var closeModal = function closeModal(type) {
|
|
319
|
+
var closeModal = function (type) {
|
|
358
320
|
var remember = props.remember,
|
|
359
|
-
|
|
321
|
+
beforeHideMethod = props.beforeHideMethod;
|
|
360
322
|
var visible = reactData.visible;
|
|
361
323
|
var isMsg = computeIsMsg.value;
|
|
362
324
|
var params = {
|
|
363
325
|
type: type
|
|
364
326
|
};
|
|
365
|
-
|
|
366
327
|
if (visible) {
|
|
367
328
|
Promise.resolve(beforeHideMethod ? beforeHideMethod(params) : null).then(function (rest) {
|
|
368
329
|
if (!_xeUtils.default.isError(rest)) {
|
|
369
330
|
if (isMsg) {
|
|
370
331
|
removeMsgQueue();
|
|
371
332
|
}
|
|
372
|
-
|
|
373
333
|
reactData.contentVisible = false;
|
|
374
|
-
|
|
375
334
|
if (!remember) {
|
|
376
335
|
reactData.zoomLocat = null;
|
|
377
336
|
}
|
|
378
|
-
|
|
379
337
|
_xeUtils.default.remove(allActivedModals, function (item) {
|
|
380
338
|
return item === $xemodal;
|
|
381
339
|
});
|
|
382
|
-
|
|
383
340
|
modalMethods.dispatchEvent('before-hide', params);
|
|
384
341
|
setTimeout(function () {
|
|
385
342
|
reactData.visible = false;
|
|
@@ -391,90 +348,73 @@ var _default2 = (0, _vue.defineComponent)({
|
|
|
391
348
|
return e;
|
|
392
349
|
});
|
|
393
350
|
}
|
|
394
|
-
|
|
395
351
|
return (0, _vue.nextTick)();
|
|
396
352
|
};
|
|
397
|
-
|
|
398
|
-
var closeEvent = function closeEvent(evnt) {
|
|
353
|
+
var closeEvent = function (evnt) {
|
|
399
354
|
var type = 'close';
|
|
400
355
|
modalMethods.dispatchEvent(type, {
|
|
401
356
|
type: type
|
|
402
357
|
}, evnt);
|
|
403
358
|
closeModal(type);
|
|
404
359
|
};
|
|
405
|
-
|
|
406
|
-
var confirmEvent = function confirmEvent(evnt) {
|
|
360
|
+
var confirmEvent = function (evnt) {
|
|
407
361
|
var type = 'confirm';
|
|
408
362
|
modalMethods.dispatchEvent(type, {
|
|
409
363
|
type: type
|
|
410
364
|
}, evnt);
|
|
411
365
|
closeModal(type);
|
|
412
366
|
};
|
|
413
|
-
|
|
414
|
-
var cancelEvent = function cancelEvent(evnt) {
|
|
367
|
+
var cancelEvent = function (evnt) {
|
|
415
368
|
var type = 'cancel';
|
|
416
369
|
modalMethods.dispatchEvent(type, {
|
|
417
370
|
type: type
|
|
418
371
|
}, evnt);
|
|
419
372
|
closeModal(type);
|
|
420
373
|
};
|
|
421
|
-
|
|
422
|
-
var getStorageMap = function getStorageMap(key) {
|
|
374
|
+
var getStorageMap = function (key) {
|
|
423
375
|
var version = _conf.default.version;
|
|
424
|
-
|
|
425
376
|
var rest = _xeUtils.default.toStringJSON(localStorage.getItem(key) || '');
|
|
426
|
-
|
|
427
377
|
return rest && rest._v === version ? rest : {
|
|
428
378
|
_v: version
|
|
429
379
|
};
|
|
430
380
|
};
|
|
431
|
-
|
|
432
|
-
var hasPosStorage = function hasPosStorage() {
|
|
381
|
+
var hasPosStorage = function () {
|
|
433
382
|
var id = props.id,
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
383
|
+
remember = props.remember,
|
|
384
|
+
storage = props.storage,
|
|
385
|
+
storageKey = props.storageKey;
|
|
437
386
|
return !!(id && remember && storage && getStorageMap(storageKey)[id]);
|
|
438
387
|
};
|
|
439
|
-
|
|
440
|
-
var restorePosStorage = function restorePosStorage() {
|
|
388
|
+
var restorePosStorage = function () {
|
|
441
389
|
var id = props.id,
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
390
|
+
remember = props.remember,
|
|
391
|
+
storage = props.storage,
|
|
392
|
+
storageKey = props.storageKey;
|
|
446
393
|
if (id && remember && storage) {
|
|
447
394
|
var posStorage = getStorageMap(storageKey)[id];
|
|
448
|
-
|
|
449
395
|
if (posStorage) {
|
|
450
396
|
var boxElem = getBox();
|
|
451
|
-
|
|
452
397
|
var _a = posStorage.split(','),
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
398
|
+
left = _a[0],
|
|
399
|
+
top_1 = _a[1],
|
|
400
|
+
width = _a[2],
|
|
401
|
+
height = _a[3],
|
|
402
|
+
zoomLeft = _a[4],
|
|
403
|
+
zoomTop = _a[5],
|
|
404
|
+
zoomWidth = _a[6],
|
|
405
|
+
zoomHeight = _a[7];
|
|
462
406
|
if (left) {
|
|
463
407
|
boxElem.style.left = "".concat(left, "px");
|
|
464
408
|
}
|
|
465
|
-
|
|
466
409
|
if (top_1) {
|
|
467
410
|
boxElem.style.top = "".concat(top_1, "px");
|
|
468
411
|
}
|
|
469
|
-
|
|
470
412
|
if (width) {
|
|
471
413
|
boxElem.style.width = "".concat(width, "px");
|
|
472
414
|
}
|
|
473
|
-
|
|
474
415
|
if (height) {
|
|
475
416
|
boxElem.style.height = "".concat(height, "px");
|
|
476
417
|
}
|
|
477
|
-
|
|
478
418
|
if (zoomLeft && zoomTop) {
|
|
479
419
|
reactData.zoomLocat = {
|
|
480
420
|
left: zoomLeft,
|
|
@@ -486,22 +426,18 @@ var _default2 = (0, _vue.defineComponent)({
|
|
|
486
426
|
}
|
|
487
427
|
}
|
|
488
428
|
};
|
|
489
|
-
|
|
490
|
-
var addMsgQueue = function addMsgQueue() {
|
|
429
|
+
var addMsgQueue = function () {
|
|
491
430
|
if (msgQueue.indexOf($xemodal) === -1) {
|
|
492
431
|
msgQueue.push($xemodal);
|
|
493
432
|
}
|
|
494
|
-
|
|
495
433
|
updateStyle();
|
|
496
434
|
};
|
|
497
|
-
|
|
498
|
-
var savePosStorage = function savePosStorage() {
|
|
435
|
+
var savePosStorage = function () {
|
|
499
436
|
var id = props.id,
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
437
|
+
remember = props.remember,
|
|
438
|
+
storage = props.storage,
|
|
439
|
+
storageKey = props.storageKey;
|
|
503
440
|
var zoomLocat = reactData.zoomLocat;
|
|
504
|
-
|
|
505
441
|
if (id && remember && storage) {
|
|
506
442
|
var boxElem = getBox();
|
|
507
443
|
var posStorageMap = getStorageMap(storageKey);
|
|
@@ -511,17 +447,14 @@ var _default2 = (0, _vue.defineComponent)({
|
|
|
511
447
|
localStorage.setItem(storageKey, _xeUtils.default.toJSONString(posStorageMap));
|
|
512
448
|
}
|
|
513
449
|
};
|
|
514
|
-
|
|
515
|
-
var maximize = function maximize() {
|
|
450
|
+
var maximize = function () {
|
|
516
451
|
return (0, _vue.nextTick)().then(function () {
|
|
517
452
|
if (!reactData.zoomLocat) {
|
|
518
453
|
var marginSize = Math.max(0, _xeUtils.default.toNumber(props.marginSize));
|
|
519
454
|
var boxElem = getBox();
|
|
520
|
-
|
|
521
455
|
var _a = (0, _dom.getDomNode)(),
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
456
|
+
visibleHeight = _a.visibleHeight,
|
|
457
|
+
visibleWidth = _a.visibleWidth;
|
|
525
458
|
reactData.zoomLocat = {
|
|
526
459
|
top: boxElem.offsetTop,
|
|
527
460
|
left: boxElem.offsetLeft,
|
|
@@ -538,24 +471,20 @@ var _default2 = (0, _vue.defineComponent)({
|
|
|
538
471
|
}
|
|
539
472
|
});
|
|
540
473
|
};
|
|
541
|
-
|
|
542
|
-
var openModal = function openModal() {
|
|
474
|
+
var openModal = function () {
|
|
543
475
|
var duration = props.duration,
|
|
544
|
-
|
|
545
|
-
|
|
476
|
+
remember = props.remember,
|
|
477
|
+
showFooter = props.showFooter;
|
|
546
478
|
var inited = reactData.inited,
|
|
547
|
-
|
|
479
|
+
visible = reactData.visible;
|
|
548
480
|
var isMsg = computeIsMsg.value;
|
|
549
|
-
|
|
550
481
|
if (!inited) {
|
|
551
482
|
reactData.inited = true;
|
|
552
483
|
}
|
|
553
|
-
|
|
554
484
|
if (!visible) {
|
|
555
485
|
if (!remember) {
|
|
556
486
|
recalculate();
|
|
557
487
|
}
|
|
558
|
-
|
|
559
488
|
reactData.visible = true;
|
|
560
489
|
reactData.contentVisible = false;
|
|
561
490
|
updateZindex();
|
|
@@ -567,12 +496,10 @@ var _default2 = (0, _vue.defineComponent)({
|
|
|
567
496
|
var confirmBtn = refConfirmBtn.value;
|
|
568
497
|
var cancelBtn = refCancelBtn.value;
|
|
569
498
|
var operBtn = confirmBtn || cancelBtn;
|
|
570
|
-
|
|
571
499
|
if (operBtn) {
|
|
572
500
|
operBtn.focus();
|
|
573
501
|
}
|
|
574
502
|
}
|
|
575
|
-
|
|
576
503
|
var type = '';
|
|
577
504
|
var params = {
|
|
578
505
|
type: type
|
|
@@ -581,10 +508,8 @@ var _default2 = (0, _vue.defineComponent)({
|
|
|
581
508
|
modalMethods.dispatchEvent('show', params);
|
|
582
509
|
});
|
|
583
510
|
}, 10);
|
|
584
|
-
|
|
585
511
|
if (isMsg) {
|
|
586
512
|
addMsgQueue();
|
|
587
|
-
|
|
588
513
|
if (duration !== -1) {
|
|
589
514
|
setTimeout(function () {
|
|
590
515
|
return closeModal('close');
|
|
@@ -594,7 +519,6 @@ var _default2 = (0, _vue.defineComponent)({
|
|
|
594
519
|
(0, _vue.nextTick)(function () {
|
|
595
520
|
var fullscreen = props.fullscreen;
|
|
596
521
|
var firstOpen = reactData.firstOpen;
|
|
597
|
-
|
|
598
522
|
if (!remember || firstOpen) {
|
|
599
523
|
updatePosition().then(function () {
|
|
600
524
|
setTimeout(function () {
|
|
@@ -602,10 +526,8 @@ var _default2 = (0, _vue.defineComponent)({
|
|
|
602
526
|
}, 20);
|
|
603
527
|
});
|
|
604
528
|
}
|
|
605
|
-
|
|
606
529
|
if (firstOpen) {
|
|
607
530
|
reactData.firstOpen = false;
|
|
608
|
-
|
|
609
531
|
if (hasPosStorage()) {
|
|
610
532
|
restorePosStorage();
|
|
611
533
|
} else if (fullscreen) {
|
|
@@ -623,28 +545,22 @@ var _default2 = (0, _vue.defineComponent)({
|
|
|
623
545
|
});
|
|
624
546
|
}
|
|
625
547
|
}
|
|
626
|
-
|
|
627
548
|
return (0, _vue.nextTick)();
|
|
628
549
|
};
|
|
629
|
-
|
|
630
|
-
var selfClickEvent = function selfClickEvent(evnt) {
|
|
550
|
+
var selfClickEvent = function (evnt) {
|
|
631
551
|
var el = refElem.value;
|
|
632
|
-
|
|
633
552
|
if (props.maskClosable && evnt.target === el) {
|
|
634
553
|
var type = 'mask';
|
|
635
554
|
closeModal(type);
|
|
636
555
|
}
|
|
637
556
|
};
|
|
638
|
-
|
|
639
|
-
var handleGlobalKeydownEvent = function handleGlobalKeydownEvent(evnt) {
|
|
557
|
+
var handleGlobalKeydownEvent = function (evnt) {
|
|
640
558
|
var isEsc = (0, _event.hasEventKey)(evnt, _event.EVENT_KEYS.ESCAPE);
|
|
641
|
-
|
|
642
559
|
if (isEsc) {
|
|
643
560
|
var lastModal_1 = _xeUtils.default.max(allActivedModals, function (item) {
|
|
644
561
|
return item.reactData.modalZindex;
|
|
645
|
-
});
|
|
646
|
-
|
|
647
|
-
|
|
562
|
+
});
|
|
563
|
+
// 多个时,只关掉最上层的窗口
|
|
648
564
|
if (lastModal_1) {
|
|
649
565
|
setTimeout(function () {
|
|
650
566
|
if (lastModal_1 === $xemodal && lastModal_1.props.escClosable) {
|
|
@@ -654,15 +570,12 @@ var _default2 = (0, _vue.defineComponent)({
|
|
|
654
570
|
}
|
|
655
571
|
}
|
|
656
572
|
};
|
|
657
|
-
|
|
658
|
-
var isMaximized = function isMaximized() {
|
|
573
|
+
var isMaximized = function () {
|
|
659
574
|
return !!reactData.zoomLocat;
|
|
660
575
|
};
|
|
661
|
-
|
|
662
|
-
var revert = function revert() {
|
|
576
|
+
var revert = function () {
|
|
663
577
|
return (0, _vue.nextTick)().then(function () {
|
|
664
578
|
var zoomLocat = reactData.zoomLocat;
|
|
665
|
-
|
|
666
579
|
if (zoomLocat) {
|
|
667
580
|
var boxElem = getBox();
|
|
668
581
|
reactData.zoomLocat = null;
|
|
@@ -676,20 +589,17 @@ var _default2 = (0, _vue.defineComponent)({
|
|
|
676
589
|
}
|
|
677
590
|
});
|
|
678
591
|
};
|
|
679
|
-
|
|
680
|
-
var zoom = function zoom() {
|
|
592
|
+
var zoom = function () {
|
|
681
593
|
if (reactData.zoomLocat) {
|
|
682
594
|
return revert().then(function () {
|
|
683
595
|
return isMaximized();
|
|
684
596
|
});
|
|
685
597
|
}
|
|
686
|
-
|
|
687
598
|
return maximize().then(function () {
|
|
688
599
|
return isMaximized();
|
|
689
600
|
});
|
|
690
601
|
};
|
|
691
|
-
|
|
692
|
-
var toggleZoomEvent = function toggleZoomEvent(evnt) {
|
|
602
|
+
var toggleZoomEvent = function (evnt) {
|
|
693
603
|
var zoomLocat = reactData.zoomLocat;
|
|
694
604
|
var params = {
|
|
695
605
|
type: zoomLocat ? 'revert' : 'max'
|
|
@@ -698,13 +608,10 @@ var _default2 = (0, _vue.defineComponent)({
|
|
|
698
608
|
modalMethods.dispatchEvent('zoom', params, evnt);
|
|
699
609
|
});
|
|
700
610
|
};
|
|
701
|
-
|
|
702
|
-
var getPosition = function getPosition() {
|
|
611
|
+
var getPosition = function () {
|
|
703
612
|
var isMsg = computeIsMsg.value;
|
|
704
|
-
|
|
705
613
|
if (!isMsg) {
|
|
706
614
|
var boxElem = getBox();
|
|
707
|
-
|
|
708
615
|
if (boxElem) {
|
|
709
616
|
return {
|
|
710
617
|
top: boxElem.offsetTop,
|
|
@@ -712,58 +619,44 @@ var _default2 = (0, _vue.defineComponent)({
|
|
|
712
619
|
};
|
|
713
620
|
}
|
|
714
621
|
}
|
|
715
|
-
|
|
716
622
|
return null;
|
|
717
623
|
};
|
|
718
|
-
|
|
719
|
-
var setPosition = function setPosition(top, left) {
|
|
624
|
+
var setPosition = function (top, left) {
|
|
720
625
|
var isMsg = computeIsMsg.value;
|
|
721
|
-
|
|
722
626
|
if (!isMsg) {
|
|
723
627
|
var boxElem = getBox();
|
|
724
|
-
|
|
725
628
|
if (_xeUtils.default.isNumber(top)) {
|
|
726
629
|
boxElem.style.top = "".concat(top, "px");
|
|
727
630
|
}
|
|
728
|
-
|
|
729
631
|
if (_xeUtils.default.isNumber(left)) {
|
|
730
632
|
boxElem.style.left = "".concat(left, "px");
|
|
731
633
|
}
|
|
732
634
|
}
|
|
733
|
-
|
|
734
635
|
return (0, _vue.nextTick)();
|
|
735
636
|
};
|
|
736
|
-
|
|
737
|
-
var boxMousedownEvent = function boxMousedownEvent() {
|
|
637
|
+
var boxMousedownEvent = function () {
|
|
738
638
|
var modalZindex = reactData.modalZindex;
|
|
739
|
-
|
|
740
639
|
if (allActivedModals.some(function (comp) {
|
|
741
640
|
return comp.reactData.visible && comp.reactData.modalZindex > modalZindex;
|
|
742
641
|
})) {
|
|
743
642
|
updateZindex();
|
|
744
643
|
}
|
|
745
644
|
};
|
|
746
|
-
|
|
747
|
-
var mousedownEvent = function mousedownEvent(evnt) {
|
|
645
|
+
var mousedownEvent = function (evnt) {
|
|
748
646
|
var remember = props.remember,
|
|
749
|
-
|
|
647
|
+
storage = props.storage;
|
|
750
648
|
var zoomLocat = reactData.zoomLocat;
|
|
751
|
-
|
|
752
649
|
var marginSize = _xeUtils.default.toNumber(props.marginSize);
|
|
753
|
-
|
|
754
650
|
var boxElem = getBox();
|
|
755
|
-
|
|
756
651
|
if (!zoomLocat && evnt.button === 0 && !(0, _dom.getEventTargetNode)(evnt, boxElem, 'trigger--btn').flag) {
|
|
757
652
|
evnt.preventDefault();
|
|
758
653
|
var domMousemove_1 = document.onmousemove;
|
|
759
654
|
var domMouseup_1 = document.onmouseup;
|
|
760
655
|
var disX_1 = evnt.clientX - boxElem.offsetLeft;
|
|
761
656
|
var disY_1 = evnt.clientY - boxElem.offsetTop;
|
|
762
|
-
|
|
763
657
|
var _a = (0, _dom.getDomNode)(),
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
658
|
+
visibleHeight_1 = _a.visibleHeight,
|
|
659
|
+
visibleWidth_1 = _a.visibleWidth;
|
|
767
660
|
document.onmousemove = function (evnt) {
|
|
768
661
|
evnt.preventDefault();
|
|
769
662
|
var offsetWidth = boxElem.offsetWidth;
|
|
@@ -774,63 +667,48 @@ var _default2 = (0, _vue.defineComponent)({
|
|
|
774
667
|
var maxY = visibleHeight_1 - offsetHeight - marginSize - 1;
|
|
775
668
|
var left = evnt.clientX - disX_1;
|
|
776
669
|
var top = evnt.clientY - disY_1;
|
|
777
|
-
|
|
778
670
|
if (left > maxX) {
|
|
779
671
|
left = maxX;
|
|
780
672
|
}
|
|
781
|
-
|
|
782
673
|
if (left < minX) {
|
|
783
674
|
left = minX;
|
|
784
675
|
}
|
|
785
|
-
|
|
786
676
|
if (top > maxY) {
|
|
787
677
|
top = maxY;
|
|
788
678
|
}
|
|
789
|
-
|
|
790
679
|
if (top < minY) {
|
|
791
680
|
top = minY;
|
|
792
681
|
}
|
|
793
|
-
|
|
794
682
|
boxElem.style.left = "".concat(left, "px");
|
|
795
683
|
boxElem.style.top = "".concat(top, "px");
|
|
796
684
|
boxElem.className = boxElem.className.replace(/\s?is--drag/, '') + ' is--drag';
|
|
797
685
|
};
|
|
798
|
-
|
|
799
686
|
document.onmouseup = function () {
|
|
800
687
|
document.onmousemove = domMousemove_1;
|
|
801
688
|
document.onmouseup = domMouseup_1;
|
|
802
|
-
|
|
803
689
|
if (remember && storage) {
|
|
804
690
|
(0, _vue.nextTick)(function () {
|
|
805
691
|
savePosStorage();
|
|
806
692
|
});
|
|
807
693
|
}
|
|
808
|
-
|
|
809
694
|
setTimeout(function () {
|
|
810
695
|
boxElem.className = boxElem.className.replace(/\s?is--drag/, '');
|
|
811
696
|
}, 50);
|
|
812
697
|
};
|
|
813
698
|
}
|
|
814
699
|
};
|
|
815
|
-
|
|
816
|
-
var dragEvent = function dragEvent(evnt) {
|
|
700
|
+
var dragEvent = function (evnt) {
|
|
817
701
|
evnt.preventDefault();
|
|
818
702
|
var remember = props.remember,
|
|
819
|
-
|
|
820
|
-
|
|
703
|
+
storage = props.storage;
|
|
821
704
|
var _a = (0, _dom.getDomNode)(),
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
705
|
+
visibleHeight = _a.visibleHeight,
|
|
706
|
+
visibleWidth = _a.visibleWidth;
|
|
825
707
|
var marginSize = _xeUtils.default.toNumber(props.marginSize);
|
|
826
|
-
|
|
827
708
|
var targetElem = evnt.target;
|
|
828
709
|
var type = targetElem.getAttribute('type');
|
|
829
|
-
|
|
830
710
|
var minWidth = _xeUtils.default.toNumber(props.minWidth);
|
|
831
|
-
|
|
832
711
|
var minHeight = _xeUtils.default.toNumber(props.minHeight);
|
|
833
|
-
|
|
834
712
|
var maxWidth = visibleWidth;
|
|
835
713
|
var maxHeight = visibleHeight;
|
|
836
714
|
var boxElem = getBox();
|
|
@@ -845,159 +723,126 @@ var _default2 = (0, _vue.defineComponent)({
|
|
|
845
723
|
var params = {
|
|
846
724
|
type: 'resize'
|
|
847
725
|
};
|
|
848
|
-
|
|
849
726
|
document.onmousemove = function (evnt) {
|
|
850
727
|
evnt.preventDefault();
|
|
851
728
|
var dragLeft;
|
|
852
729
|
var dragTop;
|
|
853
730
|
var width;
|
|
854
731
|
var height;
|
|
855
|
-
|
|
856
732
|
switch (type) {
|
|
857
733
|
case 'wl':
|
|
858
734
|
dragLeft = disX - evnt.clientX;
|
|
859
735
|
width = dragLeft + clientWidth;
|
|
860
|
-
|
|
861
736
|
if (offsetLeft - dragLeft > marginSize) {
|
|
862
737
|
if (width > minWidth) {
|
|
863
738
|
boxElem.style.width = "".concat(width < maxWidth ? width : maxWidth, "px");
|
|
864
739
|
boxElem.style.left = "".concat(offsetLeft - dragLeft, "px");
|
|
865
740
|
}
|
|
866
741
|
}
|
|
867
|
-
|
|
868
742
|
break;
|
|
869
|
-
|
|
870
743
|
case 'swst':
|
|
871
744
|
dragLeft = disX - evnt.clientX;
|
|
872
745
|
dragTop = disY - evnt.clientY;
|
|
873
746
|
width = dragLeft + clientWidth;
|
|
874
747
|
height = dragTop + clientHeight;
|
|
875
|
-
|
|
876
748
|
if (offsetLeft - dragLeft > marginSize) {
|
|
877
749
|
if (width > minWidth) {
|
|
878
750
|
boxElem.style.width = "".concat(width < maxWidth ? width : maxWidth, "px");
|
|
879
751
|
boxElem.style.left = "".concat(offsetLeft - dragLeft, "px");
|
|
880
752
|
}
|
|
881
753
|
}
|
|
882
|
-
|
|
883
754
|
if (offsetTop - dragTop > marginSize) {
|
|
884
755
|
if (height > minHeight) {
|
|
885
756
|
boxElem.style.height = "".concat(height < maxHeight ? height : maxHeight, "px");
|
|
886
757
|
boxElem.style.top = "".concat(offsetTop - dragTop, "px");
|
|
887
758
|
}
|
|
888
759
|
}
|
|
889
|
-
|
|
890
760
|
break;
|
|
891
|
-
|
|
892
761
|
case 'swlb':
|
|
893
762
|
dragLeft = disX - evnt.clientX;
|
|
894
763
|
dragTop = evnt.clientY - disY;
|
|
895
764
|
width = dragLeft + clientWidth;
|
|
896
765
|
height = dragTop + clientHeight;
|
|
897
|
-
|
|
898
766
|
if (offsetLeft - dragLeft > marginSize) {
|
|
899
767
|
if (width > minWidth) {
|
|
900
768
|
boxElem.style.width = "".concat(width < maxWidth ? width : maxWidth, "px");
|
|
901
769
|
boxElem.style.left = "".concat(offsetLeft - dragLeft, "px");
|
|
902
770
|
}
|
|
903
771
|
}
|
|
904
|
-
|
|
905
772
|
if (offsetTop + height + marginSize < visibleHeight) {
|
|
906
773
|
if (height > minHeight) {
|
|
907
774
|
boxElem.style.height = "".concat(height < maxHeight ? height : maxHeight, "px");
|
|
908
775
|
}
|
|
909
776
|
}
|
|
910
|
-
|
|
911
777
|
break;
|
|
912
|
-
|
|
913
778
|
case 'st':
|
|
914
779
|
dragTop = disY - evnt.clientY;
|
|
915
780
|
height = clientHeight + dragTop;
|
|
916
|
-
|
|
917
781
|
if (offsetTop - dragTop > marginSize) {
|
|
918
782
|
if (height > minHeight) {
|
|
919
783
|
boxElem.style.height = "".concat(height < maxHeight ? height : maxHeight, "px");
|
|
920
784
|
boxElem.style.top = "".concat(offsetTop - dragTop, "px");
|
|
921
785
|
}
|
|
922
786
|
}
|
|
923
|
-
|
|
924
787
|
break;
|
|
925
|
-
|
|
926
788
|
case 'wr':
|
|
927
789
|
dragLeft = evnt.clientX - disX;
|
|
928
790
|
width = dragLeft + clientWidth;
|
|
929
|
-
|
|
930
791
|
if (offsetLeft + width + marginSize < visibleWidth) {
|
|
931
792
|
if (width > minWidth) {
|
|
932
793
|
boxElem.style.width = "".concat(width < maxWidth ? width : maxWidth, "px");
|
|
933
794
|
}
|
|
934
795
|
}
|
|
935
|
-
|
|
936
796
|
break;
|
|
937
|
-
|
|
938
797
|
case 'sest':
|
|
939
798
|
dragLeft = evnt.clientX - disX;
|
|
940
799
|
dragTop = disY - evnt.clientY;
|
|
941
800
|
width = dragLeft + clientWidth;
|
|
942
801
|
height = dragTop + clientHeight;
|
|
943
|
-
|
|
944
802
|
if (offsetLeft + width + marginSize < visibleWidth) {
|
|
945
803
|
if (width > minWidth) {
|
|
946
804
|
boxElem.style.width = "".concat(width < maxWidth ? width : maxWidth, "px");
|
|
947
805
|
}
|
|
948
806
|
}
|
|
949
|
-
|
|
950
807
|
if (offsetTop - dragTop > marginSize) {
|
|
951
808
|
if (height > minHeight) {
|
|
952
809
|
boxElem.style.height = "".concat(height < maxHeight ? height : maxHeight, "px");
|
|
953
810
|
boxElem.style.top = "".concat(offsetTop - dragTop, "px");
|
|
954
811
|
}
|
|
955
812
|
}
|
|
956
|
-
|
|
957
813
|
break;
|
|
958
|
-
|
|
959
814
|
case 'selb':
|
|
960
815
|
dragLeft = evnt.clientX - disX;
|
|
961
816
|
dragTop = evnt.clientY - disY;
|
|
962
817
|
width = dragLeft + clientWidth;
|
|
963
818
|
height = dragTop + clientHeight;
|
|
964
|
-
|
|
965
819
|
if (offsetLeft + width + marginSize < visibleWidth) {
|
|
966
820
|
if (width > minWidth) {
|
|
967
821
|
boxElem.style.width = "".concat(width < maxWidth ? width : maxWidth, "px");
|
|
968
822
|
}
|
|
969
823
|
}
|
|
970
|
-
|
|
971
824
|
if (offsetTop + height + marginSize < visibleHeight) {
|
|
972
825
|
if (height > minHeight) {
|
|
973
826
|
boxElem.style.height = "".concat(height < maxHeight ? height : maxHeight, "px");
|
|
974
827
|
}
|
|
975
828
|
}
|
|
976
|
-
|
|
977
829
|
break;
|
|
978
|
-
|
|
979
830
|
case 'sb':
|
|
980
831
|
dragTop = evnt.clientY - disY;
|
|
981
832
|
height = dragTop + clientHeight;
|
|
982
|
-
|
|
983
833
|
if (offsetTop + height + marginSize < visibleHeight) {
|
|
984
834
|
if (height > minHeight) {
|
|
985
835
|
boxElem.style.height = "".concat(height < maxHeight ? height : maxHeight, "px");
|
|
986
836
|
}
|
|
987
837
|
}
|
|
988
|
-
|
|
989
838
|
break;
|
|
990
839
|
}
|
|
991
|
-
|
|
992
840
|
boxElem.className = boxElem.className.replace(/\s?is--drag/, '') + ' is--drag';
|
|
993
|
-
|
|
994
841
|
if (remember && storage) {
|
|
995
842
|
savePosStorage();
|
|
996
843
|
}
|
|
997
|
-
|
|
998
844
|
modalMethods.dispatchEvent('zoom', params, evnt);
|
|
999
845
|
};
|
|
1000
|
-
|
|
1001
846
|
document.onmouseup = function () {
|
|
1002
847
|
reactData.zoomLocat = null;
|
|
1003
848
|
document.onmousemove = domMousemove;
|
|
@@ -1007,13 +852,12 @@ var _default2 = (0, _vue.defineComponent)({
|
|
|
1007
852
|
}, 50);
|
|
1008
853
|
};
|
|
1009
854
|
};
|
|
1010
|
-
|
|
1011
|
-
var renderTitles = function renderTitles() {
|
|
855
|
+
var renderTitles = function () {
|
|
1012
856
|
var _a = props.slots,
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
857
|
+
propSlots = _a === void 0 ? {} : _a,
|
|
858
|
+
showClose = props.showClose,
|
|
859
|
+
showZoom = props.showZoom,
|
|
860
|
+
title = props.title;
|
|
1017
861
|
var zoomLocat = reactData.zoomLocat;
|
|
1018
862
|
var titleSlot = slots.title || propSlots.title;
|
|
1019
863
|
var cornerSlot = slots.corner || propSlots.corner;
|
|
@@ -1023,7 +867,6 @@ var _default2 = (0, _vue.defineComponent)({
|
|
|
1023
867
|
$modal: $xemodal
|
|
1024
868
|
})) : title ? (0, _utils.getFuncText)(title) : _conf.default.i18n('vxe.alert.title'))];
|
|
1025
869
|
var rightVNs = [];
|
|
1026
|
-
|
|
1027
870
|
if (cornerSlot) {
|
|
1028
871
|
rightVNs.push((0, _vue.h)('span', {
|
|
1029
872
|
class: 'vxe-modal--corner-warpper'
|
|
@@ -1031,7 +874,6 @@ var _default2 = (0, _vue.defineComponent)({
|
|
|
1031
874
|
$modal: $xemodal
|
|
1032
875
|
}))));
|
|
1033
876
|
}
|
|
1034
|
-
|
|
1035
877
|
if (showZoom) {
|
|
1036
878
|
rightVNs.push((0, _vue.h)('i', {
|
|
1037
879
|
class: ['vxe-modal--zoom-btn', 'trigger--btn', zoomLocat ? _conf.default.icon.MODAL_ZOOM_OUT : _conf.default.icon.MODAL_ZOOM_IN],
|
|
@@ -1039,7 +881,6 @@ var _default2 = (0, _vue.defineComponent)({
|
|
|
1039
881
|
onClick: toggleZoomEvent
|
|
1040
882
|
}));
|
|
1041
883
|
}
|
|
1042
|
-
|
|
1043
884
|
if (showClose) {
|
|
1044
885
|
rightVNs.push((0, _vue.h)('i', {
|
|
1045
886
|
class: ['vxe-modal--close-btn', 'trigger--btn', _conf.default.icon.MODAL_CLOSE],
|
|
@@ -1047,33 +888,27 @@ var _default2 = (0, _vue.defineComponent)({
|
|
|
1047
888
|
onClick: closeEvent
|
|
1048
889
|
}));
|
|
1049
890
|
}
|
|
1050
|
-
|
|
1051
891
|
titVNs.push((0, _vue.h)('div', {
|
|
1052
892
|
class: 'vxe-modal--header-right'
|
|
1053
893
|
}, rightVNs));
|
|
1054
894
|
return titVNs;
|
|
1055
895
|
};
|
|
1056
|
-
|
|
1057
|
-
var renderHeaders = function renderHeaders() {
|
|
896
|
+
var renderHeaders = function () {
|
|
1058
897
|
var _a = props.slots,
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
898
|
+
propSlots = _a === void 0 ? {} : _a,
|
|
899
|
+
showZoom = props.showZoom,
|
|
900
|
+
draggable = props.draggable;
|
|
1062
901
|
var isMsg = computeIsMsg.value;
|
|
1063
902
|
var headerSlot = slots.header || propSlots.header;
|
|
1064
903
|
var headVNs = [];
|
|
1065
|
-
|
|
1066
904
|
if (props.showHeader) {
|
|
1067
905
|
var headerOns = {};
|
|
1068
|
-
|
|
1069
906
|
if (draggable) {
|
|
1070
907
|
headerOns.onMousedown = mousedownEvent;
|
|
1071
908
|
}
|
|
1072
|
-
|
|
1073
909
|
if (showZoom && props.dblclickZoom && props.type === 'modal') {
|
|
1074
910
|
headerOns.onDblclick = toggleZoomEvent;
|
|
1075
911
|
}
|
|
1076
|
-
|
|
1077
912
|
headVNs.push((0, _vue.h)('div', __assign({
|
|
1078
913
|
class: ['vxe-modal--header', {
|
|
1079
914
|
'is--draggable': draggable,
|
|
@@ -1083,20 +918,17 @@ var _default2 = (0, _vue.defineComponent)({
|
|
|
1083
918
|
$modal: $xemodal
|
|
1084
919
|
})) : renderTitles()));
|
|
1085
920
|
}
|
|
1086
|
-
|
|
1087
921
|
return headVNs;
|
|
1088
922
|
};
|
|
1089
|
-
|
|
1090
|
-
var renderBodys = function renderBodys() {
|
|
923
|
+
var renderBodys = function () {
|
|
1091
924
|
var _a = props.slots,
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
925
|
+
propSlots = _a === void 0 ? {} : _a,
|
|
926
|
+
status = props.status,
|
|
927
|
+
message = props.message;
|
|
1095
928
|
var content = props.content || message;
|
|
1096
929
|
var isMsg = computeIsMsg.value;
|
|
1097
930
|
var defaultSlot = slots.default || propSlots.default;
|
|
1098
931
|
var contVNs = [];
|
|
1099
|
-
|
|
1100
932
|
if (status) {
|
|
1101
933
|
contVNs.push((0, _vue.h)('div', {
|
|
1102
934
|
class: 'vxe-modal--status-wrapper'
|
|
@@ -1104,13 +936,11 @@ var _default2 = (0, _vue.defineComponent)({
|
|
|
1104
936
|
class: ['vxe-modal--status-icon', props.iconStatus || _conf.default.icon["MODAL_".concat(status).toLocaleUpperCase()]]
|
|
1105
937
|
})]));
|
|
1106
938
|
}
|
|
1107
|
-
|
|
1108
939
|
contVNs.push((0, _vue.h)('div', {
|
|
1109
940
|
class: 'vxe-modal--content'
|
|
1110
941
|
}, defaultSlot ? !reactData.inited || props.destroyOnClose && !reactData.visible ? [] : (0, _vn.getSlotVNs)(defaultSlot({
|
|
1111
942
|
$modal: $xemodal
|
|
1112
943
|
})) : (0, _utils.getFuncText)(content)));
|
|
1113
|
-
|
|
1114
944
|
if (!isMsg) {
|
|
1115
945
|
/**
|
|
1116
946
|
* 加载中
|
|
@@ -1120,16 +950,13 @@ var _default2 = (0, _vue.defineComponent)({
|
|
|
1120
950
|
modelValue: props.loading
|
|
1121
951
|
}));
|
|
1122
952
|
}
|
|
1123
|
-
|
|
1124
953
|
return [(0, _vue.h)('div', {
|
|
1125
954
|
class: 'vxe-modal--body'
|
|
1126
955
|
}, contVNs)];
|
|
1127
956
|
};
|
|
1128
|
-
|
|
1129
|
-
var renderBtns = function renderBtns() {
|
|
957
|
+
var renderBtns = function () {
|
|
1130
958
|
var type = props.type;
|
|
1131
959
|
var btnVNs = [];
|
|
1132
|
-
|
|
1133
960
|
if (type === 'confirm') {
|
|
1134
961
|
btnVNs.push((0, _vue.h)(_button.default, {
|
|
1135
962
|
ref: refCancelBtn,
|
|
@@ -1137,7 +964,6 @@ var _default2 = (0, _vue.defineComponent)({
|
|
|
1137
964
|
onClick: cancelEvent
|
|
1138
965
|
}));
|
|
1139
966
|
}
|
|
1140
|
-
|
|
1141
967
|
btnVNs.push((0, _vue.h)(_button.default, {
|
|
1142
968
|
ref: refConfirmBtn,
|
|
1143
969
|
status: 'primary',
|
|
@@ -1146,14 +972,12 @@ var _default2 = (0, _vue.defineComponent)({
|
|
|
1146
972
|
}));
|
|
1147
973
|
return btnVNs;
|
|
1148
974
|
};
|
|
1149
|
-
|
|
1150
|
-
var renderFooters = function renderFooters() {
|
|
975
|
+
var renderFooters = function () {
|
|
1151
976
|
var _a = props.slots,
|
|
1152
|
-
|
|
977
|
+
propSlots = _a === void 0 ? {} : _a;
|
|
1153
978
|
var isMsg = computeIsMsg.value;
|
|
1154
979
|
var footerSlot = slots.footer || propSlots.footer;
|
|
1155
980
|
var footVNs = [];
|
|
1156
|
-
|
|
1157
981
|
if (props.showFooter) {
|
|
1158
982
|
footVNs.push((0, _vue.h)('div', {
|
|
1159
983
|
class: 'vxe-modal--footer'
|
|
@@ -1161,7 +985,6 @@ var _default2 = (0, _vue.defineComponent)({
|
|
|
1161
985
|
$modal: $xemodal
|
|
1162
986
|
})) : renderBtns()));
|
|
1163
987
|
}
|
|
1164
|
-
|
|
1165
988
|
if (!isMsg && props.resize) {
|
|
1166
989
|
footVNs.push((0, _vue.h)('span', {
|
|
1167
990
|
class: 'vxe-modal--resize'
|
|
@@ -1173,19 +996,17 @@ var _default2 = (0, _vue.defineComponent)({
|
|
|
1173
996
|
});
|
|
1174
997
|
})));
|
|
1175
998
|
}
|
|
1176
|
-
|
|
1177
999
|
return footVNs;
|
|
1178
1000
|
};
|
|
1179
|
-
|
|
1180
1001
|
modalMethods = {
|
|
1181
|
-
dispatchEvent: function
|
|
1002
|
+
dispatchEvent: function (type, params, evnt) {
|
|
1182
1003
|
emit(type, Object.assign({
|
|
1183
1004
|
$modal: $xemodal,
|
|
1184
1005
|
$event: evnt
|
|
1185
1006
|
}, params));
|
|
1186
1007
|
},
|
|
1187
1008
|
open: openModal,
|
|
1188
|
-
close: function
|
|
1009
|
+
close: function () {
|
|
1189
1010
|
return closeModal('close');
|
|
1190
1011
|
},
|
|
1191
1012
|
getBox: getBox,
|
|
@@ -1217,41 +1038,35 @@ var _default2 = (0, _vue.defineComponent)({
|
|
|
1217
1038
|
if (props.storage && !props.id) {
|
|
1218
1039
|
(0, _log.errLog)('vxe.error.reqProp', ['modal.id']);
|
|
1219
1040
|
}
|
|
1220
|
-
|
|
1221
1041
|
if (props.modelValue) {
|
|
1222
1042
|
openModal();
|
|
1223
1043
|
}
|
|
1224
|
-
|
|
1225
1044
|
recalculate();
|
|
1226
1045
|
});
|
|
1227
|
-
|
|
1228
1046
|
if (props.escClosable) {
|
|
1229
1047
|
_event.GlobalEvent.on($xemodal, 'keydown', handleGlobalKeydownEvent);
|
|
1230
1048
|
}
|
|
1231
1049
|
});
|
|
1232
1050
|
(0, _vue.onUnmounted)(function () {
|
|
1233
1051
|
_event.GlobalEvent.off($xemodal, 'keydown');
|
|
1234
|
-
|
|
1235
1052
|
removeMsgQueue();
|
|
1236
1053
|
});
|
|
1237
|
-
|
|
1238
|
-
var renderVN = function renderVN() {
|
|
1054
|
+
var renderVN = function () {
|
|
1239
1055
|
var _a;
|
|
1240
|
-
|
|
1241
1056
|
var className = props.className,
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1057
|
+
type = props.type,
|
|
1058
|
+
animat = props.animat,
|
|
1059
|
+
loading = props.loading,
|
|
1060
|
+
status = props.status,
|
|
1061
|
+
lockScroll = props.lockScroll,
|
|
1062
|
+
lockView = props.lockView,
|
|
1063
|
+
mask = props.mask,
|
|
1064
|
+
resize = props.resize;
|
|
1250
1065
|
var inited = reactData.inited,
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1066
|
+
zoomLocat = reactData.zoomLocat,
|
|
1067
|
+
modalTop = reactData.modalTop,
|
|
1068
|
+
contentVisible = reactData.contentVisible,
|
|
1069
|
+
visible = reactData.visible;
|
|
1255
1070
|
var vSize = computeSize.value;
|
|
1256
1071
|
return (0, _vue.h)(_vue.Teleport, {
|
|
1257
1072
|
to: 'body',
|
|
@@ -1270,13 +1085,11 @@ var _default2 = (0, _vue.defineComponent)({
|
|
|
1270
1085
|
onMousedown: boxMousedownEvent
|
|
1271
1086
|
}, renderHeaders().concat(renderBodys(), renderFooters()))])]);
|
|
1272
1087
|
};
|
|
1273
|
-
|
|
1274
1088
|
$xemodal.renderVN = renderVN;
|
|
1275
1089
|
return $xemodal;
|
|
1276
1090
|
},
|
|
1277
|
-
render: function
|
|
1091
|
+
render: function () {
|
|
1278
1092
|
return this.renderVN();
|
|
1279
1093
|
}
|
|
1280
1094
|
});
|
|
1281
|
-
|
|
1282
|
-
exports.default = _default2;
|
|
1095
|
+
exports.default = _default;
|