vxe-pc-ui 4.9.30 → 4.9.32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/button/src/button.js +1 -1
- package/es/date-picker/src/date-picker.js +1 -1
- package/es/date-range-picker/src/date-range-picker.js +1 -1
- package/es/form/render/index.js +1 -1
- package/es/form/src/form.js +4 -4
- package/es/form/src/itemInfo.js +4 -4
- package/es/icon/style.css +1 -1
- package/es/image-preview/index.js +1 -1
- package/es/menu/style.css +1 -0
- package/es/menu/style.min.css +1 -1
- package/es/modal/src/modal.js +3 -3
- package/es/pager/src/pager.js +2 -2
- package/es/select/src/select.js +25 -2
- package/es/split/src/split.js +5 -5
- package/es/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/table-select/src/table-select.js +23 -10
- package/es/tabs/src/tabs.js +2 -2
- package/es/tree/src/tree.js +7 -3
- package/es/tree-select/src/tree-select.js +16 -4
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/es/upload/src/upload.js +2 -2
- package/es/vxe-menu/style.css +1 -0
- package/es/vxe-menu/style.min.css +1 -1
- package/lib/button/src/button.js +1 -1
- package/lib/button/src/button.min.js +1 -1
- package/lib/date-picker/src/date-picker.js +1 -1
- package/lib/date-picker/src/date-picker.min.js +1 -1
- package/lib/date-range-picker/src/date-range-picker.js +1 -1
- package/lib/date-range-picker/src/date-range-picker.min.js +1 -1
- package/lib/form/render/index.js +1 -1
- package/lib/form/render/index.min.js +1 -1
- package/lib/form/src/form.js +4 -4
- package/lib/form/src/form.min.js +1 -1
- package/lib/form/src/itemInfo.js +4 -4
- package/lib/form/src/itemInfo.min.js +1 -1
- package/lib/icon/style/style.css +1 -1
- package/lib/icon/style/style.min.css +1 -1
- package/lib/image-preview/index.js +1 -1
- package/lib/image-preview/index.min.js +1 -1
- package/lib/index.umd.js +104 -46
- package/lib/index.umd.min.js +1 -1
- package/lib/menu/style/style.css +1 -0
- package/lib/menu/style/style.min.css +1 -1
- package/lib/modal/src/modal.js +2 -2
- package/lib/modal/src/modal.min.js +1 -1
- package/lib/pager/src/pager.js +2 -2
- package/lib/pager/src/pager.min.js +1 -1
- package/lib/select/src/select.js +29 -2
- package/lib/select/src/select.min.js +1 -1
- package/lib/split/src/split.js +5 -5
- package/lib/split/src/split.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/table-select/src/table-select.js +24 -10
- package/lib/table-select/src/table-select.min.js +1 -1
- package/lib/tabs/src/tabs.js +2 -2
- package/lib/tabs/src/tabs.min.js +1 -1
- package/lib/tree/src/tree.js +6 -2
- package/lib/tree/src/tree.min.js +1 -1
- package/lib/tree-select/src/tree-select.js +17 -4
- package/lib/tree-select/src/tree-select.min.js +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 +2 -2
- package/lib/upload/src/upload.min.js +1 -1
- package/lib/vxe-menu/style/style.css +1 -0
- package/lib/vxe-menu/style/style.min.css +1 -1
- package/package.json +1 -1
- package/packages/button/src/button.ts +1 -1
- package/packages/date-picker/src/date-picker.ts +1 -1
- package/packages/date-range-picker/src/date-range-picker.ts +1 -1
- package/packages/form/render/index.ts +1 -1
- package/packages/form/src/form.ts +4 -4
- package/packages/form/src/itemInfo.ts +4 -4
- package/packages/image-preview/index.ts +2 -1
- package/packages/modal/src/modal.ts +3 -3
- package/packages/pager/src/pager.ts +2 -2
- package/packages/select/src/select.ts +25 -2
- package/packages/split/src/split.ts +5 -5
- package/packages/table-select/src/table-select.ts +24 -11
- package/packages/tabs/src/tabs.ts +2 -2
- package/packages/tree/src/tree.ts +6 -3
- package/packages/tree-select/src/tree-select.ts +16 -4
- package/packages/upload/index.ts +1 -0
- package/packages/upload/src/upload.ts +2 -2
- package/styles/components/menu.scss +1 -0
- package/types/components/select.d.ts +2 -0
- package/types/components/table-select.d.ts +3 -1
- package/types/components/tree-select.d.ts +2 -0
- package/types/components/tree.d.ts +8 -0
- /package/es/icon/{iconfont.1757986297727.ttf → iconfont.1758173429533.ttf} +0 -0
- /package/es/icon/{iconfont.1757986297727.woff → iconfont.1758173429533.woff} +0 -0
- /package/es/icon/{iconfont.1757986297727.woff2 → iconfont.1758173429533.woff2} +0 -0
- /package/es/{iconfont.1757986297727.ttf → iconfont.1758173429533.ttf} +0 -0
- /package/es/{iconfont.1757986297727.woff → iconfont.1758173429533.woff} +0 -0
- /package/es/{iconfont.1757986297727.woff2 → iconfont.1758173429533.woff2} +0 -0
- /package/lib/icon/style/{iconfont.1757986297727.ttf → iconfont.1758173429533.ttf} +0 -0
- /package/lib/icon/style/{iconfont.1757986297727.woff → iconfont.1758173429533.woff} +0 -0
- /package/lib/icon/style/{iconfont.1757986297727.woff2 → iconfont.1758173429533.woff2} +0 -0
- /package/lib/{iconfont.1757986297727.ttf → iconfont.1758173429533.ttf} +0 -0
- /package/lib/{iconfont.1757986297727.woff → iconfont.1758173429533.woff} +0 -0
- /package/lib/{iconfont.1757986297727.woff2 → iconfont.1758173429533.woff2} +0 -0
package/lib/ui/index.min.js
CHANGED
|
@@ -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.9.30";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:{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:{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},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:{},select:{multiCharOverflow:8,remoteConfig:{enabled:!0,autoLoad:!0},virtualYConfig:{enabled:!0,gt:50,oSize:2}},split:{resize:!0,itemConfig:{minWidth:40,minHeight:40},resizeConfig:{showTip:!0}},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:{copyConfig:{showMessage:!0}},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:{},gantt:{}});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_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_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.9.32";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:{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:{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},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:{},select:{multiCharOverflow:8,remoteConfig:{enabled:!0,autoLoad:!0},virtualYConfig:{enabled:!0,gt:50,oSize:2}},split:{resize:!0,itemConfig:{minWidth:40,minHeight:40},resizeConfig:{showTip:!0}},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:{copyConfig:{showMessage:!0}},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:{},gantt:{}});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_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_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.9.
|
|
8
|
+
const version = `ui v${"4.9.32"}`;
|
|
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
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.warnLog=exports.errLog=void 0;var _core=require("@vxe-ui/core");const version="ui v4.9.
|
|
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.9.32",warnLog=exports.warnLog=_core.log.create("warn",version),errLog=exports.errLog=_core.log.create("error",version);
|
package/lib/upload/src/upload.js
CHANGED
|
@@ -1702,10 +1702,10 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
|
|
|
1702
1702
|
});
|
|
1703
1703
|
(0, _vue.onMounted)(() => {
|
|
1704
1704
|
if (props.multiple && props.singleMode) {
|
|
1705
|
-
(0, _log.errLog)('vxe.error.errConflicts', ['multiple', 'single-mode']);
|
|
1705
|
+
(0, _log.errLog)('vxe.error.errConflicts', ['[upload] multiple', 'single-mode']);
|
|
1706
1706
|
}
|
|
1707
1707
|
if (props.imageStyle) {
|
|
1708
|
-
(0, _log.warnLog)('vxe.error.delProp', ['image-style', 'image-config']);
|
|
1708
|
+
(0, _log.warnLog)('vxe.error.delProp', ['[upload] image-style', 'image-config']);
|
|
1709
1709
|
}
|
|
1710
1710
|
if (props.dragSort) {
|
|
1711
1711
|
(0, _dom.initTpImg)();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";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}}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)},pasteToUpload:{type:Boolean,default:()=>_xeUtils.default.clone((0,_ui.getConfig)().upload.pasteToUpload,!0)},keyField:String,singleMode:Boolean,urlMode:Boolean,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},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,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"],setup(U,e){const{emit:u,slots:E}=e,M=(0,_vue.inject)("$xeForm",null),T=(0,_vue.inject)("xeFormItemInfo",null),i=(0,_vue.inject)("$xeTable",null);var t=_xeUtils.default.uniqueId();const I=(0,_ui.useSize)(U)["computeSize"],g=(0,_vue.ref)(),v=(0,_vue.ref)(),m=(0,_vue.ref)(),c=(0,_vue.ref)(),D=(0,_vue.reactive)({isDragUploadStatus:!1,showMorePopup:!1,isActivated:!1,fileList:[],fileCacheMaps:{},isDragMove:!1,dragIndex:-1,dragTipText:""}),r={imagePreviewTypes:["jpg","jpeg","png","gif"],prevDragIndex:-1},a={refElem:g},S=(0,_vue.computed)(()=>{var e=U["readonly"];return null===e?!!M&&M.props.readonly:e}),B=(0,_vue.computed)(()=>{var e=U["disabled"];return null===e?!!M&&M.props.disabled:e}),L=(0,_vue.computed)(()=>U.keyField||"_X_KEY"),_=(0,_vue.computed)(()=>"image"===U.mode),P=(0,_vue.computed)(()=>U.nameField||"name"),F=(0,_vue.computed)(()=>U.typeField||"type"),O=(0,_vue.computed)(()=>U.urlField||"url"),A=(0,_vue.computed)(()=>U.sizeField||"size"),G=(0,_vue.computed)(()=>1024*_xeUtils.default.toNumber(U.limitSize)*1024),V=(0,_vue.computed)(()=>U.multiple?_xeUtils.default.toNumber(U.limitCount):1),C=(0,_vue.computed)(()=>{var e=U["multiple"],t=D["fileList"],o=V.value;return e?!o||t.length>=o:1<=t.length}),H=(0,_vue.computed)(()=>{var e=_xeUtils.default.toNumber(U.limitSize);return e?1048576<e?e/1048576+"T":1024<e?e/1024+"G":e+"M":""}),b=(0,_vue.computed)(()=>{var{showTip:e,tipText:t}=U;return _xeUtils.default.isBoolean(e)||(e=(0,_ui.getConfig)().upload.showTip,_xeUtils.default.isBoolean(e))?e:!!t}),Y=(0,_vue.computed)(()=>{var{limitSize:e,fileTypes:t,multiple:o,limitCount:i}=U,a=U.tipText||U.hintText,l=_.value,u=H.value;return _xeUtils.default.isString(a)?a:_xeUtils.default.isFunction(a)?""+a({}):(a=[],l?(o&&i&&a.push((0,_ui.getI18n)("vxe.upload.imgCountHint",[i])),e&&u&&a.push((0,_ui.getI18n)("vxe.upload.imgSizeHint",[u]))):(t&&t.length&&a.push((0,_ui.getI18n)("vxe.upload.fileTypeHint",[t.join("/")])),e&&u&&a.push((0,_ui.getI18n)("vxe.upload.fileSizeHint",[u])),o&&i&&a.push((0,_ui.getI18n)("vxe.upload.fileCountHint",[i]))),a.join((0,_ui.getI18n)("vxe.base.comma")))}),l=(0,_vue.computed)(()=>Object.assign({},U.imageConfig||U.imageStyle)),Q=(0,_vue.computed)(()=>{var{width:e,height:t}=l.value,o={};return e&&(o.width=(0,_dom.toCssUnit)(e)),t&&(o.height=(0,_dom.toCssUnit)(t)),o}),X=(0,_vue.computed)(()=>Object.assign({showMoreButton:!0},U.moreConfig)),d={},z={xID:t,props:U,context:e,reactData:D,internalData:r,getRefMaps:()=>a,getComputeMaps:()=>d},N=()=>_xeUtils.default.uniqueId(),j=e=>{return e[L.value]},s=()=>{var{modelValue:e,multiple:t}=U,o=S.value;const a=L.value,l=P.value,u=F.value,n=O.value,r=A.value;e=e?(e?_xeUtils.default.isArray(e)?e:[e]:[]).map(e=>{if(!e||_xeUtils.default.isString(e)){var t=""+(e||""),o=_xeUtils.default.parseUrl(e);const i=(o?o.searchQuery[l]:"")||decodeURIComponent(""+(t||"")).split("/").pop()||"";return{[l]:i,[u]:(o?o.searchQuery[u]:"")||k(i),[n]:t,[r]:_xeUtils.default.toNumber(o?o.searchQuery[r]:0)||0,[a]:N()}}const i=e[l]||"";return e[l]=i,e[u]=e[u]||k(i),e[n]=e[n]||"",e[r]=e[r]||0,e[a]=e[a]||N(),e}):[];D.fileList=o||t?e:e.slice(0,1)},k=e=>{var t=e.lastIndexOf(".");return 0<t?e.substring(t+1).toLowerCase():""},R=(e,t,o)=>{u(e,(0,_ui.createEvent)(o,{$upload:z},t))},$=e=>{var{singleMode:t,urlMode:o}=U;const i=O.value,a=P.value;let l=e?e.slice(0):[];o&&(l=l.map(e=>{var t=e[i];if(t){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})),e=t?l[0]||null:l,u("update:modelValue",e)},W=e=>{var t=U.getThumbnailUrlMethod||(0,_ui.getConfig)().upload.getThumbnailUrlMethod;return t?t({$upload:z,option:e}):n(e)},n=e=>{var t=U.getUrlMethod||(0,_ui.getConfig)().upload.getUrlMethod,o=O.value;return t?t({$upload:z,option:e}):e[o]},K=(e,t)=>{var o=U.previewMethod||(0,_ui.getConfig)().upload.previewMethod;if(U.showPreview)if(o)o({$upload:z,option:t});else{var i=t;var{imageTypes:o,showDownloadButton:t}=U;const l=F.value,u=U.beforeDownloadMethod||(0,_ui.getConfig)().upload.beforeDownloadMethod;var a=r["imagePreviewTypes"];a.concat(o||[]).some(e=>(""+e).toLowerCase()===(""+i[l]).toLowerCase())&&_ui.VxeUI.previewImage&&_ui.VxeUI.previewImage({urlList:[n(i)],showDownloadButton:t,beforeDownloadMethod:u?()=>u({$upload:z,option:i}):void 0})}},J=(e,t,o)=>{var i=U["showDownloadButton"];const a=D["fileList"],l=U.beforeDownloadMethod||(0,_ui.getConfig)().upload.beforeDownloadMethod;U.showPreview&&_ui.VxeUI.previewImage&&_ui.VxeUI.previewImage({urlList:a.map(e=>n(e)),activeIndex:o,showDownloadButton:i,beforeDownloadMethod:l?({index:e})=>l({$upload:z,option:a[e]}):void 0})},q=(o,e)=>{const i=U["showErrorStatus"],a=j(o);var t=U.uploadMethod||(0,_ui.getConfig)().upload.uploadMethod;return t?Promise.resolve(t({$upload:z,file:e,option:o,updateProgress(e){var t=D["fileCacheMaps"],t=t[j(o)];t&&(t.percent=Math.max(0,Math.min(99,_xeUtils.default.toNumber(e))))}})).then(e=>{var t=D["fileCacheMaps"],t=t[a];t&&(t.percent=100,t.status="success"),Object.assign(o,e),R("upload-success",{option:o,data:e},null)}).catch(e=>{var t=D["fileCacheMaps"],t=t[a];t&&(t.status="error"),i?Object.assign(o,e):D.fileList=D.fileList.filter(e=>j(e)!==a),R("upload-error",{option:o,data:e},null)}).finally(()=>{var e=D["fileCacheMaps"],e=e[a];e&&(e.loading=!1)}):(t=D["fileCacheMaps"],(e=t[a])&&(e.loading=!1),Promise.resolve())},Z=e=>{const{uploadMethod:t,urlMode:o}=U;var i,a=D["fileCacheMaps"],a=a[j(e)];(t||(0,_ui.getConfig)().upload.uploadMethod)&&a&&(i=a.file,a.loading=!0,a.status="pending",a.percent=0,q(e,i).then(()=>{o&&$(D.fileList)}))},p=(t,i)=>{const{multiple:e,urlMode:o,showLimitSize:a,limitSizeText:l,showLimitCount:u,limitCountText:n,autoSubmit:r}=U;var d=D["fileList"];const s=U.uploadMethod||(0,_ui.getConfig)().upload.uploadMethod,p=L.value,v=P.value,g=F.value,m=O.value,c=A.value;var _=G.value;const f=V.value;var h=H.value;let x=t;if(e&&f){if(u&&d.length>=f)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:f}):n):(0,_ui.getI18n)("vxe.upload.overCountErr",[f])}));const C=x.length-(f-d.length);if(u&&0<C){const b=x.slice(f-d.length);n?_ui.VxeUI.modal.notification({title:(0,_ui.getI18n)("vxe.modal.errTitle"),status:"error",content:""+(_xeUtils.default.isFunction(n)?n({maxCount:f}):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",[f,C])),(0,_vue.h)("div",{class:"vxe-upload--file-message-over-extra"},b.map((e,t)=>(0,_vue.h)("div",{key:t,class:"vxe-upload--file-message-over-extra-item"},e.name)))])}}})}x=x.slice(0,f-d.length)}if(a&&_)for(let e=0;e<t.length;e++)if(t[0].size>_)return void(_ui.VxeUI.modal&&_ui.VxeUI.modal.notification({title:(0,_ui.getI18n)("vxe.modal.errTitle"),status:"error",content:l?""+(_xeUtils.default.isFunction(l)?l({maxSize:_}):l):(0,_ui.getI18n)("vxe.upload.overSizeErr",[h])}));const y=Object.assign({},D.fileCacheMaps),w=e?d:[],I=[];x.forEach(e=>{var t=e["name"],o=N(),t={[v]:t,[g]:k(t),[c]:e.size,[m]:URL.createObjectURL(e),[p]:o},o=(s&&(y[o]={file:e,loading:!!r,status:"pending",percent:0}),(0,_vue.reactive)(t));s&&r&&I.push(q(o,e)),w.push(o),R("add",{option:o},i)}),D.fileList=w,D.fileCacheMaps=y,Promise.all(o?I:[]).then(()=>{$(w),M&&T&&M.triggerItemEvent(i,T.itemConfig.field,w)})},ee=t=>{var{multiple:e,imageTypes:o,fileTypes:i}=U,a=B.value,l=_.value;return a?Promise.resolve({status:!1,files:[],file:null}):(0,_util.readLocalFile)({multiple:e,types:l?o:i}).then(e=>(p(e.files,t),e))},te=e=>{ee(e).catch(()=>{})},oe=(e,t,o)=>{var i=D["fileList"];i.splice(o,1),$(i),M&&T&&M.triggerItemEvent(e,T.itemConfig.field,i),R("remove",{option:t},e)},ie=(t,o,i)=>{var e=U.beforeRemoveMethod||(0,_ui.getConfig)().upload.beforeRemoveMethod;const a=U.removeMethod||(0,_ui.getConfig)().upload.removeMethod;Promise.resolve(!e||e({$upload:z,option:o})).then(e=>{e?a?Promise.resolve(a({$upload:z,option:o})).then(()=>{oe(t,o,i)}).catch(e=>e):oe(t,o,i):R("remove-fail",{option:o},t)})},ae=(e,t)=>{R("download",{option:t},e)},le=(t,o)=>{var e=U.beforeDownloadMethod||(0,_ui.getConfig)().upload.beforeDownloadMethod;const i=U.downloadMethod||(0,_ui.getConfig)().upload.downloadMethod;Promise.resolve(!e||e({$upload:z,option:o})).then(e=>{e?i?Promise.resolve(i({$upload:z,option:o})).then(()=>{ae(t,o)}).catch(e=>e):ae(t,o):R("download-fail",{option:o},t)})},ue=e=>{var t,o,i,a=e.currentTarget,{clientX:e,clientY:l}=e;a&&({x:a,y:t,height:o,width:i}=a.getBoundingClientRect(),e<a||a+i<e||l<t||t+o<l)&&(D.isDragUploadStatus=!1)},ne=e=>{var t=e.dataTransfer;t&&(t=t["items"],t)&&t.length&&(e.preventDefault(),D.isDragUploadStatus=!0)},re=(e,t)=>{const{imageTypes:o,fileTypes:i}=U;var a=r["imagePreviewTypes"];if(_.value){const l=a.concat(o&&o.length?o:[]);t=t.filter(e=>{const t=(""+(e.type.split("/")[1]||"")).toLowerCase();return!!l.some(e=>(""+e).toLowerCase()===t)})}else if(i&&i.length){const u=[];if(t.forEach(e=>{const t=k(e.name);i.some(e=>(""+e).toLowerCase()===t)||u.push(t)}),u.length)return void(_ui.VxeUI.modal&&_ui.VxeUI.modal.message({content:(0,_ui.getI18n)("vxe.error.notType",[u.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")})},de=e=>{var t=e.dataTransfer;t&&(t=t["items"],t)&&t.length&&(e.preventDefault(),(t=se(t)).length)&&re(e,t),D.isDragUploadStatus=!1},se=e=>{const t=[];return _xeUtils.default.arrayEach(e,e=>{e=e.getAsFile();e&&t.push(e)}),t},f=()=>{const s=S.value,p=_.value;_ui.VxeUI.modal&&_ui.VxeUI.modal.open({title:s?(0,_ui.getI18n)("vxe.upload.morePopup.readTitle"):(0,_ui.getI18n)("vxe.upload.morePopup."+(p?"imageTitle":"fileTitle")),width:660,height:500,escClosable:!0,showMaximize:!0,resize:!0,maskClosable:!0,slots:{default(){var{showErrorStatus:e,dragToUpload:t,dragSort:o}=U,{isActivated:i,isDragMove:a,isDragUploadStatus:l,dragIndex:u}=D;const n=D["fileList"];var r=B.value,d={};return t&&-1===u&&(d.onDragover=ne,d.onDragleave=ue,d.onDrop=de),(0,_vue.h)("div",Object.assign({ref:v,class:["vxe-upload--more-popup",{"is--readonly":s,"is--disabled":r,"is--active":i,"show--error":e,"is--drag":l}]},d),[p?o?(0,_vue.h)(_vue.TransitionGroup,{name:"vxe-upload--drag-list"+(a?"":"-disabled"),tag:"div",class:"vxe-upload--image-more-list"},{default:()=>y(n,!0).concat(w(!0))}):(0,_vue.h)("div",{class:"vxe-upload--image-more-list"},y(n,!0).concat(w(!0))):(0,_vue.h)("div",{class:"vxe-upload--file-more-list"},[x(!0),o?(0,_vue.h)(_vue.TransitionGroup,{name:"vxe-upload--drag-list"+(a?"":"-disabled"),tag:"div",class:"vxe-upload--file-list"},{default:()=>h(n,!1)}):(0,_vue.h)("div",{class:"vxe-upload--file-list"},h(n,!0))]),o?(0,_vue.h)("div",{ref:c,class:"vxe-upload--drag-line"}):(0,_ui.renderEmptyElement)(z),l?(0,_vue.h)("div",{class:"vxe-upload--drag-placeholder"},(0,_ui.getI18n)("vxe.upload.dragPlaceholder")):(0,_ui.renderEmptyElement)(z)])}},onShow(){D.showMorePopup=!0},onHide(){D.showMorePopup=!1}})},pe=(e,t,o)=>{var i,a=D["showMorePopup"],l=g.value,u=v.value,u=a?u:l;u&&(l=u.getBoundingClientRect(),u=m.value,i=c.value,a=a?i:u)&&(i=t.getBoundingClientRect(),a.style.display="block",a.style.top=Math.max(1,i.y-l.y)+"px",a.style.left=Math.max(1,i.x-l.x)+"px",a.style.height=i.height+"px",a.style.width=i.width-1+"px",a.setAttribute("drag-pos",o))},ve=e=>{e.stopPropagation(),e.dataTransfer&&e.dataTransfer.setDragImage((0,_dom.getTpImg)(),0,0);const t=e.currentTarget;e=t.parentElement,e=_xeUtils.default.findIndexOf(Array.from(e.children),e=>t===e);D.isDragMove=!0,D.dragIndex=e,setTimeout(()=>{D.isDragMove=!1},500)},ge=t=>{t.stopPropagation(),t.preventDefault();var o=D["dragIndex"];if(-1!==o){var i=_.value;const l=t.currentTarget;var a=l.parentElement,a=_xeUtils.default.findIndexOf(Array.from(a.children),e=>l===e);let e="";e=i?t.clientX-l.getBoundingClientRect().x<l.clientWidth/2?"left":"right":t.clientY-l.getBoundingClientRect().y<l.clientHeight/2?"top":"bottom",o===a?pe(0,l,e):(pe(0,l,e),r.prevDragIndex=a,r.prevDragPos=e)}},me=e=>{var{fileList:t,dragIndex:o}=D,{prevDragIndex:i,prevDragPos:a}=r,l="bottom"===a||"right"===a?1:0,u=t[o];const n=t[i];u&&n&&(t.splice(o,1),i=_xeUtils.default.findIndexOf(t,e=>n===e)+l,t.splice(i,0,u),R("sort-dragend",{oldItem:u,newItem:n,dragPos:a,offsetIndex:l,_index:{newIndex:i,oldIndex:o}},e)),t=m.value,u=c.value,t&&(t.style.display=""),u&&(u.style.display=""),D.dragIndex=-1},ce=e=>{i&&e.stopPropagation(),D.isActivated=!0},_e=e=>{var t=U["pasteToUpload"],o=D["isActivated"];o&&t&&(o=e.clipboardData||e.originalEvent.clipboardData)&&(t=o["items"],t)&&(o=se(t)).length&&(e.preventDefault(),re(e,o))},fe=e=>{var t=g.value,o=v.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),D.isActivated=i},he=()=>{D.isActivated=!1};t={dispatchEvent:R,choose(){return ee(null)},submit(i){var e=U["maxSimultaneousUploads"],e=_xeUtils.default.toNumber(e||1)||1;const{fileList:t,fileCacheMaps:a}=D,o=t.filter(e=>{e=j(e),e=a[e];return e&&("pending"===e.status||i&&"error"===e.status)}),l=e=>{var t=j(e),t=a[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),l(e).then(u)):Promise.resolve()};return Promise.all(o.splice(0,e).map(l)).then(()=>{})}};Object.assign(z,t,{});const h=(e,r)=>{const{showRemoveButton:d,showDownloadButton:s,showProgress:p,progressText:v,showPreview:g,showErrorStatus:m,dragSort:c,autoSubmit:_,showSubmitButton:f}=U,h=D["fileCacheMaps"],x=B.value,y=S.value,w=P.value,I=F.value,C=E.corner,b={};return c&&1<e.length&&(b.onDragstart=ve,b.onDragover=ge,b.onDragend=me),e.map((t,o)=>{var e=j(t),i=h[e];let a=!1,l=!1,u=!1;var n=""+(t[w]||"");return i&&(a=i.loading,l="error"===i.status,u="pending"===i.status),(0,_vue.h)("div",Object.assign({key:c?e:o,class:["vxe-upload--file-item",{"is--preview":g,"is--loading":a,"is--pending":u,"is--error":l}],fileid:e,draggable:!!c||null},b),[(0,_vue.h)("div",{class:"vxe-upload--file-item-icon"},[(0,_vue.h)("i",{class:(0,_ui.getIcon)()["UPLOAD_FILE_TYPE_"+(""+t[I]).toLocaleUpperCase()]||(0,_ui.getIcon)().UPLOAD_FILE_TYPE_DEFAULT})]),(0,_vue.h)("div",{class:"vxe-upload--file-item-name",title:n,onClick(e){a||l||K(e,t)}},n),a?(0,_vue.h)("div",{class:"vxe-upload--file-item-loading-icon"},[(0,_vue.h)("i",{class:(0,_ui.getIcon)().UPLOAD_LOADING})]):(0,_ui.renderEmptyElement)(z),p&&a&&i?(0,_vue.h)("div",{class:"vxe-upload--file-item-loading-text"},v?_xeUtils.default.toFormatString(""+(_xeUtils.default.isFunction(v)?v({}):v),{percent:i.percent}):(0,_ui.getI18n)("vxe.upload.uploadProgress",[i.percent])):(0,_ui.renderEmptyElement)(z),!a&&(l&&m||u&&f&&!_)?(0,_vue.h)("div",{class:"vxe-upload--file-item-rebtn"},[(0,_vue.h)(_button.default,{icon:l?(0,_ui.getIcon)().UPLOAD_IMAGE_RE_UPLOAD:(0,_ui.getIcon)().UPLOAD_IMAGE_UPLOAD,mode:"text",status:"primary",content:l?(0,_ui.getI18n)("vxe.upload.reUpload"):(0,_ui.getI18n)("vxe.upload.manualUpload"),onClick(){Z(t)}})]):(0,_ui.renderEmptyElement)(z),(0,_vue.h)("div",{class:"vxe-upload--file-item-btn-wrapper"},[C?(0,_vue.h)("div",{class:"vxe-upload--file-item-corner"},(0,_vn.getSlotVNs)(C({option:t,isMoreView:r,readonly:y}))):(0,_ui.renderEmptyElement)(z),!s||a||u?(0,_ui.renderEmptyElement)(z):(0,_vue.h)("div",{class:"vxe-upload--file-item-download-btn",onClick(e){le(e,t)}},[(0,_vue.h)("i",{class:(0,_ui.getIcon)().UPLOAD_FILE_DOWNLOAD})]),!d||y||x||a?(0,_ui.renderEmptyElement)(z):(0,_vue.h)("div",{class:"vxe-upload--file-item-remove-btn",onClick(e){ie(e,t,o)}},[(0,_vue.h)("i",{class:(0,_ui.getIcon)().UPLOAD_FILE_REMOVE})])])])})},x=e=>{var{showUploadButton:t,buttonText:o,buttonIcon:i,showButtonText:a,showButtonIcon:l,autoHiddenButton:u}=U,n=B.value,r=S.value,d=b.value,s=Y.value,p=C.value,v=E.default,g=E.tip||E.hint;return r||!t?(0,_ui.renderEmptyElement)(z):(0,_vue.h)("div",{class:"vxe-upload--file-action"},[u&&p?(0,_ui.renderEmptyElement)(z):(0,_vue.h)("div",{class:"vxe-upload--file-action-btn",onClick:te},v?(0,_vn.getSlotVNs)(v({$upload:z})):[(0,_vue.h)(_button.default,{class:"vxe-upload--file-action-button",content:e||a?o?""+(_xeUtils.default.isFunction(o)?o({}):o):(0,_ui.getI18n)("vxe.upload.fileBtnText"):"",icon:l?i||(0,_ui.getIcon)().UPLOAD_FILE_ADD:"",disabled:n})]),d&&(s||g)?(0,_vue.h)("div",{class:"vxe-upload--file-action-tip"},g?(0,_vn.getSlotVNs)(g({$upload:z})):""+s):(0,_ui.renderEmptyElement)(z)])},y=(e,n)=>{const{showRemoveButton:r,showProgress:d,progressText:s,showPreview:p,showErrorStatus:v,dragSort:g,autoSubmit:m,showSubmitButton:c}=U,_=D["fileCacheMaps"],f=B.value,h=S.value,x=l.value,y=Q.value,w=E.corner,I={onMousedown:ce};return g&&1<e.length&&(I.onDragstart=ve,I.onDragover=ge,I.onDragend=me),e.map((t,o)=>{var e=j(t),i=_[e];let a=!1,l=!1,u=!1;return i&&(a=i.loading,l="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":x.circle,"is--loading":a,"is--pending":u,"is--error":l}],fileid:e,draggable:!!g||null},I),[(0,_vue.h)("div",{class:"vxe-upload--image-item-box",style:n?null:y,onClick(e){a||l||J(e,t,o)}},[a&&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)(z)]):(0,_ui.renderEmptyElement)(z),(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:W(t)})]),!a&&(l&&v||u&&c&&!m)?(0,_vue.h)("div",{class:"vxe-upload--image-item-rebtn"},[(0,_vue.h)(_button.default,{icon:l?(0,_ui.getIcon)().UPLOAD_IMAGE_RE_UPLOAD:(0,_ui.getIcon)().UPLOAD_IMAGE_UPLOAD,mode:"text",status:"primary",content:l?(0,_ui.getI18n)("vxe.upload.reUpload"):(0,_ui.getI18n)("vxe.upload.manualUpload"),onClick(){Z(t)}})]):(0,_ui.renderEmptyElement)(z),(0,_vue.h)("div",{class:"vxe-upload--image-item-btn-wrapper",onClick(e){e.stopPropagation()}},[w?(0,_vue.h)("div",{class:"vxe-upload--file-item-corner"},(0,_vn.getSlotVNs)(w({option:t,isMoreView:n,readonly:h}))):(0,_ui.renderEmptyElement)(z),!r||h||f||a?(0,_ui.renderEmptyElement)(z):(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})])])])])})},w=e=>{var{showUploadButton:t,buttonText:o,buttonIcon:i,showButtonText:a,showButtonIcon:l,autoHiddenButton:u}=U,n=S.value,r=b.value,d=Y.value,s=C.value,p=Q.value,v=E.default,g=E.tip||E.hint;return n||!t||u&&s?(0,_ui.renderEmptyElement)(z):(0,_vue.h)("div",{key:"action",class:"vxe-upload--image-action"},[(0,_vue.h)("div",{class:"vxe-upload--image-action-btn",onClick:te},v?v({$upload:z}):[(0,_vue.h)("div",{class:"vxe-upload--image-action-box",style:e?null:p},[l?(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)(z),e||a?(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)(z),r&&(d||g)?(0,_vue.h)("div",{class:"vxe-upload--image-action-hint"},g?(0,_vn.getSlotVNs)(g({$upload:z})):""+d):(0,_ui.renderEmptyElement)(z)])])])};const o=(0,_vue.ref)(0);return(0,_vue.watch)(()=>U.modelValue?U.modelValue.length:0,()=>{o.value++}),(0,_vue.watch)(()=>U.modelValue,()=>{o.value++}),(0,_vue.watch)(o,()=>{s()}),(0,_vue.onMounted)(()=>{U.multiple&&U.singleMode&&(0,_log.errLog)("vxe.error.errConflicts",["multiple","single-mode"]),U.imageStyle&&(0,_log.warnLog)("vxe.error.delProp",["image-style","image-config"]),U.dragSort&&(0,_dom.initTpImg)(),_ui.globalEvents.on(z,"paste",_e),_ui.globalEvents.on(z,"mousedown",fe),_ui.globalEvents.on(z,"blur",he)}),(0,_vue.onUnmounted)(()=>{D.isDragUploadStatus=!1,_ui.globalEvents.off(z,"paste"),_ui.globalEvents.off(z,"mousedown"),_ui.globalEvents.off(z,"blur")}),s(),z.renderVN=()=>{var{showErrorStatus:e,dragToUpload:t,pasteToUpload:o,dragSort:i}=U,{isDragUploadStatus:a,showMorePopup:l,isActivated:u,dragIndex:n}=D,r=I.value,d=B.value,s=S.value,p=_.value,v={onMousedown:ce};return t&&-1===n&&(v.onDragover=ne,v.onDragleave=ue,v.onDrop=de),(0,_vue.h)("div",Object.assign({ref:g,class:["vxe-upload",{["size--"+r]:r,"is--active":u,"is--readonly":s,"is--disabled":d,"is--paste":o,"show--error":e,"is--drag":a}]},v),[(p?()=>{var{showList:e,dragSort:t}=U;const{fileList:o,isDragMove:i}=D,{maxCount:a,showMoreButton:l}=X.value;let u=o,n=0;return a&&o.length>a&&(n=o.length-a,u=o.slice(0,a)),(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:()=>y(u,!1).concat([l&&n?(0,_vue.h)("div",{key:"om",class:"vxe-upload--image-over-more"},[(0,_vue.h)(_button.default,{mode:"text",content:(0,_ui.getI18n)("vxe.upload.moreBtnText",[o.length]),status:"primary",onClick:f})]):(0,_ui.renderEmptyElement)(z),w(!1)])}):(0,_vue.h)("div",{class:"vxe-upload--image-list"},y(u,!1).concat([l&&n?(0,_vue.h)("div",{class:"vxe-upload--image-over-more"},[(0,_vue.h)(_button.default,{mode:"text",content:(0,_ui.getI18n)("vxe.upload.moreBtnText",[o.length]),status:"primary",onClick:f})]):(0,_ui.renderEmptyElement)(z),w(!1)]))]:[(0,_vue.h)("div",{class:"vxe-upload--image-list"},[w(!1)])])}:()=>{var{showList:e,moreConfig:t,dragSort:o}=U,{fileList:i,isDragMove:a}=D,{maxCount:l,showMoreButton:u,layout:n}=X.value,n="horizontal"===n;let r=i,d=0;return l&&i.length>l&&(d=i.length-l,r=i.slice(0,l)),(0,_vue.h)("div",{key:"all",class:"vxe-upload--file-wrapper"},e?[u&&t&&n?(0,_ui.renderEmptyElement)(z):x(!0),r.length||u&&n?(0,_vue.h)("div",{class:["vxe-upload--file-list-wrapper",{"is--horizontal":n}]},[r.length?o?(0,_vue.h)(_vue.TransitionGroup,{name:"vxe-upload--drag-list"+(a?"":"-disabled"),tag:"div",class:"vxe-upload--file-list"},{default:()=>h(r,!1)}):(0,_vue.h)("div",{class:"vxe-upload--file-list"},h(r,!1)):(0,_ui.renderEmptyElement)(z),u&&d?(0,_vue.h)("div",{class:"vxe-upload--file-over-more"},[(0,_vue.h)(_button.default,{mode:"text",content:(0,_ui.getI18n)("vxe.upload.moreBtnText",[i.length]),status:"primary",onClick:f})]):(0,_ui.renderEmptyElement)(z),u&&t&&n?x(!1):(0,_ui.renderEmptyElement)(z)]):(0,_ui.renderEmptyElement)(z)]:[x(!1)])})(),i?(0,_vue.h)("div",{ref:m,class:"vxe-upload--drag-line"}):(0,_ui.renderEmptyElement)(z),a&&!l?(0,_vue.h)("div",{class:"vxe-upload--drag-placeholder"},(0,_ui.getI18n)("vxe.upload.dragPlaceholder")):(0,_ui.renderEmptyElement)(z)])},z},render(){return this.renderVN()}});
|
|
1
|
+
"use strict";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}}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)},pasteToUpload:{type:Boolean,default:()=>_xeUtils.default.clone((0,_ui.getConfig)().upload.pasteToUpload,!0)},keyField:String,singleMode:Boolean,urlMode:Boolean,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},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,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"],setup(U,e){const{emit:u,slots:E}=e,M=(0,_vue.inject)("$xeForm",null),T=(0,_vue.inject)("xeFormItemInfo",null),i=(0,_vue.inject)("$xeTable",null);var t=_xeUtils.default.uniqueId();const I=(0,_ui.useSize)(U)["computeSize"],g=(0,_vue.ref)(),v=(0,_vue.ref)(),m=(0,_vue.ref)(),c=(0,_vue.ref)(),D=(0,_vue.reactive)({isDragUploadStatus:!1,showMorePopup:!1,isActivated:!1,fileList:[],fileCacheMaps:{},isDragMove:!1,dragIndex:-1,dragTipText:""}),r={imagePreviewTypes:["jpg","jpeg","png","gif"],prevDragIndex:-1},a={refElem:g},S=(0,_vue.computed)(()=>{var e=U["readonly"];return null===e?!!M&&M.props.readonly:e}),B=(0,_vue.computed)(()=>{var e=U["disabled"];return null===e?!!M&&M.props.disabled:e}),L=(0,_vue.computed)(()=>U.keyField||"_X_KEY"),_=(0,_vue.computed)(()=>"image"===U.mode),P=(0,_vue.computed)(()=>U.nameField||"name"),F=(0,_vue.computed)(()=>U.typeField||"type"),O=(0,_vue.computed)(()=>U.urlField||"url"),A=(0,_vue.computed)(()=>U.sizeField||"size"),G=(0,_vue.computed)(()=>1024*_xeUtils.default.toNumber(U.limitSize)*1024),V=(0,_vue.computed)(()=>U.multiple?_xeUtils.default.toNumber(U.limitCount):1),C=(0,_vue.computed)(()=>{var e=U["multiple"],t=D["fileList"],o=V.value;return e?!o||t.length>=o:1<=t.length}),H=(0,_vue.computed)(()=>{var e=_xeUtils.default.toNumber(U.limitSize);return e?1048576<e?e/1048576+"T":1024<e?e/1024+"G":e+"M":""}),b=(0,_vue.computed)(()=>{var{showTip:e,tipText:t}=U;return _xeUtils.default.isBoolean(e)||(e=(0,_ui.getConfig)().upload.showTip,_xeUtils.default.isBoolean(e))?e:!!t}),Y=(0,_vue.computed)(()=>{var{limitSize:e,fileTypes:t,multiple:o,limitCount:i}=U,a=U.tipText||U.hintText,l=_.value,u=H.value;return _xeUtils.default.isString(a)?a:_xeUtils.default.isFunction(a)?""+a({}):(a=[],l?(o&&i&&a.push((0,_ui.getI18n)("vxe.upload.imgCountHint",[i])),e&&u&&a.push((0,_ui.getI18n)("vxe.upload.imgSizeHint",[u]))):(t&&t.length&&a.push((0,_ui.getI18n)("vxe.upload.fileTypeHint",[t.join("/")])),e&&u&&a.push((0,_ui.getI18n)("vxe.upload.fileSizeHint",[u])),o&&i&&a.push((0,_ui.getI18n)("vxe.upload.fileCountHint",[i]))),a.join((0,_ui.getI18n)("vxe.base.comma")))}),l=(0,_vue.computed)(()=>Object.assign({},U.imageConfig||U.imageStyle)),Q=(0,_vue.computed)(()=>{var{width:e,height:t}=l.value,o={};return e&&(o.width=(0,_dom.toCssUnit)(e)),t&&(o.height=(0,_dom.toCssUnit)(t)),o}),X=(0,_vue.computed)(()=>Object.assign({showMoreButton:!0},U.moreConfig)),d={},z={xID:t,props:U,context:e,reactData:D,internalData:r,getRefMaps:()=>a,getComputeMaps:()=>d},N=()=>_xeUtils.default.uniqueId(),j=e=>{return e[L.value]},s=()=>{var{modelValue:e,multiple:t}=U,o=S.value;const a=L.value,l=P.value,u=F.value,n=O.value,r=A.value;e=e?(e?_xeUtils.default.isArray(e)?e:[e]:[]).map(e=>{if(!e||_xeUtils.default.isString(e)){var t=""+(e||""),o=_xeUtils.default.parseUrl(e);const i=(o?o.searchQuery[l]:"")||decodeURIComponent(""+(t||"")).split("/").pop()||"";return{[l]:i,[u]:(o?o.searchQuery[u]:"")||k(i),[n]:t,[r]:_xeUtils.default.toNumber(o?o.searchQuery[r]:0)||0,[a]:N()}}const i=e[l]||"";return e[l]=i,e[u]=e[u]||k(i),e[n]=e[n]||"",e[r]=e[r]||0,e[a]=e[a]||N(),e}):[];D.fileList=o||t?e:e.slice(0,1)},k=e=>{var t=e.lastIndexOf(".");return 0<t?e.substring(t+1).toLowerCase():""},R=(e,t,o)=>{u(e,(0,_ui.createEvent)(o,{$upload:z},t))},$=e=>{var{singleMode:t,urlMode:o}=U;const i=O.value,a=P.value;let l=e?e.slice(0):[];o&&(l=l.map(e=>{var t=e[i];if(t){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})),e=t?l[0]||null:l,u("update:modelValue",e)},W=e=>{var t=U.getThumbnailUrlMethod||(0,_ui.getConfig)().upload.getThumbnailUrlMethod;return t?t({$upload:z,option:e}):n(e)},n=e=>{var t=U.getUrlMethod||(0,_ui.getConfig)().upload.getUrlMethod,o=O.value;return t?t({$upload:z,option:e}):e[o]},K=(e,t)=>{var o=U.previewMethod||(0,_ui.getConfig)().upload.previewMethod;if(U.showPreview)if(o)o({$upload:z,option:t});else{var i=t;var{imageTypes:o,showDownloadButton:t}=U;const l=F.value,u=U.beforeDownloadMethod||(0,_ui.getConfig)().upload.beforeDownloadMethod;var a=r["imagePreviewTypes"];a.concat(o||[]).some(e=>(""+e).toLowerCase()===(""+i[l]).toLowerCase())&&_ui.VxeUI.previewImage&&_ui.VxeUI.previewImage({urlList:[n(i)],showDownloadButton:t,beforeDownloadMethod:u?()=>u({$upload:z,option:i}):void 0})}},J=(e,t,o)=>{var i=U["showDownloadButton"];const a=D["fileList"],l=U.beforeDownloadMethod||(0,_ui.getConfig)().upload.beforeDownloadMethod;U.showPreview&&_ui.VxeUI.previewImage&&_ui.VxeUI.previewImage({urlList:a.map(e=>n(e)),activeIndex:o,showDownloadButton:i,beforeDownloadMethod:l?({index:e})=>l({$upload:z,option:a[e]}):void 0})},q=(o,e)=>{const i=U["showErrorStatus"],a=j(o);var t=U.uploadMethod||(0,_ui.getConfig)().upload.uploadMethod;return t?Promise.resolve(t({$upload:z,file:e,option:o,updateProgress(e){var t=D["fileCacheMaps"],t=t[j(o)];t&&(t.percent=Math.max(0,Math.min(99,_xeUtils.default.toNumber(e))))}})).then(e=>{var t=D["fileCacheMaps"],t=t[a];t&&(t.percent=100,t.status="success"),Object.assign(o,e),R("upload-success",{option:o,data:e},null)}).catch(e=>{var t=D["fileCacheMaps"],t=t[a];t&&(t.status="error"),i?Object.assign(o,e):D.fileList=D.fileList.filter(e=>j(e)!==a),R("upload-error",{option:o,data:e},null)}).finally(()=>{var e=D["fileCacheMaps"],e=e[a];e&&(e.loading=!1)}):(t=D["fileCacheMaps"],(e=t[a])&&(e.loading=!1),Promise.resolve())},Z=e=>{const{uploadMethod:t,urlMode:o}=U;var i,a=D["fileCacheMaps"],a=a[j(e)];(t||(0,_ui.getConfig)().upload.uploadMethod)&&a&&(i=a.file,a.loading=!0,a.status="pending",a.percent=0,q(e,i).then(()=>{o&&$(D.fileList)}))},p=(t,i)=>{const{multiple:e,urlMode:o,showLimitSize:a,limitSizeText:l,showLimitCount:u,limitCountText:n,autoSubmit:r}=U;var d=D["fileList"];const s=U.uploadMethod||(0,_ui.getConfig)().upload.uploadMethod,p=L.value,v=P.value,g=F.value,m=O.value,c=A.value;var _=G.value;const f=V.value;var h=H.value;let x=t;if(e&&f){if(u&&d.length>=f)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:f}):n):(0,_ui.getI18n)("vxe.upload.overCountErr",[f])}));const C=x.length-(f-d.length);if(u&&0<C){const b=x.slice(f-d.length);n?_ui.VxeUI.modal.notification({title:(0,_ui.getI18n)("vxe.modal.errTitle"),status:"error",content:""+(_xeUtils.default.isFunction(n)?n({maxCount:f}):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",[f,C])),(0,_vue.h)("div",{class:"vxe-upload--file-message-over-extra"},b.map((e,t)=>(0,_vue.h)("div",{key:t,class:"vxe-upload--file-message-over-extra-item"},e.name)))])}}})}x=x.slice(0,f-d.length)}if(a&&_)for(let e=0;e<t.length;e++)if(t[0].size>_)return void(_ui.VxeUI.modal&&_ui.VxeUI.modal.notification({title:(0,_ui.getI18n)("vxe.modal.errTitle"),status:"error",content:l?""+(_xeUtils.default.isFunction(l)?l({maxSize:_}):l):(0,_ui.getI18n)("vxe.upload.overSizeErr",[h])}));const y=Object.assign({},D.fileCacheMaps),w=e?d:[],I=[];x.forEach(e=>{var t=e["name"],o=N(),t={[v]:t,[g]:k(t),[c]:e.size,[m]:URL.createObjectURL(e),[p]:o},o=(s&&(y[o]={file:e,loading:!!r,status:"pending",percent:0}),(0,_vue.reactive)(t));s&&r&&I.push(q(o,e)),w.push(o),R("add",{option:o},i)}),D.fileList=w,D.fileCacheMaps=y,Promise.all(o?I:[]).then(()=>{$(w),M&&T&&M.triggerItemEvent(i,T.itemConfig.field,w)})},ee=t=>{var{multiple:e,imageTypes:o,fileTypes:i}=U,a=B.value,l=_.value;return a?Promise.resolve({status:!1,files:[],file:null}):(0,_util.readLocalFile)({multiple:e,types:l?o:i}).then(e=>(p(e.files,t),e))},te=e=>{ee(e).catch(()=>{})},oe=(e,t,o)=>{var i=D["fileList"];i.splice(o,1),$(i),M&&T&&M.triggerItemEvent(e,T.itemConfig.field,i),R("remove",{option:t},e)},ie=(t,o,i)=>{var e=U.beforeRemoveMethod||(0,_ui.getConfig)().upload.beforeRemoveMethod;const a=U.removeMethod||(0,_ui.getConfig)().upload.removeMethod;Promise.resolve(!e||e({$upload:z,option:o})).then(e=>{e?a?Promise.resolve(a({$upload:z,option:o})).then(()=>{oe(t,o,i)}).catch(e=>e):oe(t,o,i):R("remove-fail",{option:o},t)})},ae=(e,t)=>{R("download",{option:t},e)},le=(t,o)=>{var e=U.beforeDownloadMethod||(0,_ui.getConfig)().upload.beforeDownloadMethod;const i=U.downloadMethod||(0,_ui.getConfig)().upload.downloadMethod;Promise.resolve(!e||e({$upload:z,option:o})).then(e=>{e?i?Promise.resolve(i({$upload:z,option:o})).then(()=>{ae(t,o)}).catch(e=>e):ae(t,o):R("download-fail",{option:o},t)})},ue=e=>{var t,o,i,a=e.currentTarget,{clientX:e,clientY:l}=e;a&&({x:a,y:t,height:o,width:i}=a.getBoundingClientRect(),e<a||a+i<e||l<t||t+o<l)&&(D.isDragUploadStatus=!1)},ne=e=>{var t=e.dataTransfer;t&&(t=t["items"],t)&&t.length&&(e.preventDefault(),D.isDragUploadStatus=!0)},re=(e,t)=>{const{imageTypes:o,fileTypes:i}=U;var a=r["imagePreviewTypes"];if(_.value){const l=a.concat(o&&o.length?o:[]);t=t.filter(e=>{const t=(""+(e.type.split("/")[1]||"")).toLowerCase();return!!l.some(e=>(""+e).toLowerCase()===t)})}else if(i&&i.length){const u=[];if(t.forEach(e=>{const t=k(e.name);i.some(e=>(""+e).toLowerCase()===t)||u.push(t)}),u.length)return void(_ui.VxeUI.modal&&_ui.VxeUI.modal.message({content:(0,_ui.getI18n)("vxe.error.notType",[u.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")})},de=e=>{var t=e.dataTransfer;t&&(t=t["items"],t)&&t.length&&(e.preventDefault(),(t=se(t)).length)&&re(e,t),D.isDragUploadStatus=!1},se=e=>{const t=[];return _xeUtils.default.arrayEach(e,e=>{e=e.getAsFile();e&&t.push(e)}),t},f=()=>{const s=S.value,p=_.value;_ui.VxeUI.modal&&_ui.VxeUI.modal.open({title:s?(0,_ui.getI18n)("vxe.upload.morePopup.readTitle"):(0,_ui.getI18n)("vxe.upload.morePopup."+(p?"imageTitle":"fileTitle")),width:660,height:500,escClosable:!0,showMaximize:!0,resize:!0,maskClosable:!0,slots:{default(){var{showErrorStatus:e,dragToUpload:t,dragSort:o}=U,{isActivated:i,isDragMove:a,isDragUploadStatus:l,dragIndex:u}=D;const n=D["fileList"];var r=B.value,d={};return t&&-1===u&&(d.onDragover=ne,d.onDragleave=ue,d.onDrop=de),(0,_vue.h)("div",Object.assign({ref:v,class:["vxe-upload--more-popup",{"is--readonly":s,"is--disabled":r,"is--active":i,"show--error":e,"is--drag":l}]},d),[p?o?(0,_vue.h)(_vue.TransitionGroup,{name:"vxe-upload--drag-list"+(a?"":"-disabled"),tag:"div",class:"vxe-upload--image-more-list"},{default:()=>y(n,!0).concat(w(!0))}):(0,_vue.h)("div",{class:"vxe-upload--image-more-list"},y(n,!0).concat(w(!0))):(0,_vue.h)("div",{class:"vxe-upload--file-more-list"},[x(!0),o?(0,_vue.h)(_vue.TransitionGroup,{name:"vxe-upload--drag-list"+(a?"":"-disabled"),tag:"div",class:"vxe-upload--file-list"},{default:()=>h(n,!1)}):(0,_vue.h)("div",{class:"vxe-upload--file-list"},h(n,!0))]),o?(0,_vue.h)("div",{ref:c,class:"vxe-upload--drag-line"}):(0,_ui.renderEmptyElement)(z),l?(0,_vue.h)("div",{class:"vxe-upload--drag-placeholder"},(0,_ui.getI18n)("vxe.upload.dragPlaceholder")):(0,_ui.renderEmptyElement)(z)])}},onShow(){D.showMorePopup=!0},onHide(){D.showMorePopup=!1}})},pe=(e,t,o)=>{var i,a=D["showMorePopup"],l=g.value,u=v.value,u=a?u:l;u&&(l=u.getBoundingClientRect(),u=m.value,i=c.value,a=a?i:u)&&(i=t.getBoundingClientRect(),a.style.display="block",a.style.top=Math.max(1,i.y-l.y)+"px",a.style.left=Math.max(1,i.x-l.x)+"px",a.style.height=i.height+"px",a.style.width=i.width-1+"px",a.setAttribute("drag-pos",o))},ve=e=>{e.stopPropagation(),e.dataTransfer&&e.dataTransfer.setDragImage((0,_dom.getTpImg)(),0,0);const t=e.currentTarget;e=t.parentElement,e=_xeUtils.default.findIndexOf(Array.from(e.children),e=>t===e);D.isDragMove=!0,D.dragIndex=e,setTimeout(()=>{D.isDragMove=!1},500)},ge=t=>{t.stopPropagation(),t.preventDefault();var o=D["dragIndex"];if(-1!==o){var i=_.value;const l=t.currentTarget;var a=l.parentElement,a=_xeUtils.default.findIndexOf(Array.from(a.children),e=>l===e);let e="";e=i?t.clientX-l.getBoundingClientRect().x<l.clientWidth/2?"left":"right":t.clientY-l.getBoundingClientRect().y<l.clientHeight/2?"top":"bottom",o===a?pe(0,l,e):(pe(0,l,e),r.prevDragIndex=a,r.prevDragPos=e)}},me=e=>{var{fileList:t,dragIndex:o}=D,{prevDragIndex:i,prevDragPos:a}=r,l="bottom"===a||"right"===a?1:0,u=t[o];const n=t[i];u&&n&&(t.splice(o,1),i=_xeUtils.default.findIndexOf(t,e=>n===e)+l,t.splice(i,0,u),R("sort-dragend",{oldItem:u,newItem:n,dragPos:a,offsetIndex:l,_index:{newIndex:i,oldIndex:o}},e)),t=m.value,u=c.value,t&&(t.style.display=""),u&&(u.style.display=""),D.dragIndex=-1},ce=e=>{i&&e.stopPropagation(),D.isActivated=!0},_e=e=>{var t=U["pasteToUpload"],o=D["isActivated"];o&&t&&(o=e.clipboardData||e.originalEvent.clipboardData)&&(t=o["items"],t)&&(o=se(t)).length&&(e.preventDefault(),re(e,o))},fe=e=>{var t=g.value,o=v.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),D.isActivated=i},he=()=>{D.isActivated=!1};t={dispatchEvent:R,choose(){return ee(null)},submit(i){var e=U["maxSimultaneousUploads"],e=_xeUtils.default.toNumber(e||1)||1;const{fileList:t,fileCacheMaps:a}=D,o=t.filter(e=>{e=j(e),e=a[e];return e&&("pending"===e.status||i&&"error"===e.status)}),l=e=>{var t=j(e),t=a[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),l(e).then(u)):Promise.resolve()};return Promise.all(o.splice(0,e).map(l)).then(()=>{})}};Object.assign(z,t,{});const h=(e,r)=>{const{showRemoveButton:d,showDownloadButton:s,showProgress:p,progressText:v,showPreview:g,showErrorStatus:m,dragSort:c,autoSubmit:_,showSubmitButton:f}=U,h=D["fileCacheMaps"],x=B.value,y=S.value,w=P.value,I=F.value,C=E.corner,b={};return c&&1<e.length&&(b.onDragstart=ve,b.onDragover=ge,b.onDragend=me),e.map((t,o)=>{var e=j(t),i=h[e];let a=!1,l=!1,u=!1;var n=""+(t[w]||"");return i&&(a=i.loading,l="error"===i.status,u="pending"===i.status),(0,_vue.h)("div",Object.assign({key:c?e:o,class:["vxe-upload--file-item",{"is--preview":g,"is--loading":a,"is--pending":u,"is--error":l}],fileid:e,draggable:!!c||null},b),[(0,_vue.h)("div",{class:"vxe-upload--file-item-icon"},[(0,_vue.h)("i",{class:(0,_ui.getIcon)()["UPLOAD_FILE_TYPE_"+(""+t[I]).toLocaleUpperCase()]||(0,_ui.getIcon)().UPLOAD_FILE_TYPE_DEFAULT})]),(0,_vue.h)("div",{class:"vxe-upload--file-item-name",title:n,onClick(e){a||l||K(e,t)}},n),a?(0,_vue.h)("div",{class:"vxe-upload--file-item-loading-icon"},[(0,_vue.h)("i",{class:(0,_ui.getIcon)().UPLOAD_LOADING})]):(0,_ui.renderEmptyElement)(z),p&&a&&i?(0,_vue.h)("div",{class:"vxe-upload--file-item-loading-text"},v?_xeUtils.default.toFormatString(""+(_xeUtils.default.isFunction(v)?v({}):v),{percent:i.percent}):(0,_ui.getI18n)("vxe.upload.uploadProgress",[i.percent])):(0,_ui.renderEmptyElement)(z),!a&&(l&&m||u&&f&&!_)?(0,_vue.h)("div",{class:"vxe-upload--file-item-rebtn"},[(0,_vue.h)(_button.default,{icon:l?(0,_ui.getIcon)().UPLOAD_IMAGE_RE_UPLOAD:(0,_ui.getIcon)().UPLOAD_IMAGE_UPLOAD,mode:"text",status:"primary",content:l?(0,_ui.getI18n)("vxe.upload.reUpload"):(0,_ui.getI18n)("vxe.upload.manualUpload"),onClick(){Z(t)}})]):(0,_ui.renderEmptyElement)(z),(0,_vue.h)("div",{class:"vxe-upload--file-item-btn-wrapper"},[C?(0,_vue.h)("div",{class:"vxe-upload--file-item-corner"},(0,_vn.getSlotVNs)(C({option:t,isMoreView:r,readonly:y}))):(0,_ui.renderEmptyElement)(z),!s||a||u?(0,_ui.renderEmptyElement)(z):(0,_vue.h)("div",{class:"vxe-upload--file-item-download-btn",onClick(e){le(e,t)}},[(0,_vue.h)("i",{class:(0,_ui.getIcon)().UPLOAD_FILE_DOWNLOAD})]),!d||y||x||a?(0,_ui.renderEmptyElement)(z):(0,_vue.h)("div",{class:"vxe-upload--file-item-remove-btn",onClick(e){ie(e,t,o)}},[(0,_vue.h)("i",{class:(0,_ui.getIcon)().UPLOAD_FILE_REMOVE})])])])})},x=e=>{var{showUploadButton:t,buttonText:o,buttonIcon:i,showButtonText:a,showButtonIcon:l,autoHiddenButton:u}=U,n=B.value,r=S.value,d=b.value,s=Y.value,p=C.value,v=E.default,g=E.tip||E.hint;return r||!t?(0,_ui.renderEmptyElement)(z):(0,_vue.h)("div",{class:"vxe-upload--file-action"},[u&&p?(0,_ui.renderEmptyElement)(z):(0,_vue.h)("div",{class:"vxe-upload--file-action-btn",onClick:te},v?(0,_vn.getSlotVNs)(v({$upload:z})):[(0,_vue.h)(_button.default,{class:"vxe-upload--file-action-button",content:e||a?o?""+(_xeUtils.default.isFunction(o)?o({}):o):(0,_ui.getI18n)("vxe.upload.fileBtnText"):"",icon:l?i||(0,_ui.getIcon)().UPLOAD_FILE_ADD:"",disabled:n})]),d&&(s||g)?(0,_vue.h)("div",{class:"vxe-upload--file-action-tip"},g?(0,_vn.getSlotVNs)(g({$upload:z})):""+s):(0,_ui.renderEmptyElement)(z)])},y=(e,n)=>{const{showRemoveButton:r,showProgress:d,progressText:s,showPreview:p,showErrorStatus:v,dragSort:g,autoSubmit:m,showSubmitButton:c}=U,_=D["fileCacheMaps"],f=B.value,h=S.value,x=l.value,y=Q.value,w=E.corner,I={onMousedown:ce};return g&&1<e.length&&(I.onDragstart=ve,I.onDragover=ge,I.onDragend=me),e.map((t,o)=>{var e=j(t),i=_[e];let a=!1,l=!1,u=!1;return i&&(a=i.loading,l="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":x.circle,"is--loading":a,"is--pending":u,"is--error":l}],fileid:e,draggable:!!g||null},I),[(0,_vue.h)("div",{class:"vxe-upload--image-item-box",style:n?null:y,onClick(e){a||l||J(e,t,o)}},[a&&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)(z)]):(0,_ui.renderEmptyElement)(z),(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:W(t)})]),!a&&(l&&v||u&&c&&!m)?(0,_vue.h)("div",{class:"vxe-upload--image-item-rebtn"},[(0,_vue.h)(_button.default,{icon:l?(0,_ui.getIcon)().UPLOAD_IMAGE_RE_UPLOAD:(0,_ui.getIcon)().UPLOAD_IMAGE_UPLOAD,mode:"text",status:"primary",content:l?(0,_ui.getI18n)("vxe.upload.reUpload"):(0,_ui.getI18n)("vxe.upload.manualUpload"),onClick(){Z(t)}})]):(0,_ui.renderEmptyElement)(z),(0,_vue.h)("div",{class:"vxe-upload--image-item-btn-wrapper",onClick(e){e.stopPropagation()}},[w?(0,_vue.h)("div",{class:"vxe-upload--file-item-corner"},(0,_vn.getSlotVNs)(w({option:t,isMoreView:n,readonly:h}))):(0,_ui.renderEmptyElement)(z),!r||h||f||a?(0,_ui.renderEmptyElement)(z):(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})])])])])})},w=e=>{var{showUploadButton:t,buttonText:o,buttonIcon:i,showButtonText:a,showButtonIcon:l,autoHiddenButton:u}=U,n=S.value,r=b.value,d=Y.value,s=C.value,p=Q.value,v=E.default,g=E.tip||E.hint;return n||!t||u&&s?(0,_ui.renderEmptyElement)(z):(0,_vue.h)("div",{key:"action",class:"vxe-upload--image-action"},[(0,_vue.h)("div",{class:"vxe-upload--image-action-btn",onClick:te},v?v({$upload:z}):[(0,_vue.h)("div",{class:"vxe-upload--image-action-box",style:e?null:p},[l?(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)(z),e||a?(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)(z),r&&(d||g)?(0,_vue.h)("div",{class:"vxe-upload--image-action-hint"},g?(0,_vn.getSlotVNs)(g({$upload:z})):""+d):(0,_ui.renderEmptyElement)(z)])])])};const o=(0,_vue.ref)(0);return(0,_vue.watch)(()=>U.modelValue?U.modelValue.length:0,()=>{o.value++}),(0,_vue.watch)(()=>U.modelValue,()=>{o.value++}),(0,_vue.watch)(o,()=>{s()}),(0,_vue.onMounted)(()=>{U.multiple&&U.singleMode&&(0,_log.errLog)("vxe.error.errConflicts",["[upload] multiple","single-mode"]),U.imageStyle&&(0,_log.warnLog)("vxe.error.delProp",["[upload] image-style","image-config"]),U.dragSort&&(0,_dom.initTpImg)(),_ui.globalEvents.on(z,"paste",_e),_ui.globalEvents.on(z,"mousedown",fe),_ui.globalEvents.on(z,"blur",he)}),(0,_vue.onUnmounted)(()=>{D.isDragUploadStatus=!1,_ui.globalEvents.off(z,"paste"),_ui.globalEvents.off(z,"mousedown"),_ui.globalEvents.off(z,"blur")}),s(),z.renderVN=()=>{var{showErrorStatus:e,dragToUpload:t,pasteToUpload:o,dragSort:i}=U,{isDragUploadStatus:a,showMorePopup:l,isActivated:u,dragIndex:n}=D,r=I.value,d=B.value,s=S.value,p=_.value,v={onMousedown:ce};return t&&-1===n&&(v.onDragover=ne,v.onDragleave=ue,v.onDrop=de),(0,_vue.h)("div",Object.assign({ref:g,class:["vxe-upload",{["size--"+r]:r,"is--active":u,"is--readonly":s,"is--disabled":d,"is--paste":o,"show--error":e,"is--drag":a}]},v),[(p?()=>{var{showList:e,dragSort:t}=U;const{fileList:o,isDragMove:i}=D,{maxCount:a,showMoreButton:l}=X.value;let u=o,n=0;return a&&o.length>a&&(n=o.length-a,u=o.slice(0,a)),(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:()=>y(u,!1).concat([l&&n?(0,_vue.h)("div",{key:"om",class:"vxe-upload--image-over-more"},[(0,_vue.h)(_button.default,{mode:"text",content:(0,_ui.getI18n)("vxe.upload.moreBtnText",[o.length]),status:"primary",onClick:f})]):(0,_ui.renderEmptyElement)(z),w(!1)])}):(0,_vue.h)("div",{class:"vxe-upload--image-list"},y(u,!1).concat([l&&n?(0,_vue.h)("div",{class:"vxe-upload--image-over-more"},[(0,_vue.h)(_button.default,{mode:"text",content:(0,_ui.getI18n)("vxe.upload.moreBtnText",[o.length]),status:"primary",onClick:f})]):(0,_ui.renderEmptyElement)(z),w(!1)]))]:[(0,_vue.h)("div",{class:"vxe-upload--image-list"},[w(!1)])])}:()=>{var{showList:e,moreConfig:t,dragSort:o}=U,{fileList:i,isDragMove:a}=D,{maxCount:l,showMoreButton:u,layout:n}=X.value,n="horizontal"===n;let r=i,d=0;return l&&i.length>l&&(d=i.length-l,r=i.slice(0,l)),(0,_vue.h)("div",{key:"all",class:"vxe-upload--file-wrapper"},e?[u&&t&&n?(0,_ui.renderEmptyElement)(z):x(!0),r.length||u&&n?(0,_vue.h)("div",{class:["vxe-upload--file-list-wrapper",{"is--horizontal":n}]},[r.length?o?(0,_vue.h)(_vue.TransitionGroup,{name:"vxe-upload--drag-list"+(a?"":"-disabled"),tag:"div",class:"vxe-upload--file-list"},{default:()=>h(r,!1)}):(0,_vue.h)("div",{class:"vxe-upload--file-list"},h(r,!1)):(0,_ui.renderEmptyElement)(z),u&&d?(0,_vue.h)("div",{class:"vxe-upload--file-over-more"},[(0,_vue.h)(_button.default,{mode:"text",content:(0,_ui.getI18n)("vxe.upload.moreBtnText",[i.length]),status:"primary",onClick:f})]):(0,_ui.renderEmptyElement)(z),u&&t&&n?x(!1):(0,_ui.renderEmptyElement)(z)]):(0,_ui.renderEmptyElement)(z)]:[x(!1)])})(),i?(0,_vue.h)("div",{ref:m,class:"vxe-upload--drag-line"}):(0,_ui.renderEmptyElement)(z),a&&!l?(0,_vue.h)("div",{class:"vxe-upload--drag-placeholder"},(0,_ui.getI18n)("vxe.upload.dragPlaceholder")):(0,_ui.renderEmptyElement)(z)])},z},render(){return this.renderVN()}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.vxe-menu{position:relative}.vxe-menu.is--collapsed .vxe-menu--item-custom-title,.vxe-menu.is--collapsed .vxe-menu--item-link-collapse,.vxe-menu.is--collapsed .vxe-menu--item-link-title{display:none}.vxe-menu.is--loading{min-height:4em}.vxe-menu{color:var(--vxe-ui-font-color);font-family:var(--vxe-ui-font-family);background-color:var(--vxe-ui-layout-background-color)}.vxe-menu--collapse-wrapper{display:none;position:absolute;overflow:auto}.vxe-menu--collapse-wrapper.is--collapsed{display:block;transition:all .25s ease-in-out}.vxe-menu--collapse-wrapper:not(.is--enter) .vxe-menu--item-custom-title,.vxe-menu--collapse-wrapper:not(.is--enter) .vxe-menu--item-link-collapse,.vxe-menu--collapse-wrapper:not(.is--enter) .vxe-menu--item-link-title{display:none}.vxe-menu--collapse-wrapper.is--enter{box-shadow:var(--vxe-ui-menu-collapse-wrapper-box-shadow)}.vxe-menu--item-link{display:flex;flex-direction:row;align-items:center;color:var(--vxe-ui-font-color);text-decoration:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.vxe-menu--item-link:hover{color:var(--vxe-ui-menu-item-hover-color);background-color:var(--vxe-ui-base-hover-background-color)}.vxe-menu--item-custom-title,.vxe-menu--item-link,.vxe-menu--item-link-title{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.vxe-menu--item-link-icon{flex-shrink:0;width:var(--vxe-ui-menu-icon-width);text-align:center}.vxe-menu--item-custom-title,.vxe-menu--item-link-title{flex-grow:1;padding-left:.2em}.vxe-menu--item-link-collapse{flex-shrink:0;padding:.5em}.vxe-menu--item-link-collapse i{display:inline-block;font-size:.8em;transition:transform .25s ease-in-out}.vxe-menu--item-wrapper.vxe-menu--item-level1>.vxe-menu--item-link{padding:0 var(--vxe-ui-layout-padding-double)}.vxe-menu--item-wrapper.vxe-menu--item-level1>.vxe-menu--item-link{padding:0 var(--vxe-ui-layout-padding-double) 0 calc(var(--vxe-ui-layout-padding-double) * 1)}.vxe-menu--item-wrapper.vxe-menu--item-level2>.vxe-menu--item-link{padding:0 var(--vxe-ui-layout-padding-double) 0 calc(var(--vxe-ui-layout-padding-double) * 2)}.vxe-menu--item-wrapper.vxe-menu--item-level3>.vxe-menu--item-link{padding:0 var(--vxe-ui-layout-padding-double) 0 calc(var(--vxe-ui-layout-padding-double) * 3)}.vxe-menu--item-wrapper.vxe-menu--item-level4>.vxe-menu--item-link{padding:0 var(--vxe-ui-layout-padding-double) 0 calc(var(--vxe-ui-layout-padding-double) * 4)}.vxe-menu--item-wrapper.vxe-menu--item-level5>.vxe-menu--item-link{padding:0 var(--vxe-ui-layout-padding-double) 0 calc(var(--vxe-ui-layout-padding-double) * 5)}.vxe-menu--item-wrapper.vxe-menu--item-level6>.vxe-menu--item-link{padding:0 var(--vxe-ui-layout-padding-double) 0 calc(var(--vxe-ui-layout-padding-double) * 6)}.vxe-menu--item-wrapper.vxe-menu--item-level7>.vxe-menu--item-link{padding:0 var(--vxe-ui-layout-padding-double) 0 calc(var(--vxe-ui-layout-padding-double) * 7)}.vxe-menu--item-group{display:none}.vxe-menu--item-wrapper.is--active>.vxe-menu--item-link{font-weight:700}.vxe-menu--item-wrapper.is--exact-active>.vxe-menu--item-link{color:var(--vxe-ui-font-primary-color);background-color:var(--vxe-ui-base-active-background-color)}.vxe-menu--item-wrapper.is--expand>.vxe-menu--item-group{display:block}.vxe-menu--item-level3{font-size:13px}.vxe-menu--item-link{height:var(--vxe-ui-menu-item-height-default)}.vxe-menu{font-size:var(--vxe-ui-font-size-default)}.vxe-menu.size--medium{font-size:var(--vxe-ui-font-size-medium)}.vxe-menu.size--medium .vxe-menu--item-link{height:var(--vxe-ui-menu-item-height-medium)}.vxe-menu.size--small{font-size:var(--vxe-ui-font-size-small)}.vxe-menu.size--small .vxe-menu--item-link{height:var(--vxe-ui-menu-item-height-small)}.vxe-menu.size--mini{font-size:var(--vxe-ui-font-size-mini)}.vxe-menu.size--mini .vxe-menu--item-link{height:var(--vxe-ui-menu-item-height-mini)}.vxe-menu.size--mini .vxe-menu--item-level3,.vxe-menu.size--small .vxe-menu--item-level3{font-size:12px}
|
|
1
|
+
.vxe-menu{position:relative}.vxe-menu.is--collapsed .vxe-menu--item-custom-title,.vxe-menu.is--collapsed .vxe-menu--item-link-collapse,.vxe-menu.is--collapsed .vxe-menu--item-link-title{display:none}.vxe-menu.is--loading{min-height:4em}.vxe-menu{color:var(--vxe-ui-font-color);font-family:var(--vxe-ui-font-family);background-color:var(--vxe-ui-layout-background-color)}.vxe-menu--collapse-wrapper{display:none;position:absolute;overflow:auto;background-color:var(--vxe-ui-layout-background-color)}.vxe-menu--collapse-wrapper.is--collapsed{display:block;transition:all .25s ease-in-out}.vxe-menu--collapse-wrapper:not(.is--enter) .vxe-menu--item-custom-title,.vxe-menu--collapse-wrapper:not(.is--enter) .vxe-menu--item-link-collapse,.vxe-menu--collapse-wrapper:not(.is--enter) .vxe-menu--item-link-title{display:none}.vxe-menu--collapse-wrapper.is--enter{box-shadow:var(--vxe-ui-menu-collapse-wrapper-box-shadow)}.vxe-menu--item-link{display:flex;flex-direction:row;align-items:center;color:var(--vxe-ui-font-color);text-decoration:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.vxe-menu--item-link:hover{color:var(--vxe-ui-menu-item-hover-color);background-color:var(--vxe-ui-base-hover-background-color)}.vxe-menu--item-custom-title,.vxe-menu--item-link,.vxe-menu--item-link-title{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.vxe-menu--item-link-icon{flex-shrink:0;width:var(--vxe-ui-menu-icon-width);text-align:center}.vxe-menu--item-custom-title,.vxe-menu--item-link-title{flex-grow:1;padding-left:.2em}.vxe-menu--item-link-collapse{flex-shrink:0;padding:.5em}.vxe-menu--item-link-collapse i{display:inline-block;font-size:.8em;transition:transform .25s ease-in-out}.vxe-menu--item-wrapper.vxe-menu--item-level1>.vxe-menu--item-link{padding:0 var(--vxe-ui-layout-padding-double)}.vxe-menu--item-wrapper.vxe-menu--item-level1>.vxe-menu--item-link{padding:0 var(--vxe-ui-layout-padding-double) 0 calc(var(--vxe-ui-layout-padding-double) * 1)}.vxe-menu--item-wrapper.vxe-menu--item-level2>.vxe-menu--item-link{padding:0 var(--vxe-ui-layout-padding-double) 0 calc(var(--vxe-ui-layout-padding-double) * 2)}.vxe-menu--item-wrapper.vxe-menu--item-level3>.vxe-menu--item-link{padding:0 var(--vxe-ui-layout-padding-double) 0 calc(var(--vxe-ui-layout-padding-double) * 3)}.vxe-menu--item-wrapper.vxe-menu--item-level4>.vxe-menu--item-link{padding:0 var(--vxe-ui-layout-padding-double) 0 calc(var(--vxe-ui-layout-padding-double) * 4)}.vxe-menu--item-wrapper.vxe-menu--item-level5>.vxe-menu--item-link{padding:0 var(--vxe-ui-layout-padding-double) 0 calc(var(--vxe-ui-layout-padding-double) * 5)}.vxe-menu--item-wrapper.vxe-menu--item-level6>.vxe-menu--item-link{padding:0 var(--vxe-ui-layout-padding-double) 0 calc(var(--vxe-ui-layout-padding-double) * 6)}.vxe-menu--item-wrapper.vxe-menu--item-level7>.vxe-menu--item-link{padding:0 var(--vxe-ui-layout-padding-double) 0 calc(var(--vxe-ui-layout-padding-double) * 7)}.vxe-menu--item-group{display:none}.vxe-menu--item-wrapper.is--active>.vxe-menu--item-link{font-weight:700}.vxe-menu--item-wrapper.is--exact-active>.vxe-menu--item-link{color:var(--vxe-ui-font-primary-color);background-color:var(--vxe-ui-base-active-background-color)}.vxe-menu--item-wrapper.is--expand>.vxe-menu--item-group{display:block}.vxe-menu--item-level3{font-size:13px}.vxe-menu--item-link{height:var(--vxe-ui-menu-item-height-default)}.vxe-menu{font-size:var(--vxe-ui-font-size-default)}.vxe-menu.size--medium{font-size:var(--vxe-ui-font-size-medium)}.vxe-menu.size--medium .vxe-menu--item-link{height:var(--vxe-ui-menu-item-height-medium)}.vxe-menu.size--small{font-size:var(--vxe-ui-font-size-small)}.vxe-menu.size--small .vxe-menu--item-link{height:var(--vxe-ui-menu-item-height-small)}.vxe-menu.size--mini{font-size:var(--vxe-ui-font-size-mini)}.vxe-menu.size--mini .vxe-menu--item-link{height:var(--vxe-ui-menu-item-height-mini)}.vxe-menu.size--mini .vxe-menu--item-level3,.vxe-menu.size--small .vxe-menu--item-level3{font-size:12px}
|
package/package.json
CHANGED
|
@@ -780,7 +780,7 @@ const VxeButtonComponent = defineVxeComponent({
|
|
|
780
780
|
|
|
781
781
|
onMounted(() => {
|
|
782
782
|
if (props.type === 'text') {
|
|
783
|
-
warnLog('vxe.error.delProp', ['type=text', 'mode=text'])
|
|
783
|
+
warnLog('vxe.error.delProp', ['[button] type=text', 'mode=text'])
|
|
784
784
|
}
|
|
785
785
|
|
|
786
786
|
globalEvents.on($xeButton, 'mousewheel', handleGlobalMousewheelEvent)
|
|
@@ -102,7 +102,7 @@ function getComponentOns (renderOpts: VxeGlobalRendererHandles.RenderFormItemCon
|
|
|
102
102
|
XEUtils.objectEach(events, (func, key: any) => {
|
|
103
103
|
ons[getOnName(key)] = function (...args: any[]) {
|
|
104
104
|
if (!XEUtils.isFunction(func)) {
|
|
105
|
-
errLog('vxe.error.errFunc', [func])
|
|
105
|
+
errLog('vxe.error.errFunc', [`[form] ${func}`])
|
|
106
106
|
}
|
|
107
107
|
func(params, ...args)
|
|
108
108
|
}
|
|
@@ -342,7 +342,7 @@ export default defineVxeComponent({
|
|
|
342
342
|
XEUtils.each(item.slots, (func) => {
|
|
343
343
|
if (!XEUtils.isFunction(func)) {
|
|
344
344
|
if (!slots[func]) {
|
|
345
|
-
errLog('vxe.error.notSlot', [func])
|
|
345
|
+
errLog('vxe.error.notSlot', [`[form] ${func}`])
|
|
346
346
|
}
|
|
347
347
|
}
|
|
348
348
|
})
|
|
@@ -548,10 +548,10 @@ export default defineVxeComponent({
|
|
|
548
548
|
if (validatorMethod) {
|
|
549
549
|
customValid = validatorMethod(validParams)
|
|
550
550
|
} else {
|
|
551
|
-
warnLog('vxe.error.notValidators', [validator])
|
|
551
|
+
warnLog('vxe.error.notValidators', [`[form] ${validator}`])
|
|
552
552
|
}
|
|
553
553
|
} else {
|
|
554
|
-
errLog('vxe.error.notValidators', [validator])
|
|
554
|
+
errLog('vxe.error.notValidators', [`[form] ${validator}`])
|
|
555
555
|
}
|
|
556
556
|
} else {
|
|
557
557
|
customValid = validator(validParams)
|
|
@@ -945,7 +945,7 @@ export default defineVxeComponent({
|
|
|
945
945
|
onMounted(() => {
|
|
946
946
|
nextTick(() => {
|
|
947
947
|
if (props.customLayout && props.items) {
|
|
948
|
-
errLog('vxe.error.errConflicts', ['custom-layout', 'items'])
|
|
948
|
+
errLog('vxe.error.errConflicts', ['[form] custom-layout', 'items'])
|
|
949
949
|
}
|
|
950
950
|
})
|
|
951
951
|
globalEvents.on($xeForm, 'resize', handleGlobalResizeEvent)
|
|
@@ -9,22 +9,22 @@ export class ItemInfo {
|
|
|
9
9
|
if (XEUtils.isString(formatter)) {
|
|
10
10
|
const gFormatOpts = formats.get(formatter)
|
|
11
11
|
if (!gFormatOpts || !gFormatOpts.formItemFormatMethod) {
|
|
12
|
-
errLog('vxe.error.notFormats', [formatter])
|
|
12
|
+
errLog('vxe.error.notFormats', [`[form] ${formatter}`])
|
|
13
13
|
}
|
|
14
14
|
} else if (XEUtils.isArray(formatter)) {
|
|
15
15
|
const gFormatOpts = formats.get(formatter[0])
|
|
16
16
|
if (!gFormatOpts || !gFormatOpts.formItemFormatMethod) {
|
|
17
|
-
errLog('vxe.error.notFormats', [formatter[0]])
|
|
17
|
+
errLog('vxe.error.notFormats', [`[form] ${formatter[0]}`])
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
if (field && itemRender) {
|
|
23
23
|
if (itemRender.startField && `${itemRender.startField}`.indexOf(field) >= 0) {
|
|
24
|
-
errLog('vxe.error.modelConflicts', [`field=${field}`, `item-render.startField=${itemRender.startField}`])
|
|
24
|
+
errLog('vxe.error.modelConflicts', [`[form] field=${field}`, `item-render.startField=${itemRender.startField}`])
|
|
25
25
|
}
|
|
26
26
|
if (itemRender.endField && `${itemRender.endField}`.indexOf(field) >= 0) {
|
|
27
|
-
errLog('vxe.error.modelConflicts', [`field=${field}`, `item-render.endField=${itemRender.endField}`])
|
|
27
|
+
errLog('vxe.error.modelConflicts', [`[form] field=${field}`, `item-render.endField=${itemRender.endField}`])
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
30
|
|
|
@@ -7,10 +7,11 @@ import { openPreviewImage } from '../image/src/util'
|
|
|
7
7
|
export const VxeImagePreview = Object.assign(VxeImagePreviewComponent, {
|
|
8
8
|
install (app: App) {
|
|
9
9
|
app.component(VxeImagePreviewComponent.name as string, VxeImagePreviewComponent)
|
|
10
|
-
VxeUI.previewImage = openPreviewImage
|
|
11
10
|
}
|
|
12
11
|
})
|
|
13
12
|
|
|
13
|
+
VxeUI.previewImage = openPreviewImage
|
|
14
|
+
|
|
14
15
|
dynamicApp.use(VxeImagePreview)
|
|
15
16
|
VxeUI.component(VxeImagePreviewComponent)
|
|
16
17
|
|
|
@@ -494,8 +494,8 @@ export default defineVxeComponent({
|
|
|
494
494
|
posStorageMap[id] = ([
|
|
495
495
|
boxElem.style.left,
|
|
496
496
|
boxElem.style.top,
|
|
497
|
-
boxElem.
|
|
498
|
-
boxElem.
|
|
497
|
+
boxElem.clientWidth,
|
|
498
|
+
boxElem.clientHeight
|
|
499
499
|
] as (string | number)[]).concat(revertLocat
|
|
500
500
|
? [
|
|
501
501
|
revertLocat.left,
|
|
@@ -1448,7 +1448,7 @@ export default defineVxeComponent({
|
|
|
1448
1448
|
}
|
|
1449
1449
|
nextTick(() => {
|
|
1450
1450
|
if (props.storage && !props.id) {
|
|
1451
|
-
errLog('vxe.error.reqProp', ['modal
|
|
1451
|
+
errLog('vxe.error.reqProp', ['[modal] id'])
|
|
1452
1452
|
}
|
|
1453
1453
|
if (props.modelValue) {
|
|
1454
1454
|
openModal()
|
|
@@ -655,7 +655,7 @@ export default defineVxeComponent({
|
|
|
655
655
|
* @deprecated
|
|
656
656
|
*/
|
|
657
657
|
jumpPage (currentPage: number) {
|
|
658
|
-
warnLog('vxe.error.delFunc', ['jumpPage', 'setCurrentPage'])
|
|
658
|
+
warnLog('vxe.error.delFunc', ['[pager] jumpPage', 'setCurrentPage'])
|
|
659
659
|
return $xePager.setCurrentPage(currentPage)
|
|
660
660
|
}
|
|
661
661
|
}
|
|
@@ -731,7 +731,7 @@ export default defineVxeComponent({
|
|
|
731
731
|
if (renderFn) {
|
|
732
732
|
childNodes.push(renderFn())
|
|
733
733
|
} else {
|
|
734
|
-
errLog('vxe.error.notProp', [`layouts -> ${name}`])
|
|
734
|
+
errLog('vxe.error.notProp', [`[pager] layouts -> ${name}`])
|
|
735
735
|
}
|
|
736
736
|
})
|
|
737
737
|
if (slots.right) {
|
|
@@ -71,6 +71,7 @@ export default defineVxeComponent({
|
|
|
71
71
|
default: () => getConfig().select.allowCreate
|
|
72
72
|
},
|
|
73
73
|
placement: String as PropType<VxeSelectPropTypes.Placement>,
|
|
74
|
+
lazyOptions: Array as PropType<VxeSelectPropTypes.LazyOptions>,
|
|
74
75
|
options: Array as PropType<VxeSelectPropTypes.Options>,
|
|
75
76
|
optionProps: Object as PropType<VxeSelectPropTypes.OptionProps>,
|
|
76
77
|
optionGroups: Array as PropType<VxeSelectPropTypes.OptionGroups>,
|
|
@@ -357,18 +358,40 @@ export default defineVxeComponent({
|
|
|
357
358
|
}
|
|
358
359
|
|
|
359
360
|
const getRemoteSelectLabel = (value: any) => {
|
|
361
|
+
const { lazyOptions } = props
|
|
360
362
|
const { remoteValMaps, optFullValMaps } = internalData
|
|
363
|
+
const valueField = computeValueField.value
|
|
361
364
|
const labelField = computeLabelField.value
|
|
362
365
|
const remoteItem = remoteValMaps[value] || optFullValMaps[value]
|
|
363
366
|
const item = remoteItem ? remoteItem.item : null
|
|
364
|
-
|
|
367
|
+
if (item) {
|
|
368
|
+
return XEUtils.toValueString(item[labelField])
|
|
369
|
+
}
|
|
370
|
+
if (lazyOptions) {
|
|
371
|
+
const lazyItem = lazyOptions.find(item => item[valueField] === value)
|
|
372
|
+
if (lazyItem) {
|
|
373
|
+
return lazyItem[labelField]
|
|
374
|
+
}
|
|
375
|
+
}
|
|
376
|
+
return value
|
|
365
377
|
}
|
|
366
378
|
|
|
367
379
|
const getSelectLabel = (value: any) => {
|
|
380
|
+
const { lazyOptions } = props
|
|
368
381
|
const { optFullValMaps } = internalData
|
|
382
|
+
const valueField = computeValueField.value
|
|
369
383
|
const labelField = computeLabelField.value
|
|
370
384
|
const cacheItem = reactData.reactFlag ? optFullValMaps[value] : null
|
|
371
|
-
|
|
385
|
+
if (cacheItem) {
|
|
386
|
+
return cacheItem.item[labelField as 'label']
|
|
387
|
+
}
|
|
388
|
+
if (lazyOptions) {
|
|
389
|
+
const lazyItem = lazyOptions.find(item => item[valueField] === value)
|
|
390
|
+
if (lazyItem) {
|
|
391
|
+
return lazyItem[labelField]
|
|
392
|
+
}
|
|
393
|
+
}
|
|
394
|
+
return value
|
|
372
395
|
}
|
|
373
396
|
|
|
374
397
|
const cacheItemMap = (datas: any[]) => {
|
|
@@ -225,13 +225,13 @@ export default defineVxeComponent({
|
|
|
225
225
|
}
|
|
226
226
|
reactData.itemList = list.map(item => {
|
|
227
227
|
if (item.showAction) {
|
|
228
|
-
warnLog('vxe.error.removeProp', ['
|
|
228
|
+
warnLog('vxe.error.removeProp', ['[split] show-action'])
|
|
229
229
|
}
|
|
230
230
|
if (item.slots) {
|
|
231
231
|
XEUtils.each(item.slots, (func) => {
|
|
232
232
|
if (!XEUtils.isFunction(func)) {
|
|
233
233
|
if (!slots[func]) {
|
|
234
|
-
errLog('vxe.error.notSlot', [func])
|
|
234
|
+
errLog('vxe.error.notSlot', [`[split] ${func}`])
|
|
235
235
|
}
|
|
236
236
|
}
|
|
237
237
|
})
|
|
@@ -877,11 +877,11 @@ export default defineVxeComponent({
|
|
|
877
877
|
reactData.itemList = val || []
|
|
878
878
|
|
|
879
879
|
if ((showPrevButton || showNextButton) && reactData.itemList.length > 2) {
|
|
880
|
-
errLog('vxe.error.modelConflicts', ['action-config.showPrevButton | action-config.showNextButton', '<vxe-split-pane ...> Only supports 2 panel'])
|
|
880
|
+
errLog('vxe.error.modelConflicts', ['[split] action-config.showPrevButton | action-config.showNextButton', '<vxe-split-pane ...> Only supports 2 panel'])
|
|
881
881
|
}
|
|
882
882
|
reactData.itemList.forEach(item => {
|
|
883
883
|
if (item.showAction) {
|
|
884
|
-
warnLog('vxe.error.removeProp', ['showAction'])
|
|
884
|
+
warnLog('vxe.error.removeProp', ['[split] showAction'])
|
|
885
885
|
}
|
|
886
886
|
})
|
|
887
887
|
recalculate()
|
|
@@ -904,7 +904,7 @@ export default defineVxeComponent({
|
|
|
904
904
|
|
|
905
905
|
const actionOpts = computeActionOpts.value
|
|
906
906
|
if (actionOpts.direction) {
|
|
907
|
-
errLog('vxe.error.delProp', ['action-config.direction', 'action-config.showPrevButton | action-config.showNextButton'])
|
|
907
|
+
errLog('vxe.error.delProp', ['[split] action-config.direction', 'action-config.showPrevButton | action-config.showNextButton'])
|
|
908
908
|
}
|
|
909
909
|
|
|
910
910
|
globalEvents.on($xeSplit, 'resize', handleGlobalResizeEvent)
|