vxe-pc-ui 4.7.8 → 4.7.9

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.
Files changed (47) hide show
  1. package/es/icon/style.css +1 -1
  2. package/es/image/src/group.js +21 -5
  3. package/es/image/src/image.js +25 -5
  4. package/es/image/src/preview.js +20 -13
  5. package/es/image/src/util.js +11 -0
  6. package/es/style.css +1 -1
  7. package/es/style.min.css +1 -1
  8. package/es/ui/index.js +1 -1
  9. package/es/ui/src/log.js +1 -1
  10. package/lib/icon/style/style.css +1 -1
  11. package/lib/icon/style/style.min.css +1 -1
  12. package/lib/image/src/group.js +19 -5
  13. package/lib/image/src/group.min.js +1 -1
  14. package/lib/image/src/image.js +23 -5
  15. package/lib/image/src/image.min.js +1 -1
  16. package/lib/image/src/preview.js +28 -14
  17. package/lib/image/src/preview.min.js +1 -1
  18. package/lib/image/src/util.js +14 -0
  19. package/lib/image/src/util.min.js +1 -1
  20. package/lib/index.umd.js +86 -26
  21. package/lib/index.umd.min.js +1 -1
  22. package/lib/style.css +1 -1
  23. package/lib/style.min.css +1 -1
  24. package/lib/ui/index.js +1 -1
  25. package/lib/ui/index.min.js +1 -1
  26. package/lib/ui/src/log.js +1 -1
  27. package/lib/ui/src/log.min.js +1 -1
  28. package/package.json +1 -1
  29. package/packages/image/src/group.ts +22 -5
  30. package/packages/image/src/image.ts +26 -5
  31. package/packages/image/src/preview.ts +20 -13
  32. package/packages/image/src/util.ts +12 -1
  33. package/types/components/image-group.d.ts +23 -2
  34. package/types/components/image-preview.d.ts +12 -2
  35. package/types/components/image.d.ts +27 -3
  36. /package/es/icon/{iconfont.1752545171984.ttf → iconfont.1752551365876.ttf} +0 -0
  37. /package/es/icon/{iconfont.1752545171984.woff → iconfont.1752551365876.woff} +0 -0
  38. /package/es/icon/{iconfont.1752545171984.woff2 → iconfont.1752551365876.woff2} +0 -0
  39. /package/es/{iconfont.1752545171984.ttf → iconfont.1752551365876.ttf} +0 -0
  40. /package/es/{iconfont.1752545171984.woff → iconfont.1752551365876.woff} +0 -0
  41. /package/es/{iconfont.1752545171984.woff2 → iconfont.1752551365876.woff2} +0 -0
  42. /package/lib/icon/style/{iconfont.1752545171984.ttf → iconfont.1752551365876.ttf} +0 -0
  43. /package/lib/icon/style/{iconfont.1752545171984.woff → iconfont.1752551365876.woff} +0 -0
  44. /package/lib/icon/style/{iconfont.1752545171984.woff2 → iconfont.1752551365876.woff2} +0 -0
  45. /package/lib/{iconfont.1752545171984.ttf → iconfont.1752551365876.ttf} +0 -0
  46. /package/lib/{iconfont.1752545171984.woff → iconfont.1752551365876.woff} +0 -0
  47. /package/lib/{iconfont.1752545171984.woff2 → iconfont.1752551365876.woff2} +0 -0
package/lib/ui/index.js CHANGED
@@ -26,7 +26,7 @@ Object.keys(_core).forEach(function (key) {
26
26
  });
27
27
  var _dynamics = require("../dynamics");
28
28
  var _log = require("./src/log");
29
- const version = exports.version = "4.7.8";
29
+ const version = exports.version = "4.7.9";
30
30
  _core.VxeUI.uiVersion = version;
31
31
  _core.VxeUI.dynamicApp = _dynamics.dynamicApp;
