vxe-pc-ui 4.13.25 → 4.13.26
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/icon/style.css +1 -1
- package/es/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/es/upload/src/upload.js +4 -2
- package/lib/icon/style/style.css +1 -1
- package/lib/icon/style/style.min.css +1 -1
- package/lib/index.umd.js +6 -4
- package/lib/index.umd.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/ui/index.js +1 -1
- package/lib/ui/index.min.js +1 -1
- package/lib/ui/src/log.js +1 -1
- package/lib/ui/src/log.min.js +1 -1
- package/lib/upload/src/upload.js +4 -2
- package/lib/upload/src/upload.min.js +1 -1
- package/package.json +1 -1
- package/packages/upload/src/upload.ts +4 -2
- package/types/components/table-plugins/extend-cell-area.d.ts +6 -0
- package/types/components/table.d.ts +1 -1
- /package/es/icon/{iconfont.1776738679571.ttf → iconfont.1776850637104.ttf} +0 -0
- /package/es/icon/{iconfont.1776738679571.woff → iconfont.1776850637104.woff} +0 -0
- /package/es/icon/{iconfont.1776738679571.woff2 → iconfont.1776850637104.woff2} +0 -0
- /package/es/{iconfont.1776738679571.ttf → iconfont.1776850637104.ttf} +0 -0
- /package/es/{iconfont.1776738679571.woff → iconfont.1776850637104.woff} +0 -0
- /package/es/{iconfont.1776738679571.woff2 → iconfont.1776850637104.woff2} +0 -0
- /package/lib/icon/style/{iconfont.1776738679571.ttf → iconfont.1776850637104.ttf} +0 -0
- /package/lib/icon/style/{iconfont.1776738679571.woff → iconfont.1776850637104.woff} +0 -0
- /package/lib/icon/style/{iconfont.1776738679571.woff2 → iconfont.1776850637104.woff2} +0 -0
- /package/lib/{iconfont.1776738679571.ttf → iconfont.1776850637104.ttf} +0 -0
- /package/lib/{iconfont.1776738679571.woff → iconfont.1776850637104.woff} +0 -0
- /package/lib/{iconfont.1776738679571.woff2 → iconfont.1776850637104.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.13.
|
|
29
|
+
const version = exports.version = "4.13.26";
|
|
30
30
|
_core.VxeUI.uiVersion = version;
|
|
31
31
|
_core.VxeUI.dynamicApp = _dynamics.dynamicApp;
|
|
32
32
|
function config(options) {
|
package/lib/ui/index.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
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");let version=exports.version="4.13.25";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:{},backtop:{showIcon:!0,showContent:!0,showTop:!0,showBottom:!0,shadow:!0,threshold:20},badge:{},breadcrumb:{separator:"/"},breadcrumbItem:{},button:{trigger:"hover",prefixTooltip:{enterable:!0},suffixTooltip:{enterable:!0},showDropdownIcon:!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:{},cascader:{autoClose:!0},checkbox:{},checkboxButton:{},checkboxGroup:{},col:{},collapse:{padding:!0,expandConfig:{showIcon:!0}},collapsePane:{},contextMenu:{autoLocate:!0},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:{showErrorMessage:!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:{draggable:null,showPreview:!0,showPrintButton:!0},imageGroup:{showPreview:!0,showPrintButton:!0},imagePreview:{showPrintButton:!0,maskClosable:!0},input:{startDate:new Date(1900,0,1),endDate:new Date(2100,0,1),startDay:1,selectDay:1,digits:2,controls:!0},layoutAside:{},layoutBody:{backtopConfig:{}},layoutContainer:{},layoutFooter:{},layoutHeader:{},link:{underline:!0},listDesign:{height:400,showPc:!0},listView:{},list:{virtualYConfig:{enabled:!0,gt:100}},loading:{showIcon:!0,showText:!0},menu:{},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,isArrow:!0}},optgroup:{},option:{},pager:{pageSizePlacement:"top"},print:{pageStyle:{}},passwordInput:{controls:!0},printPageBreak:{},pulldown:{},radio:{strict:!0},radioButton:{strict:!0},radioGroup:{strict:!0},rate:{},result:{},row:{},segmented:{},select:{multiCharOverflow:8,remoteConfig:{enabled:!0,autoLoad:!0},virtualYConfig:{enabled:!0,gt:50,oSize:2}},splitter:{resize:!0,itemConfig:{minWidth:40,minHeight:40},resizeConfig:{showTip:!0}},splitterPanel:{},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:{copyConfig:{showMessage:!0}},textarea:{resize:"none"},timeline:{},timelineItem:{},tip:{},tooltip:{trigger:"hover",theme:"dark",enterDelay:500,leaveDelay:300,isArrow:!0},tree:{indent:20,minHeight:60,radioConfig:{strict:!0},dragConfig:{showIcon:!0,animation:!0,showGuidesStatus:!0,showDragTip:!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,previewImageConfig:{}},watermark:{rotate:-30,gap:[100,100]},table:{},colgroup:{},column:{},toolbar:{},grid:{},gantt:{}});let 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_VALID_ERROR_ICON:iconPrefix+"warning-circle-fill",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_DRAG:iconPrefix+"drag-handle",TREE_DRAG_STATUS_NODE:iconPrefix+"sort",TREE_DRAG_STATUS_SUB_NODE:iconPrefix+"add-sub",TREE_DRAG_DISABLED:iconPrefix+"no-drop",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",TAG_CLOSE:iconPrefix+"close",TAG_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",BACKTOP_TOP:iconPrefix+"top",CONTEXT_MENU_OPTION_LOADING:iconPrefix+"spinner roll",CONTEXT_MENU_CHILDREN:iconPrefix+"arrow-right"});var _default=exports.default=_core.VxeUI;
|
|
1
|
+
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");let version=exports.version="4.13.26";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:{},backtop:{showIcon:!0,showContent:!0,showTop:!0,showBottom:!0,shadow:!0,threshold:20},badge:{},breadcrumb:{separator:"/"},breadcrumbItem:{},button:{trigger:"hover",prefixTooltip:{enterable:!0},suffixTooltip:{enterable:!0},showDropdownIcon:!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:{},cascader:{autoClose:!0},checkbox:{},checkboxButton:{},checkboxGroup:{},col:{},collapse:{padding:!0,expandConfig:{showIcon:!0}},collapsePane:{},contextMenu:{autoLocate:!0},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:{showErrorMessage:!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:{draggable:null,showPreview:!0,showPrintButton:!0},imageGroup:{showPreview:!0,showPrintButton:!0},imagePreview:{showPrintButton:!0,maskClosable:!0},input:{startDate:new Date(1900,0,1),endDate:new Date(2100,0,1),startDay:1,selectDay:1,digits:2,controls:!0},layoutAside:{},layoutBody:{backtopConfig:{}},layoutContainer:{},layoutFooter:{},layoutHeader:{},link:{underline:!0},listDesign:{height:400,showPc:!0},listView:{},list:{virtualYConfig:{enabled:!0,gt:100}},loading:{showIcon:!0,showText:!0},menu:{},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,isArrow:!0}},optgroup:{},option:{},pager:{pageSizePlacement:"top"},print:{pageStyle:{}},passwordInput:{controls:!0},printPageBreak:{},pulldown:{},radio:{strict:!0},radioButton:{strict:!0},radioGroup:{strict:!0},rate:{},result:{},row:{},segmented:{},select:{multiCharOverflow:8,remoteConfig:{enabled:!0,autoLoad:!0},virtualYConfig:{enabled:!0,gt:50,oSize:2}},splitter:{resize:!0,itemConfig:{minWidth:40,minHeight:40},resizeConfig:{showTip:!0}},splitterPanel:{},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:{copyConfig:{showMessage:!0}},textarea:{resize:"none"},timeline:{},timelineItem:{},tip:{},tooltip:{trigger:"hover",theme:"dark",enterDelay:500,leaveDelay:300,isArrow:!0},tree:{indent:20,minHeight:60,radioConfig:{strict:!0},dragConfig:{showIcon:!0,animation:!0,showGuidesStatus:!0,showDragTip:!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,previewImageConfig:{}},watermark:{rotate:-30,gap:[100,100]},table:{},colgroup:{},column:{},toolbar:{},grid:{},gantt:{}});let 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_VALID_ERROR_ICON:iconPrefix+"warning-circle-fill",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_DRAG:iconPrefix+"drag-handle",TREE_DRAG_STATUS_NODE:iconPrefix+"sort",TREE_DRAG_STATUS_SUB_NODE:iconPrefix+"add-sub",TREE_DRAG_DISABLED:iconPrefix+"no-drop",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",TAG_CLOSE:iconPrefix+"close",TAG_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",BACKTOP_TOP:iconPrefix+"top",CONTEXT_MENU_OPTION_LOADING:iconPrefix+"spinner roll",CONTEXT_MENU_CHILDREN: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.13.
|
|
8
|
+
const version = `ui v${"4.13.26"}`;
|
|
9
9
|
const warnLog = exports.warnLog = _core.log.create('warn', version);
|
|
10
10
|
const errLog = exports.errLog = _core.log.create('error', version);
|
package/lib/ui/src/log.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,"__esModule",{value:!0}),exports.warnLog=exports.errLog=void 0;var _core=require("@vxe-ui/core");let version="ui v4.13.
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:!0}),exports.warnLog=exports.errLog=void 0;var _core=require("@vxe-ui/core");let version="ui v4.13.26",warnLog=exports.warnLog=_core.log.create("warn",version),errLog=exports.errLog=_core.log.create("error",version);
|
package/lib/upload/src/upload.js
CHANGED
|
@@ -630,6 +630,7 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
|
|
|
630
630
|
Object.assign(item, res);
|
|
631
631
|
} else {
|
|
632
632
|
reactData.fileList = reactData.fileList.filter(obj => getFieldKey(obj) !== fileKey);
|
|
633
|
+
delete fileCacheMaps[fileKey];
|
|
633
634
|
}
|
|
634
635
|
dispatchEvent('upload-error', {
|
|
635
636
|
option: item,
|
|
@@ -811,10 +812,11 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
|
|
|
811
812
|
}, evnt);
|
|
812
813
|
});
|
|
813
814
|
Promise.all(urlMode ? uploadPromiseRests : []).then(() => {
|
|
814
|
-
|
|
815
|
+
const restFileList = reactData.fileList;
|
|
816
|
+
handleChange(restFileList);
|
|
815
817
|
// 自动更新校验状态
|
|
816
818
|
if ($xeForm && formItemInfo) {
|
|
817
|
-
$xeForm.triggerItemEvent(evnt, formItemInfo.itemConfig.field,
|
|
819
|
+
$xeForm.triggerItemEvent(evnt, formItemInfo.itemConfig.field, restFileList);
|
|
818
820
|
}
|
|
819
821
|
});
|
|
820
822
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _vue=require("vue"),_comp=require("../../ui/src/comp"),_xeUtils=_interopRequireDefault(require("xe-utils")),_ui=require("../../ui"),_vn=require("../../ui/src/vn"),_log=require("../../ui/src/log"),_dom=require("../../ui/src/dom"),_util=require("./util"),_button=_interopRequireDefault(require("../../button/src/button"));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function createReactData(){return{isDragUploadStatus:!1,showMorePopup:!1,isActivated:!1,fileList:[],fileCacheMaps:{},isDragMove:!1,dragIndex:-1,dragTipText:""}}function createInternalData(){return{moreId:_xeUtils.default.uniqueId("upload"),imagePreviewTypes:["jpg","jpeg","png","gif"],prevDragIndex:-1}}var _default=exports.default=(0,_comp.defineVxeComponent)({name:"VxeUpload",props:{modelValue:[Array,String,Object],showList:{type:Boolean,default:()=>(0,_ui.getConfig)().upload.showList},moreConfig:Object,readonly:{type:Boolean,default:null},disabled:{type:Boolean,default:null},autoSubmit:{type:Boolean,default:()=>(0,_ui.getConfig)().upload.autoSubmit},mode:{type:String,default:()=>(0,_ui.getConfig)().upload.mode},imageTypes:{type:Array,default:()=>_xeUtils.default.clone((0,_ui.getConfig)().upload.imageTypes,!0)},imageConfig:{type:Object,default:()=>_xeUtils.default.clone((0,_ui.getConfig)().upload.imageConfig,!0)},imageStyle:{type:Object,default:()=>_xeUtils.default.clone((0,_ui.getConfig)().upload.imageStyle,!0)},fileTypes:{type:Array,default:()=>_xeUtils.default.clone((0,_ui.getConfig)().upload.fileTypes,!0)},dragSort:Boolean,dragToUpload:{type:Boolean,default:()=>_xeUtils.default.clone((0,_ui.getConfig)().upload.dragToUpload,!0)},dragPlaceholder:{type:String,default:()=>(0,_ui.getConfig)().upload.dragPlaceholder},pasteToUpload:{type:Boolean,default:()=>_xeUtils.default.clone((0,_ui.getConfig)().upload.pasteToUpload,!0)},keyField:String,singleMode:Boolean,urlMode:Boolean,urlArgs:{type:Boolean,default:()=>(0,_ui.getConfig)().upload.urlArgs},multiple:Boolean,limitSize:{type:[String,Number],default:()=>(0,_ui.getConfig)().upload.limitSize},showLimitSize:{type:Boolean,default:()=>(0,_ui.getConfig)().upload.showLimitSize},limitSizeText:{type:[String,Number,Function],default:()=>(0,_ui.getConfig)().upload.limitSizeText},limitCount:{type:[String,Number],default:()=>(0,_ui.getConfig)().upload.limitCount},showLimitCount:{type:Boolean,default:()=>(0,_ui.getConfig)().upload.showLimitCount},limitCountText:{type:[String,Number,Function],default:()=>(0,_ui.getConfig)().upload.limitCountText},nameField:{type:String,default:()=>(0,_ui.getConfig)().upload.nameField},typeField:{type:String,default:()=>(0,_ui.getConfig)().upload.typeField},urlField:{type:String,default:()=>(0,_ui.getConfig)().upload.urlField},sizeField:{type:String,default:()=>(0,_ui.getConfig)().upload.sizeField},showErrorStatus:{type:Boolean,default:()=>(0,_ui.getConfig)().upload.showErrorStatus},showProgress:{type:Boolean,default:()=>(0,_ui.getConfig)().upload.showProgress},progressText:{type:[String,Number,Function],default:()=>(0,_ui.getConfig)().upload.progressText},previewImageConfig:Object,showSubmitButton:Boolean,autoHiddenButton:{type:Boolean,default:()=>(0,_ui.getConfig)().upload.autoHiddenButton},showUploadButton:{type:Boolean,default:()=>(0,_ui.getConfig)().upload.showUploadButton},buttonText:{type:[String,Number,Function],default:()=>(0,_ui.getConfig)().upload.buttonText},buttonIcon:{type:String,default:()=>(0,_ui.getConfig)().upload.buttonIcon},showButtonText:{type:Boolean,default:()=>(0,_ui.getConfig)().upload.showButtonText},showButtonIcon:{type:Boolean,default:()=>(0,_ui.getConfig)().upload.showButtonIcon},showRemoveButton:{type:Boolean,default:()=>(0,_ui.getConfig)().upload.showRemoveButton},showDownloadButton:{type:Boolean,default:()=>(0,_ui.getConfig)().upload.showDownloadButton},showPreview:{type:Boolean,default:()=>(0,_ui.getConfig)().upload.showPreview},showTip:{type:Boolean,default:()=>null},maxSimultaneousUploads:{type:Number,default:()=>(0,_ui.getConfig)().upload.maxSimultaneousUploads},tipText:[String,Number,Function],hintText:String,previewMethod:Function,beforeSelectMethod:Function,uploadMethod:Function,beforeRemoveMethod:Function,removeMethod:Function,beforeDownloadMethod:Function,downloadMethod:Function,getUrlMethod:Function,getThumbnailUrlMethod:Function,size:{type:String,default:()=>(0,_ui.getConfig)().upload.size||(0,_ui.getConfig)().size}},emits:["update:modelValue","add","remove","remove-fail","download","download-fail","upload-success","upload-error","sort-dragend","more-visible"],setup(S,e){let{emit:i,slots:D}=e,C=(0,_vue.inject)("$xeForm",null),U=(0,_vue.inject)("xeFormItemInfo",null),l=(0,_vue.inject)("$xeTable",null);var t=_xeUtils.default.uniqueId();let G=(0,_ui.useSize)(S).computeSize,m=(0,_vue.ref)(),_=(0,_vue.ref)(),c=(0,_vue.ref)(),f=(0,_vue.ref)(),B=(0,_vue.reactive)(createReactData()),r=createInternalData(),a={refElem:m},L=(0,_vue.computed)(()=>{var e=S.readonly;return null===e?!!C&&C.props.readonly:e}),P=(0,_vue.computed)(()=>{var e=S.disabled;return null===e?!!C&&C.props.disabled:e}),E=(0,_vue.computed)(()=>S.keyField||"_X_KEY"),h=(0,_vue.computed)(()=>"image"===S.mode),V=(0,_vue.computed)(()=>S.nameField||"name"),F=(0,_vue.computed)(()=>S.typeField||"type"),M=(0,_vue.computed)(()=>S.urlField||"url"),T=(0,_vue.computed)(()=>S.sizeField||"size"),H=(0,_vue.computed)(()=>1024*_xeUtils.default.toNumber(S.limitSize)*1024),O=(0,_vue.computed)(()=>S.multiple?_xeUtils.default.toNumber(S.limitCount):1),Y=(0,_vue.computed)(()=>{var e=S.showDownloadButton;return Object.assign({showDownloadButton:e},(0,_ui.getConfig)().upload.previewImageConfig,S.previewImageConfig)}),Q=(0,_vue.computed)(()=>{var e=S.multiple,t=B.fileList,o=O.value;return e?!o||t.length>=o:1<=t.length}),X=(0,_vue.computed)(()=>{var e=_xeUtils.default.toNumber(S.limitSize);return e?1048576<e?e/1048576+"T":1024<e?e/1024+"G":e+"M":""}),W=(0,_vue.computed)(()=>{var{showTip:e,tipText:t}=S;return _xeUtils.default.isBoolean(e)||(e=(0,_ui.getConfig)().upload.showTip,_xeUtils.default.isBoolean(e))?e:!!t}),K=(0,_vue.computed)(()=>{var{limitSize:e,fileTypes:t,multiple:o,limitCount:i}=S,l=S.tipText||S.hintText,a=h.value,u=X.value;return _xeUtils.default.isString(l)?l:_xeUtils.default.isFunction(l)?""+l({}):(l=[],a?(o&&i&&l.push((0,_ui.getI18n)("vxe.upload.imgCountHint",[i])),e&&u&&l.push((0,_ui.getI18n)("vxe.upload.imgSizeHint",[u]))):(t&&t.length&&l.push((0,_ui.getI18n)("vxe.upload.fileTypeHint",[t.join("/")])),e&&u&&l.push((0,_ui.getI18n)("vxe.upload.fileSizeHint",[u])),o&&i&&l.push((0,_ui.getI18n)("vxe.upload.fileCountHint",[i]))),l.join((0,_ui.getI18n)("vxe.base.comma")))}),u=(0,_vue.computed)(()=>Object.assign({},S.imageConfig||S.imageStyle)),J=(0,_vue.computed)(()=>{var{width:e,height:t}=u.value,o={};return e&&(o.width=(0,_dom.toCssUnit)(e)),t&&(o.height=(0,_dom.toCssUnit)(t)),o}),Z=(0,_vue.computed)(()=>Object.assign({showMoreButton:!0},S.moreConfig)),n={},A={xID:t,props:S,context:e,reactData:B,internalData:r,getRefMaps:()=>a,getComputeMaps:()=>n},N=()=>_xeUtils.default.uniqueId(),z=e=>e[E.value],d=()=>{var{modelValue:e,multiple:t}=S,o=L.value;let l=E.value,a=V.value,u=F.value,n=M.value,r=T.value;e=e?(e?_xeUtils.default.isArray(e)?e:[e]:[]).map(t=>{if(!t||_xeUtils.default.isString(t)){var o=""+(t||""),i=_xeUtils.default.parseUrl(t);let e=(i?i.searchQuery[a]:"")||decodeURIComponent(""+(o||"")).split("/").pop()||"";return{[a]:e,[u]:(i?i.searchQuery[u]:"")||j(e),[n]:o,[r]:_xeUtils.default.toNumber(i?i.searchQuery[r]:0)||0,[l]:N()}}let e=t[a]||"";return t[a]=e,t[u]=t[u]||j(e),t[n]=t[n]||"",t[r]=t[r]||0,t[l]=t[l]||N(),t}):[];B.fileList=o||t?e:e.slice(0,1)},j=e=>{var t=e.lastIndexOf(".");return 0<t?e.substring(t+1).toLowerCase():""},k=(e,t,o)=>{i(e,(0,_ui.createEvent)(o,{$upload:A},t))},s=e=>{i("update:modelValue",e)},R=e=>{let{singleMode:t,urlMode:o,urlArgs:i}=S,l=M.value,a=V.value,u=e?e.slice(0):[];o&&(u=u.map(e=>{var t=e[l];if(t&&i){var o=_xeUtils.default.parseUrl(t);if(!o.searchQuery[a]&&-1===t.indexOf("blob:"))return""+t+(-1===t.indexOf("?")?"?":"&")+a+"="+encodeURIComponent(e[a]||"")}return t})),s(t?u[0]||null:u)},$=e=>{var t=S.getUrlMethod||(0,_ui.getConfig)().upload.getUrlMethod,o=M.value;return t?t({$upload:A,option:e}):e[o]},ee=t=>{var{imageTypes:e,showDownloadButton:o}=S;let i=F.value;var l=Y.value;let a=S.beforeDownloadMethod||(0,_ui.getConfig)().upload.beforeDownloadMethod;var u=r.imagePreviewTypes;u.concat(e||[]).some(e=>(""+e).toLowerCase()===(""+t[i]).toLowerCase())&&_ui.VxeUI.previewImage&&_ui.VxeUI.previewImage(Object.assign(Object.assign({},l),{urlList:[$(t)],showDownloadButton:o,beforeDownloadMethod:a?()=>a({$upload:A,option:t}):void 0}))},q=(o,e)=>{let i=S.showErrorStatus,l=z(o);var t=S.uploadMethod||(0,_ui.getConfig)().upload.uploadMethod;return t?Promise.resolve(t({$upload:A,file:e,option:o,updateProgress(e){var t=B.fileCacheMaps,t=t[z(o)];t&&(t.percent=Math.max(0,Math.min(99,_xeUtils.default.toNumber(e))))}})).then(e=>{var t=B.fileCacheMaps,t=t[l];t&&(t.percent=100,t.status="success"),Object.assign(o,e),k("upload-success",{option:o,data:e},null)}).catch(e=>{var t=B.fileCacheMaps,t=t[l];t&&(t.status="error"),i?Object.assign(o,e):B.fileList=B.fileList.filter(e=>z(e)!==l),k("upload-error",{option:o,data:e},null)}).finally(()=>{var e=B.fileCacheMaps,e=e[l];e&&(e.loading=!1)}):(t=B.fileCacheMaps,(e=t[l])&&(e.loading=!1),Promise.resolve())},te=e=>{let{uploadMethod:t,urlMode:o}=S;var i,l=B.fileCacheMaps,l=l[z(e)];(t||(0,_ui.getConfig)().upload.uploadMethod)&&l&&(i=l.file,l.loading=!0,l.status="pending",l.percent=0,q(e,i).then(()=>{o&&R(B.fileList)}))},p=(t,o)=>{let{multiple:e,urlMode:i,showLimitSize:l,limitSizeText:a,showLimitCount:u,limitCountText:n,autoSubmit:r}=S;var d=B.fileList;let s=S.beforeSelectMethod||(0,_ui.getConfig)().upload.beforeSelectMethod,p=S.uploadMethod||(0,_ui.getConfig)().upload.uploadMethod,v=E.value,g=V.value,m=F.value,_=M.value,c=T.value;var f=H.value;let h=O.value;var x=X.value;let w=t;if(e&&h){if(u&&d.length>=h)return void(_ui.VxeUI.modal&&_ui.VxeUI.modal.notification({title:(0,_ui.getI18n)("vxe.modal.errTitle"),status:"error",content:n?""+(_xeUtils.default.isFunction(n)?n({maxCount:h}):n):(0,_ui.getI18n)("vxe.upload.overCountErr",[h])}));let t=w.length-(h-d.length);if(u&&0<t){let e=w.slice(h-d.length);n?_ui.VxeUI.modal.notification({title:(0,_ui.getI18n)("vxe.modal.errTitle"),status:"error",content:""+(_xeUtils.default.isFunction(n)?n({maxCount:h}):n)}):_ui.VxeUI.modal&&_ui.VxeUI.modal.notification({title:(0,_ui.getI18n)("vxe.modal.errTitle"),status:"error",width:null,slots:{default(){return(0,_vue.h)("div",{class:"vxe-upload--file-message-over-error"},[(0,_vue.h)("div",{},(0,_ui.getI18n)("vxe.upload.overCountExtraErr",[h,t])),(0,_vue.h)("div",{class:"vxe-upload--file-message-over-extra"},e.map((e,t)=>(0,_vue.h)("div",{key:t,class:"vxe-upload--file-message-over-extra-item"},e.name)))])}}})}w=w.slice(0,h-d.length)}if(l&&f)for(let e=0;e<t.length;e++)if(t[0].size>f)return void(_ui.VxeUI.modal&&_ui.VxeUI.modal.notification({title:(0,_ui.getI18n)("vxe.modal.errTitle"),status:"error",content:a?""+(_xeUtils.default.isFunction(a)?a({maxSize:f}):a):(0,_ui.getI18n)("vxe.upload.overSizeErr",[x])}));let y=Object.assign({},B.fileCacheMaps),b=e?d:[],I=[];w.forEach(e=>{var t=e.name,o=N(),t={[g]:t,[m]:j(t),[c]:e.size,[_]:URL.createObjectURL(e),[v]:o},o=(p&&(y[o]={file:e,loading:!!r,status:"pending",percent:0}),(0,_vue.reactive)(t));s&&!s({$upload:A,file:e})||(p&&r&&I.push(q(o,e)),b.push(o))}),B.fileList=b,B.fileCacheMaps=y,b.forEach(e=>{k("add",{option:e},o)}),Promise.all(i?I:[]).then(()=>{R(b),C&&U&&C.triggerItemEvent(o,U.itemConfig.field,b)})},v=t=>{var{multiple:e,imageTypes:o,fileTypes:i}=S,l=P.value,a=h.value;return l?Promise.resolve({status:!1,files:[],file:null}):(0,_util.readLocalFile)({multiple:e,types:a?o:i}).then(e=>(p(e.files,t),e))},oe=e=>{v(e).catch(()=>{})},g=(e,t,o)=>{var i=B.fileList;i.splice(o,1),R(i),C&&U&&C.triggerItemEvent(e,U.itemConfig.field,i),k("remove",{option:t},e)},ie=(t,o,i)=>{var e=S.beforeRemoveMethod||(0,_ui.getConfig)().upload.beforeRemoveMethod;let l=S.removeMethod||(0,_ui.getConfig)().upload.removeMethod;Promise.resolve(!e||e({$upload:A,option:o})).then(e=>{e?l?Promise.resolve(l({$upload:A,option:o})).then(()=>{g(t,o,i)}).catch(e=>e):g(t,o,i):k("remove-fail",{option:o},t)})},le=(e,t)=>{k("download",{option:t},e)},ae=e=>{var t,o,i,l=e.currentTarget,{clientX:e,clientY:a}=e;l&&({x:l,y:t,height:o,width:i}=l.getBoundingClientRect(),e<l||l+i<e||a<t||t+o<a)&&(B.isDragUploadStatus=!1)},ue=e=>{var t=e.dataTransfer;t&&(t=t.items,t)&&t.length&&(e.preventDefault(),B.isDragUploadStatus=!0)},ne=(e,t)=>{let{imageTypes:i,fileTypes:l}=S;var a=r.imagePreviewTypes;if(h.value){let o=a.concat(i&&i.length?i:[]);t=t.filter(e=>{let t=(""+(e.type.split("/")[1]||"")).toLowerCase();return!!o.some(e=>(""+e).toLowerCase()===t)})}else if(l&&l.length){let o=[];if(t.forEach(e=>{let t=j(e.name);l.some(e=>(""+e).toLowerCase()===t)||o.push(t)}),o.length)return void(_ui.VxeUI.modal&&_ui.VxeUI.modal.message({content:(0,_ui.getI18n)("vxe.error.notType",[o.join(", ")]),status:"error"}))}t.length?p(t,e):_ui.VxeUI.modal&&_ui.VxeUI.modal.notification({title:(0,_ui.getI18n)("vxe.modal.errTitle"),status:"error",content:(0,_ui.getI18n)("vxe.upload.uploadTypeErr")})},re=e=>{var t=e.dataTransfer;t&&(t=t.items,t)&&t.length&&(e.preventDefault(),(t=de(t)).length)&&ne(e,t),B.isDragUploadStatus=!1},de=e=>{let t=[];return _xeUtils.default.arrayEach(e,e=>{e=e.getAsFile();e&&t.push(e)}),t},x=e=>{let v=L.value,g=h.value;e=e.$event;_ui.VxeUI.modal&&(_ui.VxeUI.modal.open({id:r.moreId,title:v?(0,_ui.getI18n)("vxe.upload.morePopup.readTitle"):(0,_ui.getI18n)("vxe.upload.morePopup."+(g?"imageTitle":"fileTitle")),width:660,height:500,escClosable:!0,showMaximize:!0,resize:!0,maskClosable:!0,slots:{default(){var{showErrorStatus:e,dragToUpload:t,dragSort:o,dragPlaceholder:i}=S,{isActivated:l,isDragMove:a,isDragUploadStatus:u,dragIndex:n}=B;let r=B.fileList;var d=P.value,s=D.moreContent||D["more-content"],p={};return t&&-1===n&&(p.onDragover=ue,p.onDragleave=ae,p.onDrop=re),(0,_vue.h)("div",Object.assign({ref:_,class:["vxe-upload--more-popup",{"is--readonly":v,"is--disabled":d,"is--active":l,"show--error":e,"is--drag":u}]},p),s?(0,_vn.getSlotVNs)(s({options:r})):[g?o?(0,_vue.h)(_vue.TransitionGroup,{name:"vxe-upload--drag-list"+(a?"":"-disabled"),tag:"div",class:"vxe-upload--image-more-list"},{default:()=>b(r,!0).concat(I(!0))}):(0,_vue.h)("div",{class:"vxe-upload--image-more-list"},b(r,!0).concat(I(!0))):(0,_vue.h)("div",{class:"vxe-upload--file-more-list"},[y(!0),o?(0,_vue.h)(_vue.TransitionGroup,{name:"vxe-upload--drag-list"+(a?"":"-disabled"),tag:"div",class:"vxe-upload--file-list"},{default:()=>w(r,!1)}):(0,_vue.h)("div",{class:"vxe-upload--file-list"},w(r,!0))]),o?(0,_vue.h)("div",{ref:f,class:"vxe-upload--drag-line"}):(0,_ui.renderEmptyElement)(A),u?(0,_vue.h)("div",{class:"vxe-upload--drag-placeholder"},i||(0,_ui.getI18n)("vxe.upload.dragPlaceholder")):(0,_ui.renderEmptyElement)(A)])}},onShow(){B.showMorePopup=!0},onHide({$event:e}){B.showMorePopup=!1,e&&k("more-visible",{visible:!1},e)}}),e)&&k("more-visible",{visible:!0},e)},se=(e,t,o)=>{var i,l=B.showMorePopup,a=m.value,u=_.value,u=l?u:a;u&&(a=u.getBoundingClientRect(),u=c.value,i=f.value,l=l?i:u)&&(i=t.getBoundingClientRect(),l.style.display="block",l.style.top=Math.max(1,i.y-a.y)+"px",l.style.left=Math.max(1,i.x-a.x)+"px",l.style.height=i.height+"px",l.style.width=i.width-1+"px",l.setAttribute("drag-pos",o))},pe=()=>{var e=c.value,t=f.value;e&&(e.style.display=""),t&&(t.style.display="")},ve=e=>{e.stopPropagation(),e.dataTransfer&&e.dataTransfer.setDragImage((0,_dom.getTpImg)(),0,0);let t=e.currentTarget;e=t.parentElement,e=_xeUtils.default.findIndexOf(Array.from(e.children),e=>t===e);B.isDragMove=!0,B.dragIndex=e,setTimeout(()=>{B.isDragMove=!1},500)},ge=o=>{o.stopPropagation(),o.preventDefault();var i=B.dragIndex;if(-1!==i){var l=h.value;let t=o.currentTarget;var a=t.parentElement,a=_xeUtils.default.findIndexOf(Array.from(a.children),e=>t===e);let e="";e=l?o.clientX-t.getBoundingClientRect().x<t.clientWidth/2?"left":"right":o.clientY-t.getBoundingClientRect().y<t.clientHeight/2?"top":"bottom",i===a?se(o,t,e):(se(o,t,e),r.prevDragIndex=a,r.prevDragPos=e)}},me=e=>{var{fileList:t,dragIndex:o}=B,{prevDragIndex:i,prevDragPos:l}=r,a="bottom"===l||"right"===l?1:0,u=t[o];let n=t[i];u&&n&&(t.splice(o,1),i=_xeUtils.default.findIndexOf(t,e=>n===e)+a,t.splice(i,0,u),k("sort-dragend",{oldItem:u,newItem:n,dragPos:l,offsetIndex:a,_index:{newIndex:i,oldIndex:o}},e)),pe(),B.dragIndex=-1},_e=e=>{l&&e.stopPropagation(),B.isActivated=!0},ce=e=>{var t=S.pasteToUpload,o=B.isActivated;o&&t&&(o=e.clipboardData||e.originalEvent.clipboardData)&&(t=o.items,t)&&(o=de(t)).length&&(e.preventDefault(),ne(e,o))},fe=e=>{var t=m.value,o=_.value;let i=(0,_dom.getEventTargetNode)(e,t).flag;!i&&o&&(o=(t=o.parentElement||o)&&t.parentElement,i=(0,_dom.getEventTargetNode)(e,o).flag),B.isActivated=i},he=()=>{B.isActivated=!1};t={dispatchEvent:k,choose(){return v(null)},getPendingFiles(){let{fileList:e,fileCacheMaps:t}=B,o=[];return e.forEach(e=>{e=z(e),e=t[e];e&&"pending"===e.status&&o.push(e.file)}),o},submit(i){var e=S.maxSimultaneousUploads,e=_xeUtils.default.toNumber(e||1)||1;let{fileList:t,fileCacheMaps:l}=B,o=t.filter(e=>{e=z(e),e=l[e];return e&&("pending"===e.status||i&&"error"===e.status)}),a=e=>{var t=z(e),t=l[t];if(t){var o=t.file;if(o&&("pending"===t.status||i&&"error"===t.status))return t.loading=!0,t.percent=0,q(e,o).then(u)}return u()},u=()=>{var e;return o.length?(e=o[0],o.splice(0,1),a(e).then(u)):Promise.resolve()};return Promise.all(o.splice(0,e).map(a)).then(()=>{})},getMoreVisible(){return B.showMorePopup},openMore(){return x({$event:new Event("click")}),(0,_vue.nextTick)()},openMoreByEvent(e){return x({$event:e}),(0,_vue.nextTick)()},closeMore(){return _ui.VxeUI.modal&&_ui.VxeUI.modal.close(r.moreId),(0,_vue.nextTick)()}};Object.assign(A,t,{});let w=(e,r)=>{let{showRemoveButton:d,showDownloadButton:s,showProgress:p,progressText:v,showPreview:g,showErrorStatus:m,dragSort:_,autoSubmit:c,showSubmitButton:f}=S,{fileList:h,fileCacheMaps:x}=B,w=P.value,y=L.value,b=V.value,I=F.value,C=D.option,U=D.action,E=D.corner,M=D.name,T={};return _&&1<e.length&&(T.onDragstart=ve,T.onDragover=ge,T.onDragend=me),e.map((i,t)=>{var e=z(i),o=x[e];let l=!1,a=!1,u=!1;var n=""+(i[b]||"");return o&&(l=o.loading,a="error"===o.status,u="pending"===o.status),(0,_vue.h)("div",Object.assign({key:_?e:t,class:["vxe-upload--file-item",{"is--preview":g,"is--loading":l,"is--pending":u,"is--error":a}],fileid:e,draggable:!!_||null},T),C?(0,_vn.getSlotVNs)(C({option:i,isMoreView:r,options:h})):[(0,_vue.h)("div",{class:"vxe-upload--file-item-icon"},[(0,_vue.h)("i",{class:(0,_ui.getIcon)()["UPLOAD_FILE_TYPE_"+(""+i[I]).toLocaleUpperCase()]||(0,_ui.getIcon)().UPLOAD_FILE_TYPE_DEFAULT})]),(0,_vue.h)("div",{class:"vxe-upload--file-item-name",title:n,onClick(e){var t,o;l||a||(t=i,o=S.previewMethod||(0,_ui.getConfig)().upload.previewMethod,S.showPreview&&(o?o({$upload:A,option:t}):ee(t)))}},M?(0,_vn.getSlotVNs)(M({option:i,isMoreView:r,options:h})):n),l?(0,_vue.h)("div",{class:"vxe-upload--file-item-loading-icon"},[(0,_vue.h)("i",{class:(0,_ui.getIcon)().UPLOAD_LOADING})]):(0,_ui.renderEmptyElement)(A),p&&l&&o?(0,_vue.h)("div",{class:"vxe-upload--file-item-loading-text"},v?_xeUtils.default.toFormatString(""+(_xeUtils.default.isFunction(v)?v({}):v),{percent:o.percent}):(0,_ui.getI18n)("vxe.upload.uploadProgress",[o.percent])):(0,_ui.renderEmptyElement)(A),!l&&(a&&m||u&&f&&!c)?(0,_vue.h)("div",{class:"vxe-upload--file-item-rebtn"},[(0,_vue.h)(_button.default,{icon:a?(0,_ui.getIcon)().UPLOAD_IMAGE_RE_UPLOAD:(0,_ui.getIcon)().UPLOAD_IMAGE_UPLOAD,mode:"text",status:"primary",content:a?(0,_ui.getI18n)("vxe.upload.reUpload"):(0,_ui.getI18n)("vxe.upload.manualUpload"),onClick(){te(i)}})]):(0,_ui.renderEmptyElement)(A),(0,_vue.h)("div",{class:"vxe-upload--file-item-btn-wrapper"},U?(0,_vn.getSlotVNs)(U({option:i,isMoreView:r,options:h,readonly:y})):[E?(0,_vue.h)("div",{class:"vxe-upload--file-item-action"},(0,_vn.getSlotVNs)(E({option:i,isMoreView:r,options:h,readonly:y}))):(0,_ui.renderEmptyElement)(A),!s||l||u?(0,_ui.renderEmptyElement)(A):(0,_vue.h)("div",{class:"vxe-upload--file-item-download-btn",onClick(e){((t,o)=>{var e=S.beforeDownloadMethod||(0,_ui.getConfig)().upload.beforeDownloadMethod;let i=S.downloadMethod||(0,_ui.getConfig)().upload.downloadMethod;Promise.resolve(!e||e({$upload:A,option:o})).then(e=>{e?i?Promise.resolve(i({$upload:A,option:o})).then(()=>{le(t,o)}).catch(e=>e):le(t,o):k("download-fail",{option:o},t)})})(e,i)}},[(0,_vue.h)("i",{class:(0,_ui.getIcon)().UPLOAD_FILE_DOWNLOAD})]),!d||y||w||l?(0,_ui.renderEmptyElement)(A):(0,_vue.h)("div",{class:"vxe-upload--file-item-remove-btn",onClick(e){ie(e,i,t)}},[(0,_vue.h)("i",{class:(0,_ui.getIcon)().UPLOAD_FILE_REMOVE})])])])})},y=e=>{var{showUploadButton:t,buttonText:o,buttonIcon:i,showButtonText:l,showButtonIcon:a,autoHiddenButton:u}=S,n=B.fileList,r=P.value,d=L.value,s=W.value,p=K.value,v=Q.value,g=D.default,m=D.tip||D.hint;return d||!t?(0,_ui.renderEmptyElement)(A):(0,_vue.h)("div",{class:"vxe-upload--file-action"},[u&&v?(0,_ui.renderEmptyElement)(A):(0,_vue.h)("div",{class:"vxe-upload--file-action-btn",onClick:oe},g?(0,_vn.getSlotVNs)(g({isMoreView:e,options:n,$upload:A})):[(0,_vue.h)(_button.default,{class:"vxe-upload--file-action-button",content:e||l?o?""+(_xeUtils.default.isFunction(o)?o({}):o):(0,_ui.getI18n)("vxe.upload.fileBtnText"):"",icon:a?i||(0,_ui.getIcon)().UPLOAD_FILE_ADD:"",disabled:r})]),s&&(p||m)?(0,_vue.h)("div",{class:"vxe-upload--file-action-tip"},m?(0,_vn.getSlotVNs)(m({isMoreView:e,options:n,$upload:A})):""+p):(0,_ui.renderEmptyElement)(A)])},b=(e,n)=>{let{showRemoveButton:r,showProgress:d,progressText:s,showPreview:p,showErrorStatus:v,dragSort:g,autoSubmit:m,showSubmitButton:_}=S,{fileList:c,fileCacheMaps:f}=B,h=P.value,x=L.value,w=u.value,y=J.value,b=D.option,I=D.action,C=D.corner,U={onMousedown:_e};return g&&1<e.length&&(U.onDragstart=ve,U.onDragover=ge,U.onDragend=me),e.map((t,o)=>{var e=z(t),i=f[e];let l=!1,a=!1,u=!1;return i&&(l=i.loading,a="error"===i.status,u="pending"===i.status),(0,_vue.h)("div",Object.assign({key:g?e:o,class:["vxe-upload--image-item",{"is--preview":p,"is--circle":w.circle,"is--loading":l,"is--pending":u,"is--error":a}],fileid:e,draggable:!!g||null},U),b?(0,_vn.getSlotVNs)(b({option:t,isMoreView:n,options:c})):[(0,_vue.h)("div",{class:"vxe-upload--image-item-box",style:n?null:y,onClick(e){l||a||((e,t)=>{var o=S.showDownloadButton;let i=B.fileList;var l=Y.value,a=S.previewMethod||(0,_ui.getConfig)().upload.previewMethod;let u=S.beforeDownloadMethod||(0,_ui.getConfig)().upload.beforeDownloadMethod;S.showPreview&&(a?a({$upload:A,option:e}):_ui.VxeUI.previewImage&&_ui.VxeUI.previewImage(Object.assign(Object.assign({},l),{urlList:i.map(e=>$(e)),activeIndex:t,showDownloadButton:o,beforeDownloadMethod:u?({index:e})=>u({$upload:A,option:i[e]}):void 0})))})(t,o)}},[l&&i?(0,_vue.h)("div",{class:"vxe-upload--image-item-loading"},[(0,_vue.h)("div",{class:"vxe-upload--image-item-loading-icon"},[(0,_vue.h)("i",{class:(0,_ui.getIcon)().UPLOAD_LOADING})]),d?(0,_vue.h)("div",{class:"vxe-upload--image-item-loading-text"},s?_xeUtils.default.toFormatString(""+(_xeUtils.default.isFunction(s)?s({}):s),{percent:i.percent}):(0,_ui.getI18n)("vxe.upload.uploadProgress",[i.percent])):(0,_ui.renderEmptyElement)(A)]):(0,_ui.renderEmptyElement)(A),(0,_vue.h)("div",{class:"vxe-upload--image-item-img-wrapper",title:(0,_ui.getI18n)("vxe.upload.viewItemTitle")},[(0,_vue.h)("img",{class:"vxe-upload--image-item-img",src:(e=t,(i=S.getThumbnailUrlMethod||(0,_ui.getConfig)().upload.getThumbnailUrlMethod)?i({$upload:A,option:e}):$(e))})]),!l&&(a&&v||u&&_&&!m)?(0,_vue.h)("div",{class:"vxe-upload--image-item-rebtn"},[(0,_vue.h)(_button.default,{icon:a?(0,_ui.getIcon)().UPLOAD_IMAGE_RE_UPLOAD:(0,_ui.getIcon)().UPLOAD_IMAGE_UPLOAD,mode:"text",status:"primary",content:a?(0,_ui.getI18n)("vxe.upload.reUpload"):(0,_ui.getI18n)("vxe.upload.manualUpload"),onClick(){te(t)}})]):(0,_ui.renderEmptyElement)(A),(0,_vue.h)("div",{class:"vxe-upload--image-item-btn-wrapper",onClick(e){e.stopPropagation()}},I?(0,_vn.getSlotVNs)(I({option:t,isMoreView:n,options:c,readonly:x})):[C?(0,_vue.h)("div",{class:"vxe-upload--file-item-action"},(0,_vn.getSlotVNs)(C({option:t,isMoreView:n,options:c,readonly:x}))):(0,_ui.renderEmptyElement)(A),!r||x||h||l?(0,_ui.renderEmptyElement)(A):(0,_vue.h)("div",{class:"vxe-upload--image-item-remove-btn",onClick(e){e.stopPropagation(),ie(e,t,o)}},[(0,_vue.h)("i",{class:(0,_ui.getIcon)().UPLOAD_IMAGE_REMOVE})])])])])})},I=e=>{var{showUploadButton:t,buttonText:o,buttonIcon:i,showButtonText:l,showButtonIcon:a,autoHiddenButton:u}=S,n=B.fileList,r=L.value,d=W.value,s=K.value,p=Q.value,v=J.value,g=D.default,m=D.tip||D.hint;return r||!t||u&&p?(0,_ui.renderEmptyElement)(A):(0,_vue.h)("div",{key:"action",class:"vxe-upload--image-action"},[(0,_vue.h)("div",{class:"vxe-upload--image-action-btn",onClick:oe},g?g({isMoreView:e,options:n,$upload:A}):[(0,_vue.h)("div",{class:"vxe-upload--image-action-box",style:e?null:v},[a?(0,_vue.h)("div",{class:"vxe-upload--image-action-icon"},[(0,_vue.h)("i",{class:i||(0,_ui.getIcon)().UPLOAD_IMAGE_ADD})]):(0,_ui.renderEmptyElement)(A),e||l?(0,_vue.h)("div",{class:"vxe-upload--image-action-content"},o?""+(_xeUtils.default.isFunction(o)?o({}):o):(0,_ui.getI18n)("vxe.upload.imgBtnText")):(0,_ui.renderEmptyElement)(A),d&&(s||m)?(0,_vue.h)("div",{class:"vxe-upload--image-action-hint"},m?(0,_vn.getSlotVNs)(m({isMoreView:e,options:n,$upload:A})):""+s):(0,_ui.renderEmptyElement)(A)])])])};let o=(0,_vue.ref)(0);return(0,_vue.watch)(()=>S.modelValue?S.modelValue.length:0,()=>{o.value++}),(0,_vue.watch)(()=>S.modelValue,()=>{o.value++}),(0,_vue.watch)(o,()=>{d()}),(0,_vue.onMounted)(()=>{S.multiple&&S.singleMode&&(0,_log.errLog)("vxe.error.errConflicts",["[upload] multiple","single-mode"]),S.imageStyle&&(0,_log.warnLog)("vxe.error.delProp",["[upload] image-style","image-config"]),S.dragSort&&(0,_dom.initTpImg)(),_ui.globalEvents.on(A,"paste",ce),_ui.globalEvents.on(A,"click",fe),_ui.globalEvents.on(A,"blur",he)}),(0,_vue.onBeforeUnmount)(()=>{B.isDragUploadStatus=!1,_ui.globalEvents.off(A,"paste"),_ui.globalEvents.off(A,"click"),_ui.globalEvents.off(A,"blur"),_xeUtils.default.assign(B,createReactData()),_xeUtils.default.assign(r,createInternalData())}),d(),A.renderVN=()=>{var{showErrorStatus:e,dragToUpload:t,pasteToUpload:o,dragSort:i,dragPlaceholder:l}=S,{isDragUploadStatus:a,showMorePopup:u,isActivated:n,dragIndex:r}=B,d=G.value,s=P.value,p=L.value,v=h.value,g={onMousedown:_e};return t&&-1===r&&(g.onDragover=ue,g.onDragleave=ae,g.onDrop=re),(0,_vue.h)("div",Object.assign({ref:m,class:["vxe-upload",{["size--"+d]:d,"is--active":n,"is--readonly":p,"is--disabled":s,"is--paste":o,"show--error":e,"is--drag":a}]},g),[(v?()=>{var{showList:e,dragSort:t}=S;let{fileList:o,isDragMove:i}=B;var l=Z.value;let a=D.moreButton||D["more-button"],{maxCount:u,showMoreButton:n,moreButtonText:r}=l,d=o,s=0,p=!1,v=!1;return _xeUtils.default.isNumber(u)&&o.length>u&&(p=!0,v=0===u,s=o.length-u,d=o.slice(0,u)),(0,_vue.h)("div",{key:"image",class:"vxe-upload--image-wrapper"},e?[t?(0,_vue.h)(_vue.TransitionGroup,{name:"vxe-upload--drag-list"+(i?"":"-disabled"),tag:"div",class:"vxe-upload--image-list"},{default:()=>b(d,!1).concat([n&&s?(0,_vue.h)("div",{key:"om",class:"vxe-upload--image-over-more"},a?(0,_vn.getSlotVNs)(a({options:o})):[(0,_vue.h)(_button.default,{mode:"text",content:r?_xeUtils.default.isFunction(r)?r({$upload:A,options:o}):_xeUtils.default.toFormatString(r,[o.length]):(0,_ui.getI18n)(p&&v?"vxe.upload.moreImgBtnText":"vxe.upload.moreBtnText",[o.length]),status:"primary",onClick:x})]):(0,_ui.renderEmptyElement)(A),I(!1)])}):(0,_vue.h)("div",{class:"vxe-upload--image-list"},b(d,!1).concat([n&&s?(0,_vue.h)("div",{class:"vxe-upload--image-over-more"},a?(0,_vn.getSlotVNs)(a({options:o})):[(0,_vue.h)(_button.default,{mode:"text",content:r?_xeUtils.default.isFunction(r)?r({$upload:A,options:o}):_xeUtils.default.toFormatString(r,[o.length]):(0,_ui.getI18n)(p&&v?"vxe.upload.moreImgBtnText":"vxe.upload.moreBtnText",[o.length]),status:"primary",onClick:x})]):(0,_ui.renderEmptyElement)(A),I(!1)]))]:[(0,_vue.h)("div",{class:"vxe-upload--image-list"},[I(!1)])])}:()=>{var{showList:e,moreConfig:t,dragSort:o}=S,{fileList:i,isDragMove:l}=B,{maxCount:a,showMoreButton:u,layout:n,moreButtonText:r}=Z.value,n="horizontal"===n,d=D.moreButton||D["more-button"];let s=i,p=0,v=!1,g=!1;return _xeUtils.default.isNumber(a)&&i.length>a&&(v=!0,g=0===a,p=i.length-a,s=i.slice(0,a)),(0,_vue.h)("div",{key:"all",class:"vxe-upload--file-wrapper"},e?[u&&t&&n?(0,_ui.renderEmptyElement)(A):y(!0),(0,_vue.h)("div",{class:["vxe-upload--file-list-wrapper",{"is--horizontal":n}]},[s.length?o?(0,_vue.h)(_vue.TransitionGroup,{name:"vxe-upload--drag-list"+(l?"":"-disabled"),tag:"div",class:"vxe-upload--file-list"},{default:()=>w(s,!1)}):(0,_vue.h)("div",{class:"vxe-upload--file-list"},w(s,!1)):(0,_ui.renderEmptyElement)(A),u&&p?(0,_vue.h)("div",{class:"vxe-upload--file-over-more"},d?(0,_vn.getSlotVNs)(d({options:i})):[(0,_vue.h)(_button.default,{mode:"text",content:r?_xeUtils.default.isFunction(r)?r({$upload:A,options:i}):_xeUtils.default.toFormatString(r,[i.length]):(0,_ui.getI18n)(v&&g?"vxe.upload.moreFileBtnText":"vxe.upload.moreBtnText",[i.length]),status:"primary",onClick:x})]):(0,_ui.renderEmptyElement)(A),u&&t&&n?y(!1):(0,_ui.renderEmptyElement)(A)])]:[y(!1)])})(),i?(0,_vue.h)("div",{ref:c,class:"vxe-upload--drag-line"}):(0,_ui.renderEmptyElement)(A),a&&!u?(0,_vue.h)("div",{class:"vxe-upload--drag-placeholder"},l||(0,_ui.getI18n)("vxe.upload.dragPlaceholder")):(0,_ui.renderEmptyElement)(A)])},A},render(){return this.renderVN()}});
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _vue=require("vue"),_comp=require("../../ui/src/comp"),_xeUtils=_interopRequireDefault(require("xe-utils")),_ui=require("../../ui"),_vn=require("../../ui/src/vn"),_log=require("../../ui/src/log"),_dom=require("../../ui/src/dom"),_util=require("./util"),_button=_interopRequireDefault(require("../../button/src/button"));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function createReactData(){return{isDragUploadStatus:!1,showMorePopup:!1,isActivated:!1,fileList:[],fileCacheMaps:{},isDragMove:!1,dragIndex:-1,dragTipText:""}}function createInternalData(){return{moreId:_xeUtils.default.uniqueId("upload"),imagePreviewTypes:["jpg","jpeg","png","gif"],prevDragIndex:-1}}var _default=exports.default=(0,_comp.defineVxeComponent)({name:"VxeUpload",props:{modelValue:[Array,String,Object],showList:{type:Boolean,default:()=>(0,_ui.getConfig)().upload.showList},moreConfig:Object,readonly:{type:Boolean,default:null},disabled:{type:Boolean,default:null},autoSubmit:{type:Boolean,default:()=>(0,_ui.getConfig)().upload.autoSubmit},mode:{type:String,default:()=>(0,_ui.getConfig)().upload.mode},imageTypes:{type:Array,default:()=>_xeUtils.default.clone((0,_ui.getConfig)().upload.imageTypes,!0)},imageConfig:{type:Object,default:()=>_xeUtils.default.clone((0,_ui.getConfig)().upload.imageConfig,!0)},imageStyle:{type:Object,default:()=>_xeUtils.default.clone((0,_ui.getConfig)().upload.imageStyle,!0)},fileTypes:{type:Array,default:()=>_xeUtils.default.clone((0,_ui.getConfig)().upload.fileTypes,!0)},dragSort:Boolean,dragToUpload:{type:Boolean,default:()=>_xeUtils.default.clone((0,_ui.getConfig)().upload.dragToUpload,!0)},dragPlaceholder:{type:String,default:()=>(0,_ui.getConfig)().upload.dragPlaceholder},pasteToUpload:{type:Boolean,default:()=>_xeUtils.default.clone((0,_ui.getConfig)().upload.pasteToUpload,!0)},keyField:String,singleMode:Boolean,urlMode:Boolean,urlArgs:{type:Boolean,default:()=>(0,_ui.getConfig)().upload.urlArgs},multiple:Boolean,limitSize:{type:[String,Number],default:()=>(0,_ui.getConfig)().upload.limitSize},showLimitSize:{type:Boolean,default:()=>(0,_ui.getConfig)().upload.showLimitSize},limitSizeText:{type:[String,Number,Function],default:()=>(0,_ui.getConfig)().upload.limitSizeText},limitCount:{type:[String,Number],default:()=>(0,_ui.getConfig)().upload.limitCount},showLimitCount:{type:Boolean,default:()=>(0,_ui.getConfig)().upload.showLimitCount},limitCountText:{type:[String,Number,Function],default:()=>(0,_ui.getConfig)().upload.limitCountText},nameField:{type:String,default:()=>(0,_ui.getConfig)().upload.nameField},typeField:{type:String,default:()=>(0,_ui.getConfig)().upload.typeField},urlField:{type:String,default:()=>(0,_ui.getConfig)().upload.urlField},sizeField:{type:String,default:()=>(0,_ui.getConfig)().upload.sizeField},showErrorStatus:{type:Boolean,default:()=>(0,_ui.getConfig)().upload.showErrorStatus},showProgress:{type:Boolean,default:()=>(0,_ui.getConfig)().upload.showProgress},progressText:{type:[String,Number,Function],default:()=>(0,_ui.getConfig)().upload.progressText},previewImageConfig:Object,showSubmitButton:Boolean,autoHiddenButton:{type:Boolean,default:()=>(0,_ui.getConfig)().upload.autoHiddenButton},showUploadButton:{type:Boolean,default:()=>(0,_ui.getConfig)().upload.showUploadButton},buttonText:{type:[String,Number,Function],default:()=>(0,_ui.getConfig)().upload.buttonText},buttonIcon:{type:String,default:()=>(0,_ui.getConfig)().upload.buttonIcon},showButtonText:{type:Boolean,default:()=>(0,_ui.getConfig)().upload.showButtonText},showButtonIcon:{type:Boolean,default:()=>(0,_ui.getConfig)().upload.showButtonIcon},showRemoveButton:{type:Boolean,default:()=>(0,_ui.getConfig)().upload.showRemoveButton},showDownloadButton:{type:Boolean,default:()=>(0,_ui.getConfig)().upload.showDownloadButton},showPreview:{type:Boolean,default:()=>(0,_ui.getConfig)().upload.showPreview},showTip:{type:Boolean,default:()=>null},maxSimultaneousUploads:{type:Number,default:()=>(0,_ui.getConfig)().upload.maxSimultaneousUploads},tipText:[String,Number,Function],hintText:String,previewMethod:Function,beforeSelectMethod:Function,uploadMethod:Function,beforeRemoveMethod:Function,removeMethod:Function,beforeDownloadMethod:Function,downloadMethod:Function,getUrlMethod:Function,getThumbnailUrlMethod:Function,size:{type:String,default:()=>(0,_ui.getConfig)().upload.size||(0,_ui.getConfig)().size}},emits:["update:modelValue","add","remove","remove-fail","download","download-fail","upload-success","upload-error","sort-dragend","more-visible"],setup(S,e){let{emit:i,slots:D}=e,C=(0,_vue.inject)("$xeForm",null),U=(0,_vue.inject)("xeFormItemInfo",null),l=(0,_vue.inject)("$xeTable",null);var t=_xeUtils.default.uniqueId();let G=(0,_ui.useSize)(S).computeSize,m=(0,_vue.ref)(),_=(0,_vue.ref)(),c=(0,_vue.ref)(),f=(0,_vue.ref)(),B=(0,_vue.reactive)(createReactData()),r=createInternalData(),a={refElem:m},L=(0,_vue.computed)(()=>{var e=S.readonly;return null===e?!!C&&C.props.readonly:e}),P=(0,_vue.computed)(()=>{var e=S.disabled;return null===e?!!C&&C.props.disabled:e}),E=(0,_vue.computed)(()=>S.keyField||"_X_KEY"),h=(0,_vue.computed)(()=>"image"===S.mode),V=(0,_vue.computed)(()=>S.nameField||"name"),F=(0,_vue.computed)(()=>S.typeField||"type"),M=(0,_vue.computed)(()=>S.urlField||"url"),T=(0,_vue.computed)(()=>S.sizeField||"size"),H=(0,_vue.computed)(()=>1024*_xeUtils.default.toNumber(S.limitSize)*1024),O=(0,_vue.computed)(()=>S.multiple?_xeUtils.default.toNumber(S.limitCount):1),Y=(0,_vue.computed)(()=>{var e=S.showDownloadButton;return Object.assign({showDownloadButton:e},(0,_ui.getConfig)().upload.previewImageConfig,S.previewImageConfig)}),Q=(0,_vue.computed)(()=>{var e=S.multiple,t=B.fileList,o=O.value;return e?!o||t.length>=o:1<=t.length}),X=(0,_vue.computed)(()=>{var e=_xeUtils.default.toNumber(S.limitSize);return e?1048576<e?e/1048576+"T":1024<e?e/1024+"G":e+"M":""}),W=(0,_vue.computed)(()=>{var{showTip:e,tipText:t}=S;return _xeUtils.default.isBoolean(e)||(e=(0,_ui.getConfig)().upload.showTip,_xeUtils.default.isBoolean(e))?e:!!t}),K=(0,_vue.computed)(()=>{var{limitSize:e,fileTypes:t,multiple:o,limitCount:i}=S,l=S.tipText||S.hintText,a=h.value,u=X.value;return _xeUtils.default.isString(l)?l:_xeUtils.default.isFunction(l)?""+l({}):(l=[],a?(o&&i&&l.push((0,_ui.getI18n)("vxe.upload.imgCountHint",[i])),e&&u&&l.push((0,_ui.getI18n)("vxe.upload.imgSizeHint",[u]))):(t&&t.length&&l.push((0,_ui.getI18n)("vxe.upload.fileTypeHint",[t.join("/")])),e&&u&&l.push((0,_ui.getI18n)("vxe.upload.fileSizeHint",[u])),o&&i&&l.push((0,_ui.getI18n)("vxe.upload.fileCountHint",[i]))),l.join((0,_ui.getI18n)("vxe.base.comma")))}),u=(0,_vue.computed)(()=>Object.assign({},S.imageConfig||S.imageStyle)),J=(0,_vue.computed)(()=>{var{width:e,height:t}=u.value,o={};return e&&(o.width=(0,_dom.toCssUnit)(e)),t&&(o.height=(0,_dom.toCssUnit)(t)),o}),Z=(0,_vue.computed)(()=>Object.assign({showMoreButton:!0},S.moreConfig)),n={},A={xID:t,props:S,context:e,reactData:B,internalData:r,getRefMaps:()=>a,getComputeMaps:()=>n},N=()=>_xeUtils.default.uniqueId(),z=e=>e[E.value],d=()=>{var{modelValue:e,multiple:t}=S,o=L.value;let l=E.value,a=V.value,u=F.value,n=M.value,r=T.value;e=e?(e?_xeUtils.default.isArray(e)?e:[e]:[]).map(t=>{if(!t||_xeUtils.default.isString(t)){var o=""+(t||""),i=_xeUtils.default.parseUrl(t);let e=(i?i.searchQuery[a]:"")||decodeURIComponent(""+(o||"")).split("/").pop()||"";return{[a]:e,[u]:(i?i.searchQuery[u]:"")||j(e),[n]:o,[r]:_xeUtils.default.toNumber(i?i.searchQuery[r]:0)||0,[l]:N()}}let e=t[a]||"";return t[a]=e,t[u]=t[u]||j(e),t[n]=t[n]||"",t[r]=t[r]||0,t[l]=t[l]||N(),t}):[];B.fileList=o||t?e:e.slice(0,1)},j=e=>{var t=e.lastIndexOf(".");return 0<t?e.substring(t+1).toLowerCase():""},k=(e,t,o)=>{i(e,(0,_ui.createEvent)(o,{$upload:A},t))},s=e=>{i("update:modelValue",e)},R=e=>{let{singleMode:t,urlMode:o,urlArgs:i}=S,l=M.value,a=V.value,u=e?e.slice(0):[];o&&(u=u.map(e=>{var t=e[l];if(t&&i){var o=_xeUtils.default.parseUrl(t);if(!o.searchQuery[a]&&-1===t.indexOf("blob:"))return""+t+(-1===t.indexOf("?")?"?":"&")+a+"="+encodeURIComponent(e[a]||"")}return t})),s(t?u[0]||null:u)},$=e=>{var t=S.getUrlMethod||(0,_ui.getConfig)().upload.getUrlMethod,o=M.value;return t?t({$upload:A,option:e}):e[o]},ee=t=>{var{imageTypes:e,showDownloadButton:o}=S;let i=F.value;var l=Y.value;let a=S.beforeDownloadMethod||(0,_ui.getConfig)().upload.beforeDownloadMethod;var u=r.imagePreviewTypes;u.concat(e||[]).some(e=>(""+e).toLowerCase()===(""+t[i]).toLowerCase())&&_ui.VxeUI.previewImage&&_ui.VxeUI.previewImage(Object.assign(Object.assign({},l),{urlList:[$(t)],showDownloadButton:o,beforeDownloadMethod:a?()=>a({$upload:A,option:t}):void 0}))},q=(i,e)=>{let l=S.showErrorStatus,a=z(i);var t=S.uploadMethod||(0,_ui.getConfig)().upload.uploadMethod;return t?Promise.resolve(t({$upload:A,file:e,option:i,updateProgress(e){var t=B.fileCacheMaps,t=t[z(i)];t&&(t.percent=Math.max(0,Math.min(99,_xeUtils.default.toNumber(e))))}})).then(e=>{var t=B.fileCacheMaps,t=t[a];t&&(t.percent=100,t.status="success"),Object.assign(i,e),k("upload-success",{option:i,data:e},null)}).catch(e=>{var t=B.fileCacheMaps,o=t[a];o&&(o.status="error"),l?Object.assign(i,e):(B.fileList=B.fileList.filter(e=>z(e)!==a),delete t[a]),k("upload-error",{option:i,data:e},null)}).finally(()=>{var e=B.fileCacheMaps,e=e[a];e&&(e.loading=!1)}):(t=B.fileCacheMaps,(e=t[a])&&(e.loading=!1),Promise.resolve())},te=e=>{let{uploadMethod:t,urlMode:o}=S;var i,l=B.fileCacheMaps,l=l[z(e)];(t||(0,_ui.getConfig)().upload.uploadMethod)&&l&&(i=l.file,l.loading=!0,l.status="pending",l.percent=0,q(e,i).then(()=>{o&&R(B.fileList)}))},p=(t,o)=>{let{multiple:e,urlMode:i,showLimitSize:l,limitSizeText:a,showLimitCount:u,limitCountText:n,autoSubmit:r}=S;var d=B.fileList;let s=S.beforeSelectMethod||(0,_ui.getConfig)().upload.beforeSelectMethod,p=S.uploadMethod||(0,_ui.getConfig)().upload.uploadMethod,v=E.value,g=V.value,m=F.value,_=M.value,c=T.value;var f=H.value;let h=O.value;var x=X.value;let w=t;if(e&&h){if(u&&d.length>=h)return void(_ui.VxeUI.modal&&_ui.VxeUI.modal.notification({title:(0,_ui.getI18n)("vxe.modal.errTitle"),status:"error",content:n?""+(_xeUtils.default.isFunction(n)?n({maxCount:h}):n):(0,_ui.getI18n)("vxe.upload.overCountErr",[h])}));let t=w.length-(h-d.length);if(u&&0<t){let e=w.slice(h-d.length);n?_ui.VxeUI.modal.notification({title:(0,_ui.getI18n)("vxe.modal.errTitle"),status:"error",content:""+(_xeUtils.default.isFunction(n)?n({maxCount:h}):n)}):_ui.VxeUI.modal&&_ui.VxeUI.modal.notification({title:(0,_ui.getI18n)("vxe.modal.errTitle"),status:"error",width:null,slots:{default(){return(0,_vue.h)("div",{class:"vxe-upload--file-message-over-error"},[(0,_vue.h)("div",{},(0,_ui.getI18n)("vxe.upload.overCountExtraErr",[h,t])),(0,_vue.h)("div",{class:"vxe-upload--file-message-over-extra"},e.map((e,t)=>(0,_vue.h)("div",{key:t,class:"vxe-upload--file-message-over-extra-item"},e.name)))])}}})}w=w.slice(0,h-d.length)}if(l&&f)for(let e=0;e<t.length;e++)if(t[0].size>f)return void(_ui.VxeUI.modal&&_ui.VxeUI.modal.notification({title:(0,_ui.getI18n)("vxe.modal.errTitle"),status:"error",content:a?""+(_xeUtils.default.isFunction(a)?a({maxSize:f}):a):(0,_ui.getI18n)("vxe.upload.overSizeErr",[x])}));let y=Object.assign({},B.fileCacheMaps),b=e?d:[],I=[];w.forEach(e=>{var t=e.name,o=N(),t={[g]:t,[m]:j(t),[c]:e.size,[_]:URL.createObjectURL(e),[v]:o},o=(p&&(y[o]={file:e,loading:!!r,status:"pending",percent:0}),(0,_vue.reactive)(t));s&&!s({$upload:A,file:e})||(p&&r&&I.push(q(o,e)),b.push(o))}),B.fileList=b,B.fileCacheMaps=y,b.forEach(e=>{k("add",{option:e},o)}),Promise.all(i?I:[]).then(()=>{var e=B.fileList;R(e),C&&U&&C.triggerItemEvent(o,U.itemConfig.field,e)})},v=t=>{var{multiple:e,imageTypes:o,fileTypes:i}=S,l=P.value,a=h.value;return l?Promise.resolve({status:!1,files:[],file:null}):(0,_util.readLocalFile)({multiple:e,types:a?o:i}).then(e=>(p(e.files,t),e))},oe=e=>{v(e).catch(()=>{})},g=(e,t,o)=>{var i=B.fileList;i.splice(o,1),R(i),C&&U&&C.triggerItemEvent(e,U.itemConfig.field,i),k("remove",{option:t},e)},ie=(t,o,i)=>{var e=S.beforeRemoveMethod||(0,_ui.getConfig)().upload.beforeRemoveMethod;let l=S.removeMethod||(0,_ui.getConfig)().upload.removeMethod;Promise.resolve(!e||e({$upload:A,option:o})).then(e=>{e?l?Promise.resolve(l({$upload:A,option:o})).then(()=>{g(t,o,i)}).catch(e=>e):g(t,o,i):k("remove-fail",{option:o},t)})},le=(e,t)=>{k("download",{option:t},e)},ae=e=>{var t,o,i,l=e.currentTarget,{clientX:e,clientY:a}=e;l&&({x:l,y:t,height:o,width:i}=l.getBoundingClientRect(),e<l||l+i<e||a<t||t+o<a)&&(B.isDragUploadStatus=!1)},ue=e=>{var t=e.dataTransfer;t&&(t=t.items,t)&&t.length&&(e.preventDefault(),B.isDragUploadStatus=!0)},ne=(e,t)=>{let{imageTypes:i,fileTypes:l}=S;var a=r.imagePreviewTypes;if(h.value){let o=a.concat(i&&i.length?i:[]);t=t.filter(e=>{let t=(""+(e.type.split("/")[1]||"")).toLowerCase();return!!o.some(e=>(""+e).toLowerCase()===t)})}else if(l&&l.length){let o=[];if(t.forEach(e=>{let t=j(e.name);l.some(e=>(""+e).toLowerCase()===t)||o.push(t)}),o.length)return void(_ui.VxeUI.modal&&_ui.VxeUI.modal.message({content:(0,_ui.getI18n)("vxe.error.notType",[o.join(", ")]),status:"error"}))}t.length?p(t,e):_ui.VxeUI.modal&&_ui.VxeUI.modal.notification({title:(0,_ui.getI18n)("vxe.modal.errTitle"),status:"error",content:(0,_ui.getI18n)("vxe.upload.uploadTypeErr")})},re=e=>{var t=e.dataTransfer;t&&(t=t.items,t)&&t.length&&(e.preventDefault(),(t=de(t)).length)&&ne(e,t),B.isDragUploadStatus=!1},de=e=>{let t=[];return _xeUtils.default.arrayEach(e,e=>{e=e.getAsFile();e&&t.push(e)}),t},x=e=>{let v=L.value,g=h.value;e=e.$event;_ui.VxeUI.modal&&(_ui.VxeUI.modal.open({id:r.moreId,title:v?(0,_ui.getI18n)("vxe.upload.morePopup.readTitle"):(0,_ui.getI18n)("vxe.upload.morePopup."+(g?"imageTitle":"fileTitle")),width:660,height:500,escClosable:!0,showMaximize:!0,resize:!0,maskClosable:!0,slots:{default(){var{showErrorStatus:e,dragToUpload:t,dragSort:o,dragPlaceholder:i}=S,{isActivated:l,isDragMove:a,isDragUploadStatus:u,dragIndex:n}=B;let r=B.fileList;var d=P.value,s=D.moreContent||D["more-content"],p={};return t&&-1===n&&(p.onDragover=ue,p.onDragleave=ae,p.onDrop=re),(0,_vue.h)("div",Object.assign({ref:_,class:["vxe-upload--more-popup",{"is--readonly":v,"is--disabled":d,"is--active":l,"show--error":e,"is--drag":u}]},p),s?(0,_vn.getSlotVNs)(s({options:r})):[g?o?(0,_vue.h)(_vue.TransitionGroup,{name:"vxe-upload--drag-list"+(a?"":"-disabled"),tag:"div",class:"vxe-upload--image-more-list"},{default:()=>b(r,!0).concat(I(!0))}):(0,_vue.h)("div",{class:"vxe-upload--image-more-list"},b(r,!0).concat(I(!0))):(0,_vue.h)("div",{class:"vxe-upload--file-more-list"},[y(!0),o?(0,_vue.h)(_vue.TransitionGroup,{name:"vxe-upload--drag-list"+(a?"":"-disabled"),tag:"div",class:"vxe-upload--file-list"},{default:()=>w(r,!1)}):(0,_vue.h)("div",{class:"vxe-upload--file-list"},w(r,!0))]),o?(0,_vue.h)("div",{ref:f,class:"vxe-upload--drag-line"}):(0,_ui.renderEmptyElement)(A),u?(0,_vue.h)("div",{class:"vxe-upload--drag-placeholder"},i||(0,_ui.getI18n)("vxe.upload.dragPlaceholder")):(0,_ui.renderEmptyElement)(A)])}},onShow(){B.showMorePopup=!0},onHide({$event:e}){B.showMorePopup=!1,e&&k("more-visible",{visible:!1},e)}}),e)&&k("more-visible",{visible:!0},e)},se=(e,t,o)=>{var i,l=B.showMorePopup,a=m.value,u=_.value,u=l?u:a;u&&(a=u.getBoundingClientRect(),u=c.value,i=f.value,l=l?i:u)&&(i=t.getBoundingClientRect(),l.style.display="block",l.style.top=Math.max(1,i.y-a.y)+"px",l.style.left=Math.max(1,i.x-a.x)+"px",l.style.height=i.height+"px",l.style.width=i.width-1+"px",l.setAttribute("drag-pos",o))},pe=()=>{var e=c.value,t=f.value;e&&(e.style.display=""),t&&(t.style.display="")},ve=e=>{e.stopPropagation(),e.dataTransfer&&e.dataTransfer.setDragImage((0,_dom.getTpImg)(),0,0);let t=e.currentTarget;e=t.parentElement,e=_xeUtils.default.findIndexOf(Array.from(e.children),e=>t===e);B.isDragMove=!0,B.dragIndex=e,setTimeout(()=>{B.isDragMove=!1},500)},ge=o=>{o.stopPropagation(),o.preventDefault();var i=B.dragIndex;if(-1!==i){var l=h.value;let t=o.currentTarget;var a=t.parentElement,a=_xeUtils.default.findIndexOf(Array.from(a.children),e=>t===e);let e="";e=l?o.clientX-t.getBoundingClientRect().x<t.clientWidth/2?"left":"right":o.clientY-t.getBoundingClientRect().y<t.clientHeight/2?"top":"bottom",i===a?se(o,t,e):(se(o,t,e),r.prevDragIndex=a,r.prevDragPos=e)}},me=e=>{var{fileList:t,dragIndex:o}=B,{prevDragIndex:i,prevDragPos:l}=r,a="bottom"===l||"right"===l?1:0,u=t[o];let n=t[i];u&&n&&(t.splice(o,1),i=_xeUtils.default.findIndexOf(t,e=>n===e)+a,t.splice(i,0,u),k("sort-dragend",{oldItem:u,newItem:n,dragPos:l,offsetIndex:a,_index:{newIndex:i,oldIndex:o}},e)),pe(),B.dragIndex=-1},_e=e=>{l&&e.stopPropagation(),B.isActivated=!0},ce=e=>{var t=S.pasteToUpload,o=B.isActivated;o&&t&&(o=e.clipboardData||e.originalEvent.clipboardData)&&(t=o.items,t)&&(o=de(t)).length&&(e.preventDefault(),ne(e,o))},fe=e=>{var t=m.value,o=_.value;let i=(0,_dom.getEventTargetNode)(e,t).flag;!i&&o&&(o=(t=o.parentElement||o)&&t.parentElement,i=(0,_dom.getEventTargetNode)(e,o).flag),B.isActivated=i},he=()=>{B.isActivated=!1};t={dispatchEvent:k,choose(){return v(null)},getPendingFiles(){let{fileList:e,fileCacheMaps:t}=B,o=[];return e.forEach(e=>{e=z(e),e=t[e];e&&"pending"===e.status&&o.push(e.file)}),o},submit(i){var e=S.maxSimultaneousUploads,e=_xeUtils.default.toNumber(e||1)||1;let{fileList:t,fileCacheMaps:l}=B,o=t.filter(e=>{e=z(e),e=l[e];return e&&("pending"===e.status||i&&"error"===e.status)}),a=e=>{var t=z(e),t=l[t];if(t){var o=t.file;if(o&&("pending"===t.status||i&&"error"===t.status))return t.loading=!0,t.percent=0,q(e,o).then(u)}return u()},u=()=>{var e;return o.length?(e=o[0],o.splice(0,1),a(e).then(u)):Promise.resolve()};return Promise.all(o.splice(0,e).map(a)).then(()=>{})},getMoreVisible(){return B.showMorePopup},openMore(){return x({$event:new Event("click")}),(0,_vue.nextTick)()},openMoreByEvent(e){return x({$event:e}),(0,_vue.nextTick)()},closeMore(){return _ui.VxeUI.modal&&_ui.VxeUI.modal.close(r.moreId),(0,_vue.nextTick)()}};Object.assign(A,t,{});let w=(e,r)=>{let{showRemoveButton:d,showDownloadButton:s,showProgress:p,progressText:v,showPreview:g,showErrorStatus:m,dragSort:_,autoSubmit:c,showSubmitButton:f}=S,{fileList:h,fileCacheMaps:x}=B,w=P.value,y=L.value,b=V.value,I=F.value,C=D.option,U=D.action,E=D.corner,M=D.name,T={};return _&&1<e.length&&(T.onDragstart=ve,T.onDragover=ge,T.onDragend=me),e.map((i,t)=>{var e=z(i),o=x[e];let l=!1,a=!1,u=!1;var n=""+(i[b]||"");return o&&(l=o.loading,a="error"===o.status,u="pending"===o.status),(0,_vue.h)("div",Object.assign({key:_?e:t,class:["vxe-upload--file-item",{"is--preview":g,"is--loading":l,"is--pending":u,"is--error":a}],fileid:e,draggable:!!_||null},T),C?(0,_vn.getSlotVNs)(C({option:i,isMoreView:r,options:h})):[(0,_vue.h)("div",{class:"vxe-upload--file-item-icon"},[(0,_vue.h)("i",{class:(0,_ui.getIcon)()["UPLOAD_FILE_TYPE_"+(""+i[I]).toLocaleUpperCase()]||(0,_ui.getIcon)().UPLOAD_FILE_TYPE_DEFAULT})]),(0,_vue.h)("div",{class:"vxe-upload--file-item-name",title:n,onClick(e){var t,o;l||a||(t=i,o=S.previewMethod||(0,_ui.getConfig)().upload.previewMethod,S.showPreview&&(o?o({$upload:A,option:t}):ee(t)))}},M?(0,_vn.getSlotVNs)(M({option:i,isMoreView:r,options:h})):n),l?(0,_vue.h)("div",{class:"vxe-upload--file-item-loading-icon"},[(0,_vue.h)("i",{class:(0,_ui.getIcon)().UPLOAD_LOADING})]):(0,_ui.renderEmptyElement)(A),p&&l&&o?(0,_vue.h)("div",{class:"vxe-upload--file-item-loading-text"},v?_xeUtils.default.toFormatString(""+(_xeUtils.default.isFunction(v)?v({}):v),{percent:o.percent}):(0,_ui.getI18n)("vxe.upload.uploadProgress",[o.percent])):(0,_ui.renderEmptyElement)(A),!l&&(a&&m||u&&f&&!c)?(0,_vue.h)("div",{class:"vxe-upload--file-item-rebtn"},[(0,_vue.h)(_button.default,{icon:a?(0,_ui.getIcon)().UPLOAD_IMAGE_RE_UPLOAD:(0,_ui.getIcon)().UPLOAD_IMAGE_UPLOAD,mode:"text",status:"primary",content:a?(0,_ui.getI18n)("vxe.upload.reUpload"):(0,_ui.getI18n)("vxe.upload.manualUpload"),onClick(){te(i)}})]):(0,_ui.renderEmptyElement)(A),(0,_vue.h)("div",{class:"vxe-upload--file-item-btn-wrapper"},U?(0,_vn.getSlotVNs)(U({option:i,isMoreView:r,options:h,readonly:y})):[E?(0,_vue.h)("div",{class:"vxe-upload--file-item-action"},(0,_vn.getSlotVNs)(E({option:i,isMoreView:r,options:h,readonly:y}))):(0,_ui.renderEmptyElement)(A),!s||l||u?(0,_ui.renderEmptyElement)(A):(0,_vue.h)("div",{class:"vxe-upload--file-item-download-btn",onClick(e){((t,o)=>{var e=S.beforeDownloadMethod||(0,_ui.getConfig)().upload.beforeDownloadMethod;let i=S.downloadMethod||(0,_ui.getConfig)().upload.downloadMethod;Promise.resolve(!e||e({$upload:A,option:o})).then(e=>{e?i?Promise.resolve(i({$upload:A,option:o})).then(()=>{le(t,o)}).catch(e=>e):le(t,o):k("download-fail",{option:o},t)})})(e,i)}},[(0,_vue.h)("i",{class:(0,_ui.getIcon)().UPLOAD_FILE_DOWNLOAD})]),!d||y||w||l?(0,_ui.renderEmptyElement)(A):(0,_vue.h)("div",{class:"vxe-upload--file-item-remove-btn",onClick(e){ie(e,i,t)}},[(0,_vue.h)("i",{class:(0,_ui.getIcon)().UPLOAD_FILE_REMOVE})])])])})},y=e=>{var{showUploadButton:t,buttonText:o,buttonIcon:i,showButtonText:l,showButtonIcon:a,autoHiddenButton:u}=S,n=B.fileList,r=P.value,d=L.value,s=W.value,p=K.value,v=Q.value,g=D.default,m=D.tip||D.hint;return d||!t?(0,_ui.renderEmptyElement)(A):(0,_vue.h)("div",{class:"vxe-upload--file-action"},[u&&v?(0,_ui.renderEmptyElement)(A):(0,_vue.h)("div",{class:"vxe-upload--file-action-btn",onClick:oe},g?(0,_vn.getSlotVNs)(g({isMoreView:e,options:n,$upload:A})):[(0,_vue.h)(_button.default,{class:"vxe-upload--file-action-button",content:e||l?o?""+(_xeUtils.default.isFunction(o)?o({}):o):(0,_ui.getI18n)("vxe.upload.fileBtnText"):"",icon:a?i||(0,_ui.getIcon)().UPLOAD_FILE_ADD:"",disabled:r})]),s&&(p||m)?(0,_vue.h)("div",{class:"vxe-upload--file-action-tip"},m?(0,_vn.getSlotVNs)(m({isMoreView:e,options:n,$upload:A})):""+p):(0,_ui.renderEmptyElement)(A)])},b=(e,n)=>{let{showRemoveButton:r,showProgress:d,progressText:s,showPreview:p,showErrorStatus:v,dragSort:g,autoSubmit:m,showSubmitButton:_}=S,{fileList:c,fileCacheMaps:f}=B,h=P.value,x=L.value,w=u.value,y=J.value,b=D.option,I=D.action,C=D.corner,U={onMousedown:_e};return g&&1<e.length&&(U.onDragstart=ve,U.onDragover=ge,U.onDragend=me),e.map((t,o)=>{var e=z(t),i=f[e];let l=!1,a=!1,u=!1;return i&&(l=i.loading,a="error"===i.status,u="pending"===i.status),(0,_vue.h)("div",Object.assign({key:g?e:o,class:["vxe-upload--image-item",{"is--preview":p,"is--circle":w.circle,"is--loading":l,"is--pending":u,"is--error":a}],fileid:e,draggable:!!g||null},U),b?(0,_vn.getSlotVNs)(b({option:t,isMoreView:n,options:c})):[(0,_vue.h)("div",{class:"vxe-upload--image-item-box",style:n?null:y,onClick(e){l||a||((e,t)=>{var o=S.showDownloadButton;let i=B.fileList;var l=Y.value,a=S.previewMethod||(0,_ui.getConfig)().upload.previewMethod;let u=S.beforeDownloadMethod||(0,_ui.getConfig)().upload.beforeDownloadMethod;S.showPreview&&(a?a({$upload:A,option:e}):_ui.VxeUI.previewImage&&_ui.VxeUI.previewImage(Object.assign(Object.assign({},l),{urlList:i.map(e=>$(e)),activeIndex:t,showDownloadButton:o,beforeDownloadMethod:u?({index:e})=>u({$upload:A,option:i[e]}):void 0})))})(t,o)}},[l&&i?(0,_vue.h)("div",{class:"vxe-upload--image-item-loading"},[(0,_vue.h)("div",{class:"vxe-upload--image-item-loading-icon"},[(0,_vue.h)("i",{class:(0,_ui.getIcon)().UPLOAD_LOADING})]),d?(0,_vue.h)("div",{class:"vxe-upload--image-item-loading-text"},s?_xeUtils.default.toFormatString(""+(_xeUtils.default.isFunction(s)?s({}):s),{percent:i.percent}):(0,_ui.getI18n)("vxe.upload.uploadProgress",[i.percent])):(0,_ui.renderEmptyElement)(A)]):(0,_ui.renderEmptyElement)(A),(0,_vue.h)("div",{class:"vxe-upload--image-item-img-wrapper",title:(0,_ui.getI18n)("vxe.upload.viewItemTitle")},[(0,_vue.h)("img",{class:"vxe-upload--image-item-img",src:(e=t,(i=S.getThumbnailUrlMethod||(0,_ui.getConfig)().upload.getThumbnailUrlMethod)?i({$upload:A,option:e}):$(e))})]),!l&&(a&&v||u&&_&&!m)?(0,_vue.h)("div",{class:"vxe-upload--image-item-rebtn"},[(0,_vue.h)(_button.default,{icon:a?(0,_ui.getIcon)().UPLOAD_IMAGE_RE_UPLOAD:(0,_ui.getIcon)().UPLOAD_IMAGE_UPLOAD,mode:"text",status:"primary",content:a?(0,_ui.getI18n)("vxe.upload.reUpload"):(0,_ui.getI18n)("vxe.upload.manualUpload"),onClick(){te(t)}})]):(0,_ui.renderEmptyElement)(A),(0,_vue.h)("div",{class:"vxe-upload--image-item-btn-wrapper",onClick(e){e.stopPropagation()}},I?(0,_vn.getSlotVNs)(I({option:t,isMoreView:n,options:c,readonly:x})):[C?(0,_vue.h)("div",{class:"vxe-upload--file-item-action"},(0,_vn.getSlotVNs)(C({option:t,isMoreView:n,options:c,readonly:x}))):(0,_ui.renderEmptyElement)(A),!r||x||h||l?(0,_ui.renderEmptyElement)(A):(0,_vue.h)("div",{class:"vxe-upload--image-item-remove-btn",onClick(e){e.stopPropagation(),ie(e,t,o)}},[(0,_vue.h)("i",{class:(0,_ui.getIcon)().UPLOAD_IMAGE_REMOVE})])])])])})},I=e=>{var{showUploadButton:t,buttonText:o,buttonIcon:i,showButtonText:l,showButtonIcon:a,autoHiddenButton:u}=S,n=B.fileList,r=L.value,d=W.value,s=K.value,p=Q.value,v=J.value,g=D.default,m=D.tip||D.hint;return r||!t||u&&p?(0,_ui.renderEmptyElement)(A):(0,_vue.h)("div",{key:"action",class:"vxe-upload--image-action"},[(0,_vue.h)("div",{class:"vxe-upload--image-action-btn",onClick:oe},g?g({isMoreView:e,options:n,$upload:A}):[(0,_vue.h)("div",{class:"vxe-upload--image-action-box",style:e?null:v},[a?(0,_vue.h)("div",{class:"vxe-upload--image-action-icon"},[(0,_vue.h)("i",{class:i||(0,_ui.getIcon)().UPLOAD_IMAGE_ADD})]):(0,_ui.renderEmptyElement)(A),e||l?(0,_vue.h)("div",{class:"vxe-upload--image-action-content"},o?""+(_xeUtils.default.isFunction(o)?o({}):o):(0,_ui.getI18n)("vxe.upload.imgBtnText")):(0,_ui.renderEmptyElement)(A),d&&(s||m)?(0,_vue.h)("div",{class:"vxe-upload--image-action-hint"},m?(0,_vn.getSlotVNs)(m({isMoreView:e,options:n,$upload:A})):""+s):(0,_ui.renderEmptyElement)(A)])])])};let o=(0,_vue.ref)(0);return(0,_vue.watch)(()=>S.modelValue?S.modelValue.length:0,()=>{o.value++}),(0,_vue.watch)(()=>S.modelValue,()=>{o.value++}),(0,_vue.watch)(o,()=>{d()}),(0,_vue.onMounted)(()=>{S.multiple&&S.singleMode&&(0,_log.errLog)("vxe.error.errConflicts",["[upload] multiple","single-mode"]),S.imageStyle&&(0,_log.warnLog)("vxe.error.delProp",["[upload] image-style","image-config"]),S.dragSort&&(0,_dom.initTpImg)(),_ui.globalEvents.on(A,"paste",ce),_ui.globalEvents.on(A,"click",fe),_ui.globalEvents.on(A,"blur",he)}),(0,_vue.onBeforeUnmount)(()=>{B.isDragUploadStatus=!1,_ui.globalEvents.off(A,"paste"),_ui.globalEvents.off(A,"click"),_ui.globalEvents.off(A,"blur"),_xeUtils.default.assign(B,createReactData()),_xeUtils.default.assign(r,createInternalData())}),d(),A.renderVN=()=>{var{showErrorStatus:e,dragToUpload:t,pasteToUpload:o,dragSort:i,dragPlaceholder:l}=S,{isDragUploadStatus:a,showMorePopup:u,isActivated:n,dragIndex:r}=B,d=G.value,s=P.value,p=L.value,v=h.value,g={onMousedown:_e};return t&&-1===r&&(g.onDragover=ue,g.onDragleave=ae,g.onDrop=re),(0,_vue.h)("div",Object.assign({ref:m,class:["vxe-upload",{["size--"+d]:d,"is--active":n,"is--readonly":p,"is--disabled":s,"is--paste":o,"show--error":e,"is--drag":a}]},g),[(v?()=>{var{showList:e,dragSort:t}=S;let{fileList:o,isDragMove:i}=B;var l=Z.value;let a=D.moreButton||D["more-button"],{maxCount:u,showMoreButton:n,moreButtonText:r}=l,d=o,s=0,p=!1,v=!1;return _xeUtils.default.isNumber(u)&&o.length>u&&(p=!0,v=0===u,s=o.length-u,d=o.slice(0,u)),(0,_vue.h)("div",{key:"image",class:"vxe-upload--image-wrapper"},e?[t?(0,_vue.h)(_vue.TransitionGroup,{name:"vxe-upload--drag-list"+(i?"":"-disabled"),tag:"div",class:"vxe-upload--image-list"},{default:()=>b(d,!1).concat([n&&s?(0,_vue.h)("div",{key:"om",class:"vxe-upload--image-over-more"},a?(0,_vn.getSlotVNs)(a({options:o})):[(0,_vue.h)(_button.default,{mode:"text",content:r?_xeUtils.default.isFunction(r)?r({$upload:A,options:o}):_xeUtils.default.toFormatString(r,[o.length]):(0,_ui.getI18n)(p&&v?"vxe.upload.moreImgBtnText":"vxe.upload.moreBtnText",[o.length]),status:"primary",onClick:x})]):(0,_ui.renderEmptyElement)(A),I(!1)])}):(0,_vue.h)("div",{class:"vxe-upload--image-list"},b(d,!1).concat([n&&s?(0,_vue.h)("div",{class:"vxe-upload--image-over-more"},a?(0,_vn.getSlotVNs)(a({options:o})):[(0,_vue.h)(_button.default,{mode:"text",content:r?_xeUtils.default.isFunction(r)?r({$upload:A,options:o}):_xeUtils.default.toFormatString(r,[o.length]):(0,_ui.getI18n)(p&&v?"vxe.upload.moreImgBtnText":"vxe.upload.moreBtnText",[o.length]),status:"primary",onClick:x})]):(0,_ui.renderEmptyElement)(A),I(!1)]))]:[(0,_vue.h)("div",{class:"vxe-upload--image-list"},[I(!1)])])}:()=>{var{showList:e,moreConfig:t,dragSort:o}=S,{fileList:i,isDragMove:l}=B,{maxCount:a,showMoreButton:u,layout:n,moreButtonText:r}=Z.value,n="horizontal"===n,d=D.moreButton||D["more-button"];let s=i,p=0,v=!1,g=!1;return _xeUtils.default.isNumber(a)&&i.length>a&&(v=!0,g=0===a,p=i.length-a,s=i.slice(0,a)),(0,_vue.h)("div",{key:"all",class:"vxe-upload--file-wrapper"},e?[u&&t&&n?(0,_ui.renderEmptyElement)(A):y(!0),(0,_vue.h)("div",{class:["vxe-upload--file-list-wrapper",{"is--horizontal":n}]},[s.length?o?(0,_vue.h)(_vue.TransitionGroup,{name:"vxe-upload--drag-list"+(l?"":"-disabled"),tag:"div",class:"vxe-upload--file-list"},{default:()=>w(s,!1)}):(0,_vue.h)("div",{class:"vxe-upload--file-list"},w(s,!1)):(0,_ui.renderEmptyElement)(A),u&&p?(0,_vue.h)("div",{class:"vxe-upload--file-over-more"},d?(0,_vn.getSlotVNs)(d({options:i})):[(0,_vue.h)(_button.default,{mode:"text",content:r?_xeUtils.default.isFunction(r)?r({$upload:A,options:i}):_xeUtils.default.toFormatString(r,[i.length]):(0,_ui.getI18n)(v&&g?"vxe.upload.moreFileBtnText":"vxe.upload.moreBtnText",[i.length]),status:"primary",onClick:x})]):(0,_ui.renderEmptyElement)(A),u&&t&&n?y(!1):(0,_ui.renderEmptyElement)(A)])]:[y(!1)])})(),i?(0,_vue.h)("div",{ref:c,class:"vxe-upload--drag-line"}):(0,_ui.renderEmptyElement)(A),a&&!u?(0,_vue.h)("div",{class:"vxe-upload--drag-placeholder"},l||(0,_ui.getI18n)("vxe.upload.dragPlaceholder")):(0,_ui.renderEmptyElement)(A)])},A},render(){return this.renderVN()}});
|
package/package.json
CHANGED
|
@@ -636,6 +636,7 @@ export default defineVxeComponent({
|
|
|
636
636
|
Object.assign(item, res)
|
|
637
637
|
} else {
|
|
638
638
|
reactData.fileList = reactData.fileList.filter(obj => getFieldKey(obj) !== fileKey)
|
|
639
|
+
delete fileCacheMaps[fileKey]
|
|
639
640
|
}
|
|
640
641
|
dispatchEvent('upload-error', { option: item, data: res }, null)
|
|
641
642
|
}).finally(() => {
|
|
@@ -791,10 +792,11 @@ export default defineVxeComponent({
|
|
|
791
792
|
dispatchEvent('add', { option: item }, evnt)
|
|
792
793
|
})
|
|
793
794
|
Promise.all(urlMode ? uploadPromiseRests : []).then(() => {
|
|
794
|
-
|
|
795
|
+
const restFileList = reactData.fileList
|
|
796
|
+
handleChange(restFileList)
|
|
795
797
|
// 自动更新校验状态
|
|
796
798
|
if ($xeForm && formItemInfo) {
|
|
797
|
-
$xeForm.triggerItemEvent(evnt as any, formItemInfo.itemConfig.field,
|
|
799
|
+
$xeForm.triggerItemEvent(evnt as any, formItemInfo.itemConfig.field, restFileList)
|
|
798
800
|
}
|
|
799
801
|
})
|
|
800
802
|
}
|
|
@@ -202,7 +202,13 @@ declare module '../grid' {
|
|
|
202
202
|
|
|
203
203
|
export namespace VxeTableExtendCellAreaDefines {
|
|
204
204
|
export interface CellAreaParams<D = any> {
|
|
205
|
+
/**
|
|
206
|
+
* 对应的列数组
|
|
207
|
+
*/
|
|
205
208
|
cols: VxeTableDefines.ColumnInfo<D>[]
|
|
209
|
+
/**
|
|
210
|
+
* 对应的行数组
|
|
211
|
+
*/
|
|
206
212
|
rows: D[]
|
|
207
213
|
}
|
|
208
214
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|