32
32
  function config(options) {
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var _exportNames={version:!0,config:!0,setup:!0},_core=(exports.config=config,exports.default=void 0,exports.setup=setup,exports.version=void 0,require("@vxe-ui/core")),_dynamics=(Object.keys(_core).forEach(function(e){"default"===e||"__esModule"===e||Object.prototype.hasOwnProperty.call(_exportNames,e)||e in exports&&exports[e]===_core[e]||Object.defineProperty(exports,e,{enumerable:!0,get:function(){return _core[e]}})}),require("../dynamics")),_log=require("./src/log");const version=exports.version="4.7.8";function config(e){return(0,_log.warnLog)("vxe.error.delFunc",["config","setConfig"]),(0,_core.setConfig)(e)}function setup(e){return(0,_log.warnLog)("vxe.error.delFunc",["setup","setConfig"]),(0,_core.setConfig)(e)}_core.VxeUI.uiVersion=version,_core.VxeUI.dynamicApp=_dynamics.dynamicApp,_core.VxeUI.config=config,_core.VxeUI.setup=setup,(0,_core.setConfig)({alert:{},anchor:{},anchorLink:{},avatar:{},badge:{},breadcrumb:{separator:"/"},breadcrumbItem:{},button:{trigger:"hover",prefixTooltip:{enterable:!0},suffixTooltip:{enterable:!0}},buttonGroup:{},calendar:{minDate:new Date(1900,0,1),maxDate:new Date(2100,0,1),startDay:1,selectDay:1},card:{border:!0,padding:!0},carousel:{height:200,loop:!0,interval:5e3},carouselItem:{},checkbox:{},checkboxButton:{},checkboxGroup:{},col:{},collapse:{padding:!0,expandConfig:{showIcon:!0}},collapsePane:{},countdown:{},colorPicker:{type:"rgb",clearable:!0,showAlpha:!0,clickToCopy:!0,showColorExtractor:!0,showQuick:!0},datePanel:{startDate:new Date(1900,0,1),endDate:new Date(2100,0,1),startDay:1,selectDay:1},datePicker:{shortcutConfig:{align:"left",mode:"text",autoClose:!0},startDay:1,selectDay:1,autoClose:!0,showClearButton:null,showConfirmButton:null},dateRangePicker:{shortcutConfig:{align:"left",mode:"text",autoClose:!0},startDay:1,selectDay:1,separator:" ~ ",autoClose:!0,showClearButton:null,showConfirmButton:null},drawer:{position:"right",showHeader:!0,lockView:!0,mask:!0,showTitleOverflow:!0,showClose:!0,padding:!0,cancelClosable:!0,confirmClosable:!0},empty:{},form:{validConfig:{showMessage:!0,autoPos:!0,theme:"beautify"},tooltipConfig:{enterable:!0},titleAsterisk:!0,titleOverflow:!1,padding:!0},formDesign:{height:400,showHeader:!0,showPc:!0},formGather:{},formGroup:{},formItem:{},formView:{},icon:{},iconPicker:{icons:["home","company","comment","setting","send","envelope","envelope-open","bell","search","print","pc","goods","chart-line","edit","delete","save","folder","microphone","flag","link","location","sunny","rmb","usd","user","add-user","add-users","star","unlock","time","text","feedback","calendar","association-form","cloud-download","cloud-upload","file","subtable","chart-bar-x","chart-bar-y","chart-line","chart-pie","chart-radar"]},image:{showPreview:!0,showPrintButton:!0,maskClosable:!0},imageGroup:{showPreview:!0,showPrintButton:!0},imagePreview:{showPrintButton:!0},input:{startDate:new Date(1900,0,1),endDate:new Date(2100,0,1),startDay:1,selectDay:1,digits:2,controls:!0},layoutAside:{},layoutBody:{},layoutContainer:{},layoutFooter:{},layoutHeader:{},link:{underline:!0},listDesign:{height:400,showPc:!0},listView:{},list:{virtualYConfig:{enabled:!0,gt:100}},loading:{showIcon:!0,showText:!0},modal:{top:16,showHeader:!0,minWidth:340,minHeight:140,lockView:!0,mask:!0,duration:3e3,marginSize:0,dblclickZoom:!0,showTitleOverflow:!0,animat:!0,showClose:!0,padding:!0,draggable:!0,showConfirmButton:null,cancelClosable:!0,confirmClosable:!0,zoomConfig:{minimizeMaxSize:10,minimizeVerticalOffset:{top:-24,left:0},minimizeHorizontalOffset:{top:0,left:32}},storageKey:"VXE_MODAL_POSITION"},noticeBar:{},numberInput:{digits:2,autoFill:!0,controlConfig:{enabled:!0,layout:"right",showButton:!0,isWheel:!0}},optgroup:{},option:{},pager:{pageSizePlacement:"top"},print:{pageStyle:{}},passwordInput:{controls:!0},printPageBreak:{},pulldown:{destroyOnClose:!0},radio:{strict:!0},radioButton:{strict:!0},radioGroup:{strict:!0},rate:{},result:{},row:{},select:{multiCharOverflow:8,remoteConfig:{enabled:!0,autoLoad:!0},virtualYConfig:{enabled:!0,gt:50,oSize:2}},split:{resize:!0,itemConfig:{minWidth:40,minHeight:40}},splitPane:{},slider:{max:100,min:0},steps:{},switch:{},tabPane:{},tableSelect:{gridConfig:{showOverflow:!0,showHeaderOverflow:!0,showFooterOverflow:!0,rowConfig:{isHover:!0},virtualXConfig:{enabled:!0,gt:0},virtualYConfig:{enabled:!0,gt:0}}},tabs:{},tag:{},textEllipsis:{underline:!0},text:{},textarea:{resize:"none"},tip:{},tooltip:{trigger:"hover",theme:"dark",enterDelay:500,leaveDelay:300,isArrow:!0},tree:{indent:20,minHeight:60,radioConfig:{strict:!0},virtualYConfig:{enabled:!0,gt:50,oSize:2}},treeSelect:{autoClose:!0,virtualYConfig:{enabled:!0,gt:0,oSize:2},treeConfig:{maxHeight:300,radioConfig:{},checkboxConfig:{},filterConfig:{autoExpandAll:!0}}},upload:{mode:"all",imageTypes:["jpg","jpeg","png","gif"],showList:!0,showUploadButton:!0,showButtonText:!0,showRemoveButton:!0,showButtonIcon:!0,showPreview:!0,dragToUpload:!0,showLimitSize:!0,showLimitCount:!0,autoSubmit:!0,maxSimultaneousUploads:5},watermark:{rotate:-30,gap:[100,100]},table:{},colgroup:{},column:{},toolbar:{},grid:{}});const iconPrefix="vxe-icon-";(0,_core.setIcon)({LOADING:iconPrefix+"spinner roll vxe-loading--default-icon",BUTTON_DROPDOWN:iconPrefix+"arrow-down",BUTTON_LOADING:iconPrefix+"spinner roll",BUTTON_TOOLTIP_ICON:iconPrefix+"question-circle-fill",MENU_ITEM_EXPAND_OPEN:iconPrefix+"arrow-down rotate180",MENU_ITEM_EXPAND_CLOSE:iconPrefix+"arrow-down",SELECT_LOADED:iconPrefix+"spinner roll",SELECT_OPEN:iconPrefix+"caret-down rotate180",SELECT_CLOSE:iconPrefix+"caret-down",SELECT_ADD_OPTION:iconPrefix+"add",ICON_PICKER_OPEN:iconPrefix+"caret-down rotate180",ICON_PICKER_CLOSE:iconPrefix+"caret-down",PAGER_HOME:iconPrefix+"home-page",PAGER_END:iconPrefix+"end-page",PAGER_JUMP_PREV:iconPrefix+"arrow-double-left",PAGER_JUMP_NEXT:iconPrefix+"arrow-double-right",PAGER_PREV_PAGE:iconPrefix+"arrow-left",PAGER_NEXT_PAGE:iconPrefix+"arrow-right",PAGER_JUMP_MORE:iconPrefix+"ellipsis-h",RADIO_CHECKED:iconPrefix+"radio-checked-fill",RADIO_UNCHECKED:iconPrefix+"radio-unchecked",RADIO_DISABLED_UNCHECKED:iconPrefix+"radio-unchecked-fill",CHECKBOX_INDETERMINATE:iconPrefix+"checkbox-indeterminate-fill",CHECKBOX_CHECKED:iconPrefix+"checkbox-checked-fill",CHECKBOX_UNCHECKED:iconPrefix+"checkbox-unchecked",CHECKBOX_DISABLED_UNCHECKED:iconPrefix+"checkbox-unchecked-fill",INPUT_CLEAR:iconPrefix+"error-circle-fill",INPUT_SEARCH:iconPrefix+"search",INPUT_PLUS_NUM:iconPrefix+"caret-up",INPUT_MINUS_NUM:iconPrefix+"caret-down",NUMBER_INPUT_MINUS_NUM:iconPrefix+"minus",NUMBER_INPUT_PLUS_NUM:iconPrefix+"add",DATE_PICKER_DATE:iconPrefix+"calendar",PASSWORD_INPUT_SHOW_PWD:iconPrefix+"eye-fill-close",PASSWORD_INPUT_HIDE_PWD:iconPrefix+"eye-fill",MODAL_ZOOM_MIN:iconPrefix+"minus",MODAL_ZOOM_REVERT:iconPrefix+"recover",MODAL_ZOOM_IN:iconPrefix+"square",MODAL_ZOOM_OUT:iconPrefix+"maximize",MODAL_CLOSE:iconPrefix+"close",MODAL_INFO:iconPrefix+"info-circle-fill",MODAL_SUCCESS:iconPrefix+"success-circle-fill",MODAL_WARNING:iconPrefix+"warning-circle-fill",MODAL_ERROR:iconPrefix+"error-circle-fill",MODAL_QUESTION:iconPrefix+"question-circle-fill",MODAL_LOADING:iconPrefix+"spinner roll",DRAWER_CLOSE:iconPrefix+"close",FORM_PREFIX:iconPrefix+"question-circle-fill",FORM_SUFFIX:iconPrefix+"question-circle-fill",FORM_FOLDING:iconPrefix+"arrow-up rotate180",FORM_UNFOLDING:iconPrefix+"arrow-up",FORM_DESIGN_STYLE_SETTING:iconPrefix+"layout",FORM_DESIGN_PROPS_PC:iconPrefix+"pc",FORM_DESIGN_PROPS_MOBILE:iconPrefix+"mobile",FORM_DESIGN_PROPS_ADD:iconPrefix+"add",FORM_DESIGN_PROPS_EDIT:iconPrefix+"edit",FORM_DESIGN_WIDGET_ADD:iconPrefix+"square-plus-fill",FORM_DESIGN_WIDGET_COPY:iconPrefix+"copy",FORM_DESIGN_WIDGET_DELETE:iconPrefix+"delete",FORM_DESIGN_WIDGET_SWAP_LR:iconPrefix+"swap",FORM_DESIGN_WIDGET_OPTION_DELETE:iconPrefix+"delete",FORM_DESIGN_WIDGET_OPTION_EXPAND_OPEN:iconPrefix+"square-plus",FORM_DESIGN_WIDGET_OPTION_EXPAND_CLOSE:iconPrefix+"square-minus",LIST_DESIGN_FIELD_SETTING:iconPrefix+"custom-column",LIST_DESIGN_LIST_SETTING:iconPrefix+"menu",LIST_DESIGN_LIST_SETTING_SEARCH_DELETE:iconPrefix+"delete",LIST_DESIGN_LIST_SETTING_ACTIVE_DELETE:iconPrefix+"delete",UPLOAD_FILE_ERROR:iconPrefix+"warning-circle-fill",UPLOAD_FILE_ADD:iconPrefix+"upload",UPLOAD_FILE_REMOVE:iconPrefix+"delete",UPLOAD_FILE_DOWNLOAD:iconPrefix+"download",UPLOAD_IMAGE_UPLOAD:iconPrefix+"upload",UPLOAD_IMAGE_RE_UPLOAD:iconPrefix+"repeat",UPLOAD_IMAGE_ADD:iconPrefix+"add",UPLOAD_IMAGE_REMOVE:iconPrefix+"close",UPLOAD_LOADING:iconPrefix+"spinner roll vxe-loading--default-icon",UPLOAD_FILE_TYPE_DEFAULT:iconPrefix+"file",UPLOAD_FILE_TYPE_XLSX:iconPrefix+"file-excel",UPLOAD_FILE_TYPE_XLS:iconPrefix+"file-excel",UPLOAD_FILE_TYPE_PDF:iconPrefix+"file-pdf",UPLOAD_FILE_TYPE_PNG:iconPrefix+"file-image",UPLOAD_FILE_TYPE_GIF:iconPrefix+"file-image",UPLOAD_FILE_TYPE_JPG:iconPrefix+"file-image",UPLOAD_FILE_TYPE_JPEG:iconPrefix+"file-image",UPLOAD_FILE_TYPE_MD:iconPrefix+"file-markdown",UPLOAD_FILE_TYPE_PPD:iconPrefix+"file-ppt",UPLOAD_FILE_TYPE_DOCX:iconPrefix+"file-word",UPLOAD_FILE_TYPE_DOC:iconPrefix+"file-word",UPLOAD_FILE_TYPE_ZIP:iconPrefix+"file-zip",UPLOAD_FILE_TYPE_TXT:iconPrefix+"file-txt",IMAGE_PREVIEW_CLOSE:iconPrefix+"close",IMAGE_PREVIEW_PREVIOUS:iconPrefix+"arrow-left",IMAGE_PREVIEW_NEXT:iconPrefix+"arrow-right",IMAGE_PREVIEW_PCT_FULL:iconPrefix+"pct-full",IMAGE_PREVIEW_PCT_1_1:iconPrefix+"pct-1-1",IMAGE_PREVIEW_ZOOM_OUT:iconPrefix+"search-zoom-out",IMAGE_PREVIEW_ZOOM_IN:iconPrefix+"search-zoom-in",IMAGE_PREVIEW_ROTATE_LEFT:iconPrefix+"rotate-left",IMAGE_PREVIEW_ROTATE_RIGHT:iconPrefix+"rotate-right",IMAGE_PREVIEW_PRINT:iconPrefix+"print",IMAGE_PREVIEW_DOWNLOAD:iconPrefix+"download",ALERT_CLOSE:iconPrefix+"close",ALERT_INFO:iconPrefix+"info-circle-fill",ALERT_SUCCESS:iconPrefix+"success-circle-fill",ALERT_WARNING:iconPrefix+"warning-circle-fill",ALERT_ERROR:iconPrefix+"error-circle-fill",TREE_NODE_OPEN:iconPrefix+"caret-right rotate90",TREE_NODE_CLOSE:iconPrefix+"caret-right",TREE_NODE_LOADED:iconPrefix+"spinner roll",TREE_SELECT_LOADED:iconPrefix+"spinner roll",TREE_SELECT_OPEN:iconPrefix+"caret-down rotate180",TREE_SELECT_CLOSE:iconPrefix+"caret-down",TABLE_SELECT_LOADED:iconPrefix+"spinner roll",TABLE_SELECT_OPEN:iconPrefix+"caret-down rotate180",TABLE_SELECT_CLOSE:iconPrefix+"caret-down",TABS_TAB_BUTTON_TOP:iconPrefix+"arrow-up",TABS_TAB_BUTTON_BOTTOM:iconPrefix+"arrow-down",TABS_TAB_BUTTON_LEFT:iconPrefix+"arrow-left",TABS_TAB_BUTTON_RIGHT:iconPrefix+"arrow-right",TABS_TAB_CLOSE:iconPrefix+"close",TABS_TAB_REFRESH:iconPrefix+"refresh",TABS_TAB_REFRESH_LOADING:iconPrefix+"refresh roll",TEXT_COPY:iconPrefix+"copy",TEXT_LOADING:iconPrefix+"spinner roll",CAROUSEL_HORIZONTAL_PREVIOUS:iconPrefix+"arrow-left",CAROUSEL_HORIZONTAL_NEXT:iconPrefix+"arrow-right",CAROUSEL_VERTICAL_PREVIOUS:iconPrefix+"arrow-up",CAROUSEL_VERTICAL_NEXT:iconPrefix+"arrow-down",COLLAPSE_OPEN:iconPrefix+"arrow-right rotate90",COLLAPSE_CLOSE:iconPrefix+"arrow-right",EMPTY_DEFAULT:iconPrefix+"empty",RESULT_INFO:iconPrefix+"info-circle-fill",RESULT_SUCCESS:iconPrefix+"success-circle-fill",RESULT_WARNING:iconPrefix+"warning-circle-fill",RESULT_ERROR:iconPrefix+"error-circle-fill",RESULT_QUESTION:iconPrefix+"question-circle-fill",RESULT_LOADING:iconPrefix+"spinner roll",RATE_CHECKED:iconPrefix+"star-fill",RATE_UNCHECKED:iconPrefix+"star",COLOR_PICKER_COLOR_COPY:iconPrefix+"copy",COLOR_PICKER_EYE_DROPPER:iconPrefix+"dropper",COLOR_PICKER_TPTY_OPEN:iconPrefix+"arrow-down rotate180",COLOR_PICKER_TPTY_CLOSE:iconPrefix+"arrow-down",SPLIT_TOP_ACTION:iconPrefix+"arrow-up",SPLIT_BOTTOM_ACTION:iconPrefix+"arrow-down",SPLIT_LEFT_ACTION:iconPrefix+"arrow-left",SPLIT_RIGHT_ACTION:iconPrefix+"arrow-right"});var _default=exports.default=_core.VxeUI;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var _exportNames={version:!0,config:!0,setup:!0},_core=(exports.config=config,exports.default=void 0,exports.setup=setup,exports.version=void 0,require("@vxe-ui/core")),_dynamics=(Object.keys(_core).forEach(function(e){"default"===e||"__esModule"===e||Object.prototype.hasOwnProperty.call(_exportNames,e)||e in exports&&exports[e]===_core[e]||Object.defineProperty(exports,e,{enumerable:!0,get:function(){return _core[e]}})}),require("../dynamics")),_log=require("./src/log");const version=exports.version="4.7.9";function config(e){return(0,_log.warnLog)("vxe.error.delFunc",["config","setConfig"]),(0,_core.setConfig)(e)}function setup(e){return(0,_log.warnLog)("vxe.error.delFunc",["setup","setConfig"]),(0,_core.setConfig)(e)}_core.VxeUI.uiVersion=version,_core.VxeUI.dynamicApp=_dynamics.dynamicApp,_core.VxeUI.config=config,_core.VxeUI.setup=setup,(0,_core.setConfig)({alert:{},anchor:{},anchorLink:{},avatar:{},badge:{},breadcrumb:{separator:"/"},breadcrumbItem:{},button:{trigger:"hover",prefixTooltip:{enterable:!0},suffixTooltip:{enterable:!0}},buttonGroup:{},calendar:{minDate:new Date(1900,0,1),maxDate:new Date(2100,0,1),startDay:1,selectDay:1},card:{border:!0,padding:!0},carousel:{height:200,loop:!0,interval:5e3},carouselItem:{},checkbox:{},checkboxButton:{},checkboxGroup:{},col:{},collapse:{padding:!0,expandConfig:{showIcon:!0}},collapsePane:{},countdown:{},colorPicker:{type:"rgb",clearable:!0,showAlpha:!0,clickToCopy:!0,showColorExtractor:!0,showQuick:!0},datePanel:{startDate:new Date(1900,0,1),endDate:new Date(2100,0,1),startDay:1,selectDay:1},datePicker:{shortcutConfig:{align:"left",mode:"text",autoClose:!0},startDay:1,selectDay:1,autoClose:!0,showClearButton:null,showConfirmButton:null},dateRangePicker:{shortcutConfig:{align:"left",mode:"text",autoClose:!0},startDay:1,selectDay:1,separator:" ~ ",autoClose:!0,showClearButton:null,showConfirmButton:null},drawer:{position:"right",showHeader:!0,lockView:!0,mask:!0,showTitleOverflow:!0,showClose:!0,padding:!0,cancelClosable:!0,confirmClosable:!0},empty:{},form:{validConfig:{showMessage:!0,autoPos:!0,theme:"beautify"},tooltipConfig:{enterable:!0},titleAsterisk:!0,titleOverflow:!1,padding:!0},formDesign:{height:400,showHeader:!0,showPc:!0},formGather:{},formGroup:{},formItem:{},formView:{},icon:{},iconPicker:{icons:["home","company","comment","setting","send","envelope","envelope-open","bell","search","print","pc","goods","chart-line","edit","delete","save","folder","microphone","flag","link","location","sunny","rmb","usd","user","add-user","add-users","star","unlock","time","text","feedback","calendar","association-form","cloud-download","cloud-upload","file","subtable","chart-bar-x","chart-bar-y","chart-line","chart-pie","chart-radar"]},image:{showPreview:!0,showPrintButton:!0,maskClosable:!0},imageGroup:{showPreview:!0,showPrintButton:!0},imagePreview:{showPrintButton:!0},input:{startDate:new Date(1900,0,1),endDate:new Date(2100,0,1),startDay:1,selectDay:1,digits:2,controls:!0},layoutAside:{},layoutBody:{},layoutContainer:{},layoutFooter:{},layoutHeader:{},link:{underline:!0},listDesign:{height:400,showPc:!0},listView:{},list:{virtualYConfig:{enabled:!0,gt:100}},loading:{showIcon:!0,showText:!0},modal:{top:16,showHeader:!0,minWidth:340,minHeight:140,lockView:!0,mask:!0,duration:3e3,marginSize:0,dblclickZoom:!0,showTitleOverflow:!0,animat:!0,showClose:!0,padding:!0,draggable:!0,showConfirmButton:null,cancelClosable:!0,confirmClosable:!0,zoomConfig:{minimizeMaxSize:10,minimizeVerticalOffset:{top:-24,left:0},minimizeHorizontalOffset:{top:0,left:32}},storageKey:"VXE_MODAL_POSITION"},noticeBar:{},numberInput:{digits:2,autoFill:!0,controlConfig:{enabled:!0,layout:"right",showButton:!0,isWheel:!0}},optgroup:{},option:{},pager:{pageSizePlacement:"top"},print:{pageStyle:{}},passwordInput:{controls:!0},printPageBreak:{},pulldown:{destroyOnClose:!0},radio:{strict:!0},radioButton:{strict:!0},radioGroup:{strict:!0},rate:{},result:{},row:{},select:{multiCharOverflow:8,remoteConfig:{enabled:!0,autoLoad:!0},virtualYConfig:{enabled:!0,gt:50,oSize:2}},split:{resize:!0,itemConfig:{minWidth:40,minHeight:40}},splitPane:{},slider:{max:100,min:0},steps:{},switch:{},tabPane:{},tableSelect:{gridConfig:{showOverflow:!0,showHeaderOverflow:!0,showFooterOverflow:!0,rowConfig:{isHover:!0},virtualXConfig:{enabled:!0,gt:0},virtualYConfig:{enabled:!0,gt:0}}},tabs:{},tag:{},textEllipsis:{underline:!0},text:{},textarea:{resize:"none"},tip:{},tooltip:{trigger:"hover",theme:"dark",enterDelay:500,leaveDelay:300,isArrow:!0},tree:{indent:20,minHeight:60,radioConfig:{strict:!0},virtualYConfig:{enabled:!0,gt:50,oSize:2}},treeSelect:{autoClose:!0,virtualYConfig:{enabled:!0,gt:0,oSize:2},treeConfig:{maxHeight:300,radioConfig:{},checkboxConfig:{},filterConfig:{autoExpandAll:!0}}},upload:{mode:"all",imageTypes:["jpg","jpeg","png","gif"],showList:!0,showUploadButton:!0,showButtonText:!0,showRemoveButton:!0,showButtonIcon:!0,showPreview:!0,dragToUpload:!0,showLimitSize:!0,showLimitCount:!0,autoSubmit:!0,maxSimultaneousUploads:5},watermark:{rotate:-30,gap:[100,100]},table:{},colgroup:{},column:{},toolbar:{},grid:{}});const iconPrefix="vxe-icon-";(0,_core.setIcon)({LOADING:iconPrefix+"spinner roll vxe-loading--default-icon",BUTTON_DROPDOWN:iconPrefix+"arrow-down",BUTTON_LOADING:iconPrefix+"spinner roll",BUTTON_TOOLTIP_ICON:iconPrefix+"question-circle-fill",MENU_ITEM_EXPAND_OPEN:iconPrefix+"arrow-down rotate180",MENU_ITEM_EXPAND_CLOSE:iconPrefix+"arrow-down",SELECT_LOADED:iconPrefix+"spinner roll",SELECT_OPEN:iconPrefix+"caret-down rotate180",SELECT_CLOSE:iconPrefix+"caret-down",SELECT_ADD_OPTION:iconPrefix+"add",ICON_PICKER_OPEN:iconPrefix+"caret-down rotate180",ICON_PICKER_CLOSE:iconPrefix+"caret-down",PAGER_HOME:iconPrefix+"home-page",PAGER_END:iconPrefix+"end-page",PAGER_JUMP_PREV:iconPrefix+"arrow-double-left",PAGER_JUMP_NEXT:iconPrefix+"arrow-double-right",PAGER_PREV_PAGE:iconPrefix+"arrow-left",PAGER_NEXT_PAGE:iconPrefix+"arrow-right",PAGER_JUMP_MORE:iconPrefix+"ellipsis-h",RADIO_CHECKED:iconPrefix+"radio-checked-fill",RADIO_UNCHECKED:iconPrefix+"radio-unchecked",RADIO_DISABLED_UNCHECKED:iconPrefix+"radio-unchecked-fill",CHECKBOX_INDETERMINATE:iconPrefix+"checkbox-indeterminate-fill",CHECKBOX_CHECKED:iconPrefix+"checkbox-checked-fill",CHECKBOX_UNCHECKED:iconPrefix+"checkbox-unchecked",CHECKBOX_DISABLED_UNCHECKED:iconPrefix+"checkbox-unchecked-fill",INPUT_CLEAR:iconPrefix+"error-circle-fill",INPUT_SEARCH:iconPrefix+"search",INPUT_PLUS_NUM:iconPrefix+"caret-up",INPUT_MINUS_NUM:iconPrefix+"caret-down",NUMBER_INPUT_MINUS_NUM:iconPrefix+"minus",NUMBER_INPUT_PLUS_NUM:iconPrefix+"add",DATE_PICKER_DATE:iconPrefix+"calendar",PASSWORD_INPUT_SHOW_PWD:iconPrefix+"eye-fill-close",PASSWORD_INPUT_HIDE_PWD:iconPrefix+"eye-fill",MODAL_ZOOM_MIN:iconPrefix+"minus",MODAL_ZOOM_REVERT:iconPrefix+"recover",MODAL_ZOOM_IN:iconPrefix+"square",MODAL_ZOOM_OUT:iconPrefix+"maximize",MODAL_CLOSE:iconPrefix+"close",MODAL_INFO:iconPrefix+"info-circle-fill",MODAL_SUCCESS:iconPrefix+"success-circle-fill",MODAL_WARNING:iconPrefix+"warning-circle-fill",MODAL_ERROR:iconPrefix+"error-circle-fill",MODAL_QUESTION:iconPrefix+"question-circle-fill",MODAL_LOADING:iconPrefix+"spinner roll",DRAWER_CLOSE:iconPrefix+"close",FORM_PREFIX:iconPrefix+"question-circle-fill",FORM_SUFFIX:iconPrefix+"question-circle-fill",FORM_FOLDING:iconPrefix+"arrow-up rotate180",FORM_UNFOLDING:iconPrefix+"arrow-up",FORM_DESIGN_STYLE_SETTING:iconPrefix+"layout",FORM_DESIGN_PROPS_PC:iconPrefix+"pc",FORM_DESIGN_PROPS_MOBILE:iconPrefix+"mobile",FORM_DESIGN_PROPS_ADD:iconPrefix+"add",FORM_DESIGN_PROPS_EDIT:iconPrefix+"edit",FORM_DESIGN_WIDGET_ADD:iconPrefix+"square-plus-fill",FORM_DESIGN_WIDGET_COPY:iconPrefix+"copy",FORM_DESIGN_WIDGET_DELETE:iconPrefix+"delete",FORM_DESIGN_WIDGET_SWAP_LR:iconPrefix+"swap",FORM_DESIGN_WIDGET_OPTION_DELETE:iconPrefix+"delete",FORM_DESIGN_WIDGET_OPTION_EXPAND_OPEN:iconPrefix+"square-plus",FORM_DESIGN_WIDGET_OPTION_EXPAND_CLOSE:iconPrefix+"square-minus",LIST_DESIGN_FIELD_SETTING:iconPrefix+"custom-column",LIST_DESIGN_LIST_SETTING:iconPrefix+"menu",LIST_DESIGN_LIST_SETTING_SEARCH_DELETE:iconPrefix+"delete",LIST_DESIGN_LIST_SETTING_ACTIVE_DELETE:iconPrefix+"delete",UPLOAD_FILE_ERROR:iconPrefix+"warning-circle-fill",UPLOAD_FILE_ADD:iconPrefix+"upload",UPLOAD_FILE_REMOVE:iconPrefix+"delete",UPLOAD_FILE_DOWNLOAD:iconPrefix+"download",UPLOAD_IMAGE_UPLOAD:iconPrefix+"upload",UPLOAD_IMAGE_RE_UPLOAD:iconPrefix+"repeat",UPLOAD_IMAGE_ADD:iconPrefix+"add",UPLOAD_IMAGE_REMOVE:iconPrefix+"close",UPLOAD_LOADING:iconPrefix+"spinner roll vxe-loading--default-icon",UPLOAD_FILE_TYPE_DEFAULT:iconPrefix+"file",UPLOAD_FILE_TYPE_XLSX:iconPrefix+"file-excel",UPLOAD_FILE_TYPE_XLS:iconPrefix+"file-excel",UPLOAD_FILE_TYPE_PDF:iconPrefix+"file-pdf",UPLOAD_FILE_TYPE_PNG:iconPrefix+"file-image",UPLOAD_FILE_TYPE_GIF:iconPrefix+"file-image",UPLOAD_FILE_TYPE_JPG:iconPrefix+"file-image",UPLOAD_FILE_TYPE_JPEG:iconPrefix+"file-image",UPLOAD_FILE_TYPE_MD:iconPrefix+"file-markdown",UPLOAD_FILE_TYPE_PPD:iconPrefix+"file-ppt",UPLOAD_FILE_TYPE_DOCX:iconPrefix+"file-word",UPLOAD_FILE_TYPE_DOC:iconPrefix+"file-word",UPLOAD_FILE_TYPE_ZIP:iconPrefix+"file-zip",UPLOAD_FILE_TYPE_TXT:iconPrefix+"file-txt",IMAGE_PREVIEW_CLOSE:iconPrefix+"close",IMAGE_PREVIEW_PREVIOUS:iconPrefix+"arrow-left",IMAGE_PREVIEW_NEXT:iconPrefix+"arrow-right",IMAGE_PREVIEW_PCT_FULL:iconPrefix+"pct-full",IMAGE_PREVIEW_PCT_1_1:iconPrefix+"pct-1-1",IMAGE_PREVIEW_ZOOM_OUT:iconPrefix+"search-zoom-out",IMAGE_PREVIEW_ZOOM_IN:iconPrefix+"search-zoom-in",IMAGE_PREVIEW_ROTATE_LEFT:iconPrefix+"rotate-left",IMAGE_PREVIEW_ROTATE_RIGHT:iconPrefix+"rotate-right",IMAGE_PREVIEW_PRINT:iconPrefix+"print",IMAGE_PREVIEW_DOWNLOAD:iconPrefix+"download",ALERT_CLOSE:iconPrefix+"close",ALERT_INFO:iconPrefix+"info-circle-fill",ALERT_SUCCESS:iconPrefix+"success-circle-fill",ALERT_WARNING:iconPrefix+"warning-circle-fill",ALERT_ERROR:iconPrefix+"error-circle-fill",TREE_NODE_OPEN:iconPrefix+"caret-right rotate90",TREE_NODE_CLOSE:iconPrefix+"caret-right",TREE_NODE_LOADED:iconPrefix+"spinner roll",TREE_SELECT_LOADED:iconPrefix+"spinner roll",TREE_SELECT_OPEN:iconPrefix+"caret-down rotate180",TREE_SELECT_CLOSE:iconPrefix+"caret-down",TABLE_SELECT_LOADED:iconPrefix+"spinner roll",TABLE_SELECT_OPEN:iconPrefix+"caret-down rotate180",TABLE_SELECT_CLOSE:iconPrefix+"caret-down",TABS_TAB_BUTTON_TOP:iconPrefix+"arrow-up",TABS_TAB_BUTTON_BOTTOM:iconPrefix+"arrow-down",TABS_TAB_BUTTON_LEFT:iconPrefix+"arrow-left",TABS_TAB_BUTTON_RIGHT:iconPrefix+"arrow-right",TABS_TAB_CLOSE:iconPrefix+"close",TABS_TAB_REFRESH:iconPrefix+"refresh",TABS_TAB_REFRESH_LOADING:iconPrefix+"refresh roll",TEXT_COPY:iconPrefix+"copy",TEXT_LOADING:iconPrefix+"spinner roll",CAROUSEL_HORIZONTAL_PREVIOUS:iconPrefix+"arrow-left",CAROUSEL_HORIZONTAL_NEXT:iconPrefix+"arrow-right",CAROUSEL_VERTICAL_PREVIOUS:iconPrefix+"arrow-up",CAROUSEL_VERTICAL_NEXT:iconPrefix+"arrow-down",COLLAPSE_OPEN:iconPrefix+"arrow-right rotate90",COLLAPSE_CLOSE:iconPrefix+"arrow-right",EMPTY_DEFAULT:iconPrefix+"empty",RESULT_INFO:iconPrefix+"info-circle-fill",RESULT_SUCCESS:iconPrefix+"success-circle-fill",RESULT_WARNING:iconPrefix+"warning-circle-fill",RESULT_ERROR:iconPrefix+"error-circle-fill",RESULT_QUESTION:iconPrefix+"question-circle-fill",RESULT_LOADING:iconPrefix+"spinner roll",RATE_CHECKED:iconPrefix+"star-fill",RATE_UNCHECKED:iconPrefix+"star",COLOR_PICKER_COLOR_COPY:iconPrefix+"copy",COLOR_PICKER_EYE_DROPPER:iconPrefix+"dropper",COLOR_PICKER_TPTY_OPEN:iconPrefix+"arrow-down rotate180",COLOR_PICKER_TPTY_CLOSE:iconPrefix+"arrow-down",SPLIT_TOP_ACTION:iconPrefix+"arrow-up",SPLIT_BOTTOM_ACTION:iconPrefix+"arrow-down",SPLIT_LEFT_ACTION:iconPrefix+"arrow-left",SPLIT_RIGHT_ACTION:iconPrefix+"arrow-right"});var _default=exports.default=_core.VxeUI;
package/lib/ui/src/log.js CHANGED
@@ -5,6 +5,6 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.warnLog = exports.errLog = void 0;
7
7
  var _core = require("@vxe-ui/core");
8
- const version = `ui v${"4.7.8"}`;
8
+ const version = `ui v${"4.7.9"}`;
9
9
  const warnLog = exports.warnLog = _core.log.create('warn', version);
10
10
  const errLog = exports.errLog = _core.log.create('error', version);
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.warnLog=exports.errLog=void 0;var _core=require("@vxe-ui/core");const version="ui v4.7.8",warnLog=exports.warnLog=_core.log.create("warn",version),errLog=exports.errLog=_core.log.create("error",version);
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.warnLog=exports.errLog=void 0;var _core=require("@vxe-ui/core");const version="ui v4.7.9",warnLog=exports.warnLog=_core.log.create("warn",version),errLog=exports.errLog=_core.log.create("error",version);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vxe-pc-ui",
3
- "version": "4.7.8",
3
+ "version": "4.7.9",
4
4
  "description": "A vue based PC component library",
5
5
  "scripts": {
6
6
  "update": "npm install --legacy-peer-deps",
@@ -25,10 +25,13 @@ export default defineVxeComponent({
25
25
  showDownloadButton: {
26
26
  type: Boolean as PropType<VxeImageGroupPropTypes.ShowDownloadButton>,
27
27
  default: () => getConfig().imageGroup.showDownloadButton
28
- }
28
+ },
29
+ getThumbnailUrlMethod: Function as PropType<VxeImageGroupPropTypes.GetThumbnailUrlMethod>
29
30
  },
30
31
  emits: [
31
- 'click'
32
+ 'click',
33
+ 'change',
34
+ 'rotate'
32
35
  ] as VxeImageGroupEmits,
33
36
  setup (props, context) {
34
37
  const { emit } = context
@@ -60,6 +63,10 @@ export default defineVxeComponent({
60
63
  return Object.assign({}, getConfig().imageGroup.imageStyle, props.imageStyle)
61
64
  })
62
65
 
66
+ const computeGetThumbnailUrlMethod = computed(() => {
67
+ return props.getThumbnailUrlMethod || getConfig().imageGroup.getThumbnailUrlMethod
68
+ })
69
+
63
70
  const computeMaps: ButtonPrivateComputed = {
64
71
  computeSize
65
72
  }
@@ -89,10 +96,18 @@ export default defineVxeComponent({
89
96
  urlList: imgList,
90
97
  toolbarConfig,
91
98
  showPrintButton,
92
- showDownloadButton
99
+ showDownloadButton,
100
+ events: {
101
+ change (eventParams) {
102
+ $xeImageGroup.dispatchEvent('click', eventParams, eventParams.$event)
103
+ },
104
+ rotate (eventParams) {
105
+ $xeImageGroup.dispatchEvent('click', eventParams, eventParams.$event)
106
+ }
107
+ }
93
108
  })
94
109
  }
95
- imageGroupMethods.dispatchEvent('click', { url, urlList: imgList }, evnt)
110
+ $xeImageGroup.dispatchEvent('click', { url, urlList: imgList }, evnt)
96
111
  }
97
112
  }
98
113
 
@@ -102,6 +117,7 @@ export default defineVxeComponent({
102
117
  const imgList = computeImgList.value
103
118
  const vSize = computeSize.value
104
119
  const imgStyleOpts = computeImgStyleOpts.value
120
+ const getThumbnailUrlMethod = computeGetThumbnailUrlMethod.value
105
121
  return h('div', {
106
122
  class: ['vxe-image-group', {
107
123
  [`size--${vSize}`]: vSize
@@ -113,7 +129,8 @@ export default defineVxeComponent({
113
129
  src: item.url,
114
130
  alt: item.alt,
115
131
  width: imgStyleOpts.width,
116
- height: imgStyleOpts.height
132
+ height: imgStyleOpts.height,
133
+ getThumbnailUrlMethod
117
134
  })
118
135
  })
119
136
  : [])
@@ -34,10 +34,16 @@ export default defineVxeComponent({
34
34
  type: Boolean as PropType<VxeImagePropTypes.ShowDownloadButton>,
35
35
  default: () => getConfig().image.showDownloadButton
36
36
  },
37
- size: { type: String as PropType<VxeImagePropTypes.Size>, default: () => getConfig().image.size || getConfig().size }
37
+ size: {
38
+ type: String as PropType<VxeImagePropTypes.Size>,
39
+ default: () => getConfig().image.size || getConfig().size
40
+ },
41
+ getThumbnailUrlMethod: Function as PropType<VxeImagePropTypes.GetThumbnailUrlMethod>
38
42
  },
39
43
  emits: [
40
- 'click'
44
+ 'click',
45
+ 'change',
46
+ 'rotate'
41
47
  ] as VxeImageEmits,
42
48
  setup (props, context) {
43
49
  const { emit } = context
@@ -103,6 +109,12 @@ export default defineVxeComponent({
103
109
  return imgItem ? `${imgItem.url || ''}` : ''
104
110
  })
105
111
 
112
+ const computeImgThumbnailUrl = computed(() => {
113
+ const getThumbnailUrlFn = props.getThumbnailUrlMethod || getConfig().image.getThumbnailUrlMethod
114
+ const imgUrl = computeImgUrl.value
115
+ return getThumbnailUrlFn ? getThumbnailUrlFn({ url: imgUrl, $image: $xeImage }) : ''
116
+ })
117
+
106
118
  const computeMaps: VxeImagePrivateComputed = {
107
119
  computeSize
108
120
  }
@@ -136,10 +148,18 @@ export default defineVxeComponent({
136
148
  toolbarConfig,
137
149
  showPrintButton,
138
150
  showDownloadButton,
139
- maskClosable
151
+ maskClosable,
152
+ events: {
153
+ change (eventParams) {
154
+ $xeImage.dispatchEvent('click', eventParams, eventParams.$event)
155
+ },
156
+ rotate (eventParams) {
157
+ $xeImage.dispatchEvent('click', eventParams, eventParams.$event)
158
+ }
159
+ }
140
160
  })
141
161
  }
142
- imageMethods.dispatchEvent('click', { url: imgUrl }, evnt)
162
+ $xeImage.dispatchEvent('click', { url: imgUrl }, evnt)
143
163
  }
144
164
  }
145
165
 
@@ -152,6 +172,7 @@ export default defineVxeComponent({
152
172
  const { alt, loading, circle } = props
153
173
  const imgStyle = computeImgStyle.value
154
174
  const imgUrl = computeImgUrl.value
175
+ const imgThumbnailUrl = computeImgThumbnailUrl.value
155
176
  const vSize = computeSize.value
156
177
  return h('img', {
157
178
  ref: refElem,
@@ -159,7 +180,7 @@ export default defineVxeComponent({
159
180
  [`size--${vSize}`]: vSize,
160
181
  'is--circle': circle
161
182
  }],
162
- src: imgUrl,
183
+ src: imgThumbnailUrl || imgUrl,
163
184
  alt,
164
185
  loading,
165
186
  style: imgStyle,
@@ -40,6 +40,7 @@ export default defineVxeComponent({
40
40
  'change',
41
41
  'download',
42
42
  'download-fail',
43
+ 'rotate',
43
44
  'close'
44
45
  ] as VxeImagePreviewEmits,
45
46
  setup (props, context) {
@@ -241,7 +242,7 @@ export default defineVxeComponent({
241
242
  }
242
243
  }
243
244
 
244
- const handleChange = (isNext: boolean) => {
245
+ const handleChangeEvent = (evnt: Event, isNext: boolean) => {
245
246
  let activeIndex = reactData.activeIndex || 0
246
247
  const imgList = computeImgList.value
247
248
  if (isNext) {
@@ -257,12 +258,17 @@ export default defineVxeComponent({
257
258
  activeIndex--
258
259
  }
259
260
  }
260
- resetStyle()
261
+ const imgUrl = imgList[activeIndex || 0]
261
262
  reactData.activeIndex = activeIndex
263
+ resetStyle()
262
264
  emitModel(activeIndex)
265
+ dispatchEvent('change', { url: imgUrl, activeIndex }, evnt)
263
266
  }
264
267
 
265
- const handleRotateImg = (isRight: boolean) => {
268
+ const handleRotateImgEvent = (evnt: Event, isRight: boolean) => {
269
+ const imgList = computeImgList.value
270
+ const { activeIndex } = reactData
271
+ const imgUrl = imgList[activeIndex || 0]
266
272
  let offsetRotate = reactData.offsetRotate
267
273
  if (isRight) {
268
274
  offsetRotate += 90
@@ -270,6 +276,7 @@ export default defineVxeComponent({
270
276
  offsetRotate -= 90
271
277
  }
272
278
  reactData.offsetRotate = offsetRotate
279
+ dispatchEvent('rotate', { url: imgUrl, rotateValue: offsetRotate }, evnt)
273
280
  }
274
281
 
275
282
  const handlePct11 = () => {
@@ -373,10 +380,10 @@ export default defineVxeComponent({
373
380
  handlePct11()
374
381
  break
375
382
  case 'rotateLeft':
376
- handleRotateImg(false)
383
+ handleRotateImgEvent(evnt, false)
377
384
  break
378
385
  case 'rotateRight':
379
- handleRotateImg(true)
386
+ handleRotateImgEvent(evnt, true)
380
387
  break
381
388
  case 'print':
382
389
  handlePrintImg()
@@ -452,21 +459,21 @@ export default defineVxeComponent({
452
459
  if (hasShiftKey) {
453
460
  reactData.offsetLeft -= 1
454
461
  } else {
455
- handleChange(false)
462
+ handleChangeEvent(evnt, false)
456
463
  }
457
464
  } else if (isRightArrow) {
458
465
  evnt.preventDefault()
459
466
  if (hasShiftKey) {
460
467
  reactData.offsetLeft += 1
461
468
  } else {
462
- handleChange(true)
469
+ handleChangeEvent(evnt, true)
463
470
  }
464
471
  } else if (isR && isControlKey) {
465
472
  evnt.preventDefault()
466
473
  if (hasShiftKey) {
467
- handleRotateImg(false)
474
+ handleRotateImgEvent(evnt, false)
468
475
  } else {
469
- handleRotateImg(true)
476
+ handleRotateImgEvent(evnt, true)
470
477
  }
471
478
  } else if (isP && isControlKey) {
472
479
  evnt.preventDefault()
@@ -559,8 +566,8 @@ export default defineVxeComponent({
559
566
  imgList.length > 1
560
567
  ? h('div', {
561
568
  class: 'vxe-image-preview--previous-btn',
562
- onClick () {
563
- handleChange(false)
569
+ onClick (evnt) {
570
+ handleChangeEvent(evnt, false)
564
571
  }
565
572
  }, [
566
573
  h('i', {
@@ -571,8 +578,8 @@ export default defineVxeComponent({
571
578
  imgList.length > 1
572
579
  ? h('div', {
573
580
  class: 'vxe-image-preview--next-btn',
574
- onClick () {
575
- handleChange(true)
581
+ onClick (evnt) {
582
+ handleChangeEvent(evnt, true)
576
583
  }
577
584
  }, [
578
585
  h('i', {
@@ -3,7 +3,7 @@ import { VxeUI } from '@vxe-ui/core'
3
3
  import VxeImagePreviewComponent from './preview'
4
4
  import XEUtils from 'xe-utils'
5
5
 
6
- import type { VxeImageDefines } from '../../../types'
6
+ import type { VxeImageDefines, VxeImagePreviewDefines } from '../../../types'
7
7
 
8
8
  export const openPreviewImage: VxeImageDefines.PreviewImageFunction = (options) => {
9
9
  if (VxeUI.modal) {
@@ -11,6 +11,7 @@ export const openPreviewImage: VxeImageDefines.PreviewImageFunction = (options)
11
11
  escClosable: true
12
12
  }, options)
13
13
  const { urlList, activeIndex } = opts
14
+ const { rotate, change } = opts.events || {}
14
15
  const modalId = XEUtils.uniqueId('image-preview')
15
16
  VxeUI.modal.open({
16
17
  id: modalId,
@@ -37,6 +38,16 @@ export const openPreviewImage: VxeImageDefines.PreviewImageFunction = (options)
37
38
  downloadMethod: opts.downloadMethod,
38
39
  onClose () {
39
40
  VxeUI.modal.close(modalId)
41
+ },
42
+ onChange (eventParams: VxeImagePreviewDefines.ChangeEventParams) {
43
+ if (change) {
44
+ change.call(this, eventParams)
45
+ }
46
+ },
47
+ onRotate (eventParams: VxeImagePreviewDefines.RotateEventParams) {
48
+ if (rotate) {
49
+ rotate.call(this, eventParams)
50
+ }
40
51
  }
41
52
  })
42
53
  }
@@ -1,6 +1,7 @@
1
1
  import { RenderFunction, SetupContext, Ref } from 'vue'
2
2
  import { DefineVxeComponentApp, DefineVxeComponentOptions, DefineVxeComponentInstance, VxeComponentBaseOptions, VxeComponentEventParams, ValueOf, VxeComponentSizeType } from '@vxe-ui/core'
3
3
  import { VxeImagePreviewPropTypes } from './image-preview'
4
+ import { VxeImagePropTypes } from './image'
4
5
 
5
6
  /* eslint-disable no-use-before-define,@typescript-eslint/ban-types */
6
7
 
@@ -37,6 +38,7 @@ export namespace VxeImageGroupPropTypes {
37
38
  export type ToolbarConfig = VxeImagePreviewPropTypes.ToolbarConfig
38
39
  export type ShowPrintButton = boolean
39
40
  export type ShowDownloadButton = boolean
41
+ export type GetThumbnailUrlMethod = VxeImagePropTypes.GetThumbnailUrlMethod
40
42
  }
41
43
 
42
44
  export type VxeImageGroupProps = {
@@ -47,6 +49,7 @@ export type VxeImageGroupProps = {
47
49
  toolbarConfig?: VxeImageGroupPropTypes.ToolbarConfig
48
50
  showPrintButton?: VxeImageGroupPropTypes.ShowPrintButton
49
51
  showDownloadButton?: VxeImageGroupPropTypes.ShowDownloadButton
52
+ getThumbnailUrlMethod?: VxeImageGroupPropTypes.GetThumbnailUrlMethod
50
53
  }
51
54
 
52
55
  export interface ImageGroupPrivateComputed {
@@ -67,7 +70,9 @@ export interface ImageGroupPrivateMethods {
67
70
  export interface VxeImageGroupPrivateMethods extends ImageGroupPrivateMethods { }
68
71
 
69
72
  export type VxeImageGroupEmits = [
70
- 'click'
73
+ 'click',
74
+ 'change',
75
+ 'rotate'
71
76
  ]
72
77
 
73
78
  export namespace VxeImageGroupDefines {
@@ -75,21 +80,37 @@ export namespace VxeImageGroupDefines {
75
80
  $imageGroup: VxeImageGroupConstructor
76
81
  }
77
82
 
78
- export interface ClickEventParams {
83
+ export interface ClickEventParams extends ImageGroupEventParams {
79
84
  url: string
80
85
  }
86
+
87
+ export interface ChangeEventParams extends ImageGroupEventParams {
88
+ url: string
89
+ activeIndex: number
90
+ }
91
+
92
+ export interface RotateEventParams extends ImageGroupEventParams {
93
+ url: string
94
+ rotateValue: number
95
+ }
81
96
  }
82
97
 
83
98
  export type VxeImageGroupEventProps = {
84
99
  onClick?: VxeImageGroupEvents.Click
100
+ onChange?: VxeImageGroupEvents.Change
101
+ onRotate?: VxeImageGroupEvents.Rotate
85
102
  }
86
103
 
87
104
  export interface VxeImageGroupListeners {
88
105
  click?: VxeImageGroupEvents.Click
106
+ change?: VxeImageGroupEvents.Change
107
+ rotate?: VxeImageGroupEvents.Rotate
89
108
  }
90
109
 
91
110
  export namespace VxeImageGroupEvents {
92
111
  export type Click = (params: VxeImageGroupDefines.ClickEventParams) => void
112
+ export type Change = (params: VxeImageGroupDefines.ChangeEventParams) => void
113
+ export type Rotate = (params: VxeImageGroupDefines.RotateEventParams) => void
93
114
  }
94
115
 
95
116
  export namespace VxeImageGroupSlotTypes {
@@ -113,6 +113,7 @@ export type VxeImagePreviewEmits = [
113
113
  'change',
114
114
  'download',
115
115
  'download-fail',
116
+ 'rotate',
116
117
  'close'
117
118
  ]
118
119
 
@@ -124,22 +125,31 @@ export namespace VxeImagePreviewDefines {
124
125
  export type ToolbarCode = 'zoomOut' | 'zoomIn' | 'pctFull' | 'pct11' | 'rotateLeft' | 'rotateRight' | 'print' | 'download'
125
126
 
126
127
  export type ChangeParams = {
127
- checklist: any[]
128
+ url: string
129
+ activeIndex: number
128
130
  }
129
131
  export interface ChangeEventParams extends ImagePreviewEventParams, ChangeParams { }
132
+
133
+ export interface RotateEventParams extends ImagePreviewEventParams {
134
+ url: string
135
+ rotateValue: number
136
+ }
130
137
  }
131
138
 
132
139
  export type VxeImagePreviewEventProps = {
133
140
  onChange?: VxeImagePreviewEvents.Change
141
+ onRotate?: VxeImagePreviewEvents.Rotate
134
142
  }
135
143
 
136
144
  export interface VxeImagePreviewListeners {
137
145
  change?: VxeImagePreviewEvents.Change
146
+ rotate?: VxeImagePreviewEvents.Rotate
138
147
  }
139
148
 
140
149
  export namespace VxeImagePreviewEvents {
141
150
  export type Change = (params: VxeImagePreviewDefines.ChangeEventParams) => void
142
- }
151
+ export type Rotate = (params: VxeImagePreviewDefines.RotateEventParams) => void
152
+ }
143
153
 
144
154
  export namespace VxeImagePreviewSlotTypes {
145
155
  export interface DefaultSlotParams {
@@ -1,6 +1,6 @@
1
1
  import { RenderFunction, SetupContext, Ref } from 'vue'
2
2
  import { DefineVxeComponentApp, DefineVxeComponentOptions, DefineVxeComponentInstance, VxeComponentBaseOptions, VxeComponentEventParams, ValueOf, VxeComponentSizeType } from '@vxe-ui/core'
3
- import { VxeImagePreviewProps, VxeImagePreviewPropTypes } from './image-preview'
3
+ import { VxeImagePreviewProps, VxeImagePreviewPropTypes, VxeImagePreviewListeners } from './image-preview'
4
4
 
5
5
  /* eslint-disable no-use-before-define,@typescript-eslint/ban-types */
6
6
 
@@ -40,6 +40,10 @@ export namespace VxeImagePropTypes {
40
40
  export type ShowPrintButton = boolean
41
41
  export type ShowDownloadButton = boolean
42
42
  export type Size = VxeComponentSizeType
43
+ export type GetThumbnailUrlMethod = ((params: {
44
+ $image: VxeImageConstructor
45
+ url: string
46
+ }) => string)
43
47
  }
44
48
 
45
49
  export interface VxeImageProps {
@@ -56,6 +60,7 @@ export interface VxeImageProps {
56
60
  showPrintButton?: VxeImagePropTypes.ShowPrintButton
57
61
  showDownloadButton?: VxeImagePropTypes.ShowDownloadButton
58
62
  size?: VxeImagePropTypes.Size
63
+ getThumbnailUrlMethod?: VxeImagePropTypes.GetThumbnailUrlMethod
59
64
  }
60
65
 
61
66
  export interface ImagePrivateComputed {
@@ -74,7 +79,9 @@ export interface ImagePrivateMethods {}
74
79
  export interface VxeImagePrivateMethods extends ImagePrivateMethods { }
75
80
 
76
81
  export type VxeImageEmits = [
77
- 'click'
82
+ 'click',
83
+ 'change',
84
+ 'rotate'
78
85
  ]
79
86
 
80
87
  export namespace VxeImageDefines {
@@ -82,26 +89,43 @@ export namespace VxeImageDefines {
82
89
  $image: VxeImageConstructor
83
90
  }
84
91
 
85
- export interface ClickEventParams {
92
+ export interface ClickEventParams extends ImageEventParams {
93
+ url: string
94
+ }
95
+
96
+ export interface ChangeEventParams extends ImageEventParams {
97
+ url: string
98
+ activeIndex: number
99
+ }
100
+
101
+ export interface RotateEventParams extends ImageEventParams {
86
102
  url: string
103
+ rotateValue: number
87
104
  }
88
105
 
89
106
  export type PreviewImageFunction = (options: VxeImagePreviewProps & {
90
107
  activeIndex?: VxeImagePreviewPropTypes.ModelValue
91
108
  escClosable?: boolean
109
+ events?: VxeImagePreviewListeners
92
110
  }) => Promise<any>
93
111
  }
94
112
 
95
113
  export type VxeImageEventProps = {
96
114
  onClick?: VxeImageEvents.Click
115
+ onChange?: VxeImageEvents.Change
116
+ onRotate?: VxeImageEvents.Rotate
97
117
  }
98
118
 
99
119
  export interface VxeImageListeners {
100
120
  click?: VxeImageEvents.Click
121
+ change?: VxeImageEvents.Change
122
+ rotate?: VxeImageEvents.Rotate
101
123
  }
102
124
 
103
125
  export namespace VxeImageEvents {
104
126
  export type Click = (params: VxeImageDefines.ClickEventParams) => void
127
+ export type Change = (params: VxeImageDefines.ChangeEventParams) => void
128
+ export type Rotate = (params: VxeImageDefines.RotateEventParams) => void
105
129
  }
106
130
 
107
131
  export namespace VxeImageSlotTypes {