vxe-pc-ui 3.14.38 → 3.14.39
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/input/src/input.js +2 -2
- package/es/number-input/src/number-input.js +25 -10
- package/es/number-input/src/util.js +17 -5
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/lib/index.umd.js +48 -20
- package/lib/index.umd.min.js +1 -1
- package/lib/input/src/input.js +2 -2
- package/lib/input/src/input.min.js +1 -1
- package/lib/number-input/src/number-input.js +26 -9
- package/lib/number-input/src/number-input.min.js +1 -1
- package/lib/number-input/src/util.js +16 -5
- package/lib/number-input/src/util.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/package.json +2 -2
- package/packages/input/src/input.ts +2 -2
- package/packages/number-input/src/number-input.ts +24 -11
- package/packages/number-input/src/util.ts +18 -5
- package/types/components/number-input.d.ts +12 -1
- /package/es/icon/{iconfont.1781439381800.ttf → iconfont.1781503187022.ttf} +0 -0
- /package/es/icon/{iconfont.1781439381800.woff → iconfont.1781503187022.woff} +0 -0
- /package/es/icon/{iconfont.1781439381800.woff2 → iconfont.1781503187022.woff2} +0 -0
- /package/es/{iconfont.1781439381800.ttf → iconfont.1781503187022.ttf} +0 -0
- /package/es/{iconfont.1781439381800.woff → iconfont.1781503187022.woff} +0 -0
- /package/es/{iconfont.1781439381800.woff2 → iconfont.1781503187022.woff2} +0 -0
- /package/lib/icon/style/{iconfont.1781439381800.ttf → iconfont.1781503187022.ttf} +0 -0
- /package/lib/icon/style/{iconfont.1781439381800.woff → iconfont.1781503187022.woff} +0 -0
- /package/lib/icon/style/{iconfont.1781439381800.woff2 → iconfont.1781503187022.woff2} +0 -0
- /package/lib/{iconfont.1781439381800.ttf → iconfont.1781503187022.ttf} +0 -0
- /package/lib/{iconfont.1781439381800.woff → iconfont.1781503187022.woff} +0 -0
- /package/lib/{iconfont.1781439381800.woff2 → iconfont.1781503187022.woff2} +0 -0
package/lib/ui/index.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,"__esModule",{value:!0});var _exportNames={version:!0,config:!0,setup:!0},_core=(exports.config=config,exports.default=void 0,exports.setup=setup,exports.version=void 0,require("@vxe-ui/core")),_dynamics=(Object.keys(_core).forEach(function(e){"default"===e||"__esModule"===e||Object.prototype.hasOwnProperty.call(_exportNames,e)||e in exports&&exports[e]===_core[e]||Object.defineProperty(exports,e,{enumerable:!0,get:function(){return _core[e]}})}),require("../dynamics")),_log=require("./src/log"),version=exports.version="3.14.38";function config(e){return(0,_log.warnLog)("vxe.error.delFunc",["config","setConfig"]),(0,_core.setConfig)(e)}function setup(e){return(0,_log.warnLog)("vxe.error.delFunc",["setup","setConfig"]),(0,_core.setConfig)(e)}_core.VxeUI.uiVersion=version,_core.VxeUI.dynamicApp=_dynamics.dynamicApp,_core.VxeUI.config=config,_core.VxeUI.setup=setup,(0,_core.setConfig)({alert:{},anchor:{},anchorLink:{},avatar:{},backtop:{showIcon:!0,showContent:!0,showTop:!0,showBottom:!0,shadow:!0,threshold:20},badge:{},breadcrumb:{separator:"/"},breadcrumbItem:{},button:{trigger:"hover",prefixTooltip:{enterable:!0},suffixTooltip:{enterable:!0},showDropdownIcon:!0},buttonGroup:{},calendar:{minDate:new Date(1900,0,1),maxDate:new Date(2100,0,1),startDay:1,selectDay:1},card:{border:!0,padding:!0},carousel:{height:200,loop:!0,interval:5e3},carouselItem:{},cascader:{autoClose:!0},checkbox:{},checkboxButton:{},checkboxGroup:{},col:{},collapse:{padding:!0,expandConfig:{showIcon:!0}},collapsePane:{},contextMenu:{autoLocate:!0},countdown:{},colorPicker:{type:"rgb",clearable:!0,showAlpha:!0,clickToCopy:!0,showColorExtractor:!0,showQuick:!0},datePanel:{startDate:new Date(1900,0,1),endDate:new Date(2100,0,1),startDay:1,selectDay:1},datePicker:{shortcutConfig:{align:"left",mode:"text",autoClose:!0},startDay:1,selectDay:1,autoClose:!0,showClearButton:null,showConfirmButton:null},dateRangePicker:{shortcutConfig:{align:"left",mode:"text",autoClose:!0},startDay:1,selectDay:1,separator:" ~ ",autoClose:!0,showClearButton:!0,showConfirmButton:null},drawer:{position:"right",showHeader:!0,lockView:!0,mask:!0,showTitleOverflow:!0,showClose:!0,padding:!0,cancelClosable:!0,confirmClosable:!0},empty:{},form:{validConfig:{showErrorMessage:!0,autoPos:!0,theme:"beautify"},tooltipConfig:{enterable:!0},titleAsterisk:!0,titleOverflow:!1,padding:!0},formDesign:{height:400,showHeader:!0,showPc:!0},formGather:{},formGroup:{},formItem:{},formView:{},icon:{},iconPicker:{icons:["home","company","comment","setting","send","envelope","envelope-open","bell","search","print","pc","goods","chart-line","edit","delete","save","folder","microphone","flag","link","location","sunny","rmb","usd","user","add-user","add-users","star","unlock","time","text","feedback","calendar","association-form","cloud-download","cloud-upload","file","subtable","chart-bar-x","chart-bar-y","chart-line","chart-pie","chart-radar"]},image:{draggable:null,showPreview:!0,showPrintButton:!0},imageGroup:{showPreview:!0,showPrintButton:!0},imagePreview:{showPrintButton:!0,maskClosable:!0},input:{startDate:new Date(1900,0,1),endDate:new Date(2100,0,1),startDay:1,selectDay:1,digits:2,controls:!0},layoutAside:{},layoutBody:{backtopConfig:{}},layoutContainer:{},layoutFooter:{},layoutHeader:{},link:{underline:!0},listDesign:{height:400,showPc:!0},listView:{},list:{virtualYConfig:{enabled:!0,gt:60}},loading:{showIcon:!0,showText:!0},menu:{},modal:{top:16,showHeader:!0,minWidth:340,minHeight:140,lockView:!0,mask:!0,duration:3e3,marginSize:0,dblclickZoom:!0,showTitleOverflow:!0,animat:!0,showClose:!0,padding:!0,draggable:!0,showConfirmButton:null,cancelClosable:!0,confirmClosable:!0,zoomConfig:{minimizeMaxSize:10,minimizeVerticalOffset:{top:-24,left:0},minimizeHorizontalOffset:{top:0,left:32}},storageKey:"VXE_MODAL_POSITION"},noticeBar:{},numberInput:{digits:2,autoFill:!0,controlConfig:{enabled:!0,layout:"right",showButton:!0,isWheel:!0,isArrow:!0}},optgroup:{},option:{},pager:{pageSizePlacement:"top"},print:{pageStyle:{}},passwordInput:{controls:!0},printPageBreak:{},pulldown:{},radio:{strict:!0},radioButton:{strict:!0},radioGroup:{strict:!0},rate:{},result:{},row:{},segmented:{},select:{multiCharOverflow:8,radioConfig:{showIcon:!0,trigger:"option"},checkboxConfig:{showIcon:!0,trigger:"option"},remoteConfig:{enabled:!0,autoLoad:!0},virtualYConfig:{enabled:!0,gt:50,oSize:2}},splitter:{resize:!0,itemConfig:{minWidth:40,minHeight:40},resizeConfig:{showTip:!0}},splitterPanel:{},slider:{max:100,min:0},steps:{},switch:{},tabPane:{},tableSelect:{gridConfig:{showOverflow:!0,showHeaderOverflow:!0,showFooterOverflow:!0,rowConfig:{isHover:!0},virtualXConfig:{enabled:!0,gt:0},virtualYConfig:{enabled:!0,gt:0}}},tabs:{},tag:{},textEllipsis:{underline:!0},text:{copyConfig:{showMessage:!0}},textarea:{resize:"none"},timeline:{},timelineItem:{},tip:{},tooltip:{trigger:"hover",theme:"dark",enterDelay:500,leaveDelay:300,isArrow:!0},tree:{indent:20,minHeight:60,radioConfig:{strict:!0},dragConfig:{showIcon:!0,animation:!0,showGuidesStatus:!0,showDragTip:!0},virtualYConfig:{enabled:!0,gt:50,oSize:2}},treeSelect:{autoClose:null,virtualYConfig:{enabled:!0,gt:0,oSize:2},treeConfig:{maxHeight:300,radioConfig:{},checkboxConfig:{},filterConfig:{autoExpandAll:!0}}},upload:{mode:"all",imageTypes:["jpg","jpeg","png","gif"],showList:!0,showUploadButton:!0,showButtonText:!0,showRemoveButton:!0,showButtonIcon:!0,showPreview:!0,dragToUpload:!0,showLimitSize:!0,showLimitCount:!0,autoSubmit:!0,maxSimultaneousUploads:5,previewImageConfig:{}},watermark:{rotate:-30,gap:[100,100]},table:{},colgroup:{},column:{},toolbar:{},grid:{},gantt:{}});var iconPrefix="vxe-icon-",_default=((0,_core.setIcon)({LOADING:iconPrefix+"spinner roll vxe-loading--default-icon",BUTTON_DROPDOWN:iconPrefix+"arrow-down",BUTTON_LOADING:iconPrefix+"spinner roll",BUTTON_TOOLTIP_ICON:iconPrefix+"question-circle-fill",MENU_ITEM_EXPAND_OPEN:iconPrefix+"arrow-down rotate180",MENU_ITEM_EXPAND_CLOSE:iconPrefix+"arrow-down",SELECT_LOADED:iconPrefix+"spinner roll",SELECT_OPEN:iconPrefix+"caret-down rotate180",SELECT_CLOSE:iconPrefix+"caret-down",SELECT_ADD_OPTION:iconPrefix+"add",ICON_PICKER_OPEN:iconPrefix+"caret-down rotate180",ICON_PICKER_CLOSE:iconPrefix+"caret-down",PAGER_HOME:iconPrefix+"home-page",PAGER_END:iconPrefix+"end-page",PAGER_JUMP_PREV:iconPrefix+"arrow-double-left",PAGER_JUMP_NEXT:iconPrefix+"arrow-double-right",PAGER_PREV_PAGE:iconPrefix+"arrow-left",PAGER_NEXT_PAGE:iconPrefix+"arrow-right",PAGER_JUMP_MORE:iconPrefix+"ellipsis-h",RADIO_CHECKED:iconPrefix+"radio-checked-fill",RADIO_UNCHECKED:iconPrefix+"radio-unchecked",RADIO_DISABLED_UNCHECKED:iconPrefix+"radio-unchecked-fill",CHECKBOX_INDETERMINATE:iconPrefix+"checkbox-indeterminate-fill",CHECKBOX_CHECKED:iconPrefix+"checkbox-checked-fill",CHECKBOX_UNCHECKED:iconPrefix+"checkbox-unchecked",CHECKBOX_DISABLED_UNCHECKED:iconPrefix+"checkbox-unchecked-fill",INPUT_CLEAR:iconPrefix+"error-circle-fill",INPUT_SEARCH:iconPrefix+"search",INPUT_PLUS_NUM:iconPrefix+"caret-up",INPUT_MINUS_NUM:iconPrefix+"caret-down",NUMBER_INPUT_MINUS_NUM:iconPrefix+"minus",NUMBER_INPUT_PLUS_NUM:iconPrefix+"add",DATE_PICKER_DATE:iconPrefix+"calendar",PASSWORD_INPUT_SHOW_PWD:iconPrefix+"eye-fill-close",PASSWORD_INPUT_HIDE_PWD:iconPrefix+"eye-fill",MODAL_ZOOM_MIN:iconPrefix+"minus",MODAL_ZOOM_REVERT:iconPrefix+"recover",MODAL_ZOOM_IN:iconPrefix+"square",MODAL_ZOOM_OUT:iconPrefix+"maximize",MODAL_CLOSE:iconPrefix+"close",MODAL_INFO:iconPrefix+"info-circle-fill",MODAL_SUCCESS:iconPrefix+"success-circle-fill",MODAL_WARNING:iconPrefix+"warning-circle-fill",MODAL_ERROR:iconPrefix+"error-circle-fill",MODAL_QUESTION:iconPrefix+"question-circle-fill",MODAL_LOADING:iconPrefix+"spinner roll",DRAWER_CLOSE:iconPrefix+"close",FORM_PREFIX:iconPrefix+"question-circle-fill",FORM_SUFFIX:iconPrefix+"question-circle-fill",FORM_FOLDING:iconPrefix+"arrow-up rotate180",FORM_UNFOLDING:iconPrefix+"arrow-up",FORM_VALID_ERROR_ICON:iconPrefix+"warning-circle-fill",FORM_DESIGN_STYLE_SETTING:iconPrefix+"layout",FORM_DESIGN_PROPS_PC:iconPrefix+"pc",FORM_DESIGN_PROPS_MOBILE:iconPrefix+"mobile",FORM_DESIGN_PROPS_ADD:iconPrefix+"add",FORM_DESIGN_PROPS_EDIT:iconPrefix+"edit",FORM_DESIGN_WIDGET_ADD:iconPrefix+"square-plus-fill",FORM_DESIGN_WIDGET_COPY:iconPrefix+"copy",FORM_DESIGN_WIDGET_DELETE:iconPrefix+"delete",FORM_DESIGN_WIDGET_SWAP_LR:iconPrefix+"swap",FORM_DESIGN_WIDGET_OPTION_DELETE:iconPrefix+"delete",FORM_DESIGN_WIDGET_OPTION_EXPAND_OPEN:iconPrefix+"square-plus",FORM_DESIGN_WIDGET_OPTION_EXPAND_CLOSE:iconPrefix+"square-minus",LIST_DESIGN_FIELD_SETTING:iconPrefix+"custom-column",LIST_DESIGN_LIST_SETTING:iconPrefix+"menu",LIST_DESIGN_LIST_SETTING_SEARCH_DELETE:iconPrefix+"delete",LIST_DESIGN_LIST_SETTING_ACTIVE_DELETE:iconPrefix+"delete",UPLOAD_FILE_ERROR:iconPrefix+"warning-circle-fill",UPLOAD_FILE_ADD:iconPrefix+"upload",UPLOAD_FILE_REMOVE:iconPrefix+"delete",UPLOAD_FILE_DOWNLOAD:iconPrefix+"download",UPLOAD_IMAGE_UPLOAD:iconPrefix+"upload",UPLOAD_IMAGE_RE_UPLOAD:iconPrefix+"repeat",UPLOAD_IMAGE_ADD:iconPrefix+"add",UPLOAD_IMAGE_REMOVE:iconPrefix+"close",UPLOAD_LOADING:iconPrefix+"spinner roll vxe-loading--default-icon",UPLOAD_FILE_TYPE_DEFAULT:iconPrefix+"file",UPLOAD_FILE_TYPE_XLSX:iconPrefix+"file-excel",UPLOAD_FILE_TYPE_XLS:iconPrefix+"file-excel",UPLOAD_FILE_TYPE_PDF:iconPrefix+"file-pdf",UPLOAD_FILE_TYPE_PNG:iconPrefix+"file-image",UPLOAD_FILE_TYPE_GIF:iconPrefix+"file-image",UPLOAD_FILE_TYPE_JPG:iconPrefix+"file-image",UPLOAD_FILE_TYPE_JPEG:iconPrefix+"file-image",UPLOAD_FILE_TYPE_MD:iconPrefix+"file-markdown",UPLOAD_FILE_TYPE_PPD:iconPrefix+"file-ppt",UPLOAD_FILE_TYPE_DOCX:iconPrefix+"file-word",UPLOAD_FILE_TYPE_DOC:iconPrefix+"file-word",UPLOAD_FILE_TYPE_ZIP:iconPrefix+"file-zip",UPLOAD_FILE_TYPE_TXT:iconPrefix+"file-txt",IMAGE_PREVIEW_CLOSE:iconPrefix+"close",IMAGE_PREVIEW_PREVIOUS:iconPrefix+"arrow-left",IMAGE_PREVIEW_NEXT:iconPrefix+"arrow-right",IMAGE_PREVIEW_PCT_FULL:iconPrefix+"pct-full",IMAGE_PREVIEW_PCT_1_1:iconPrefix+"pct-1-1",IMAGE_PREVIEW_ZOOM_OUT:iconPrefix+"search-zoom-out",IMAGE_PREVIEW_ZOOM_IN:iconPrefix+"search-zoom-in",IMAGE_PREVIEW_ROTATE_LEFT:iconPrefix+"rotate-left",IMAGE_PREVIEW_ROTATE_RIGHT:iconPrefix+"rotate-right",IMAGE_PREVIEW_PRINT:iconPrefix+"print",IMAGE_PREVIEW_DOWNLOAD:iconPrefix+"download",ALERT_CLOSE:iconPrefix+"close",ALERT_INFO:iconPrefix+"info-circle-fill",ALERT_SUCCESS:iconPrefix+"success-circle-fill",ALERT_WARNING:iconPrefix+"warning-circle-fill",ALERT_ERROR:iconPrefix+"error-circle-fill",TREE_NODE_OPEN:iconPrefix+"caret-right rotate90",TREE_NODE_CLOSE:iconPrefix+"caret-right",TREE_NODE_LOADED:iconPrefix+"spinner roll",TREE_DRAG:iconPrefix+"drag-handle",TREE_DRAG_STATUS_NODE:iconPrefix+"sort",TREE_DRAG_STATUS_SUB_NODE:iconPrefix+"add-sub",TREE_DRAG_DISABLED:iconPrefix+"no-drop",TREE_SELECT_LOADED:iconPrefix+"spinner roll",TREE_SELECT_OPEN:iconPrefix+"caret-down rotate180",TREE_SELECT_CLOSE:iconPrefix+"caret-down",TABLE_SELECT_LOADED:iconPrefix+"spinner roll",TABLE_SELECT_OPEN:iconPrefix+"caret-down rotate180",TABLE_SELECT_CLOSE:iconPrefix+"caret-down",TABS_TAB_BUTTON_TOP:iconPrefix+"arrow-up",TABS_TAB_BUTTON_BOTTOM:iconPrefix+"arrow-down",TABS_TAB_BUTTON_LEFT:iconPrefix+"arrow-left",TABS_TAB_BUTTON_RIGHT:iconPrefix+"arrow-right",TABS_TAB_CLOSE:iconPrefix+"close",TABS_TAB_REFRESH:iconPrefix+"refresh",TABS_TAB_REFRESH_LOADING:iconPrefix+"refresh roll",TEXT_COPY:iconPrefix+"copy",TEXT_LOADING:iconPrefix+"spinner roll",TAG_CLOSE:iconPrefix+"close",TAG_LOADING:iconPrefix+"spinner roll",CAROUSEL_HORIZONTAL_PREVIOUS:iconPrefix+"arrow-left",CAROUSEL_HORIZONTAL_NEXT:iconPrefix+"arrow-right",CAROUSEL_VERTICAL_PREVIOUS:iconPrefix+"arrow-up",CAROUSEL_VERTICAL_NEXT:iconPrefix+"arrow-down",COLLAPSE_OPEN:iconPrefix+"arrow-right rotate90",COLLAPSE_CLOSE:iconPrefix+"arrow-right",EMPTY_DEFAULT:iconPrefix+"empty",RESULT_INFO:iconPrefix+"info-circle-fill",RESULT_SUCCESS:iconPrefix+"success-circle-fill",RESULT_WARNING:iconPrefix+"warning-circle-fill",RESULT_ERROR:iconPrefix+"error-circle-fill",RESULT_QUESTION:iconPrefix+"question-circle-fill",RESULT_LOADING:iconPrefix+"spinner roll",RATE_CHECKED:iconPrefix+"star-fill",RATE_UNCHECKED:iconPrefix+"star",COLOR_PICKER_COLOR_COPY:iconPrefix+"copy",COLOR_PICKER_EYE_DROPPER:iconPrefix+"dropper",COLOR_PICKER_TPTY_OPEN:iconPrefix+"arrow-down rotate180",COLOR_PICKER_TPTY_CLOSE:iconPrefix+"arrow-down",SPLIT_TOP_ACTION:iconPrefix+"arrow-up",SPLIT_BOTTOM_ACTION:iconPrefix+"arrow-down",SPLIT_LEFT_ACTION:iconPrefix+"arrow-left",SPLIT_RIGHT_ACTION:iconPrefix+"arrow-right",BACKTOP_TOP:iconPrefix+"top",CONTEXT_MENU_OPTION_LOADING:iconPrefix+"spinner roll",CONTEXT_MENU_CHILDREN:iconPrefix+"arrow-right"}),exports.default=_core.VxeUI);
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:!0});var _exportNames={version:!0,config:!0,setup:!0},_core=(exports.config=config,exports.default=void 0,exports.setup=setup,exports.version=void 0,require("@vxe-ui/core")),_dynamics=(Object.keys(_core).forEach(function(e){"default"===e||"__esModule"===e||Object.prototype.hasOwnProperty.call(_exportNames,e)||e in exports&&exports[e]===_core[e]||Object.defineProperty(exports,e,{enumerable:!0,get:function(){return _core[e]}})}),require("../dynamics")),_log=require("./src/log"),version=exports.version="3.14.39";function config(e){return(0,_log.warnLog)("vxe.error.delFunc",["config","setConfig"]),(0,_core.setConfig)(e)}function setup(e){return(0,_log.warnLog)("vxe.error.delFunc",["setup","setConfig"]),(0,_core.setConfig)(e)}_core.VxeUI.uiVersion=version,_core.VxeUI.dynamicApp=_dynamics.dynamicApp,_core.VxeUI.config=config,_core.VxeUI.setup=setup,(0,_core.setConfig)({alert:{},anchor:{},anchorLink:{},avatar:{},backtop:{showIcon:!0,showContent:!0,showTop:!0,showBottom:!0,shadow:!0,threshold:20},badge:{},breadcrumb:{separator:"/"},breadcrumbItem:{},button:{trigger:"hover",prefixTooltip:{enterable:!0},suffixTooltip:{enterable:!0},showDropdownIcon:!0},buttonGroup:{},calendar:{minDate:new Date(1900,0,1),maxDate:new Date(2100,0,1),startDay:1,selectDay:1},card:{border:!0,padding:!0},carousel:{height:200,loop:!0,interval:5e3},carouselItem:{},cascader:{autoClose:!0},checkbox:{},checkboxButton:{},checkboxGroup:{},col:{},collapse:{padding:!0,expandConfig:{showIcon:!0}},collapsePane:{},contextMenu:{autoLocate:!0},countdown:{},colorPicker:{type:"rgb",clearable:!0,showAlpha:!0,clickToCopy:!0,showColorExtractor:!0,showQuick:!0},datePanel:{startDate:new Date(1900,0,1),endDate:new Date(2100,0,1),startDay:1,selectDay:1},datePicker:{shortcutConfig:{align:"left",mode:"text",autoClose:!0},startDay:1,selectDay:1,autoClose:!0,showClearButton:null,showConfirmButton:null},dateRangePicker:{shortcutConfig:{align:"left",mode:"text",autoClose:!0},startDay:1,selectDay:1,separator:" ~ ",autoClose:!0,showClearButton:!0,showConfirmButton:null},drawer:{position:"right",showHeader:!0,lockView:!0,mask:!0,showTitleOverflow:!0,showClose:!0,padding:!0,cancelClosable:!0,confirmClosable:!0},empty:{},form:{validConfig:{showErrorMessage:!0,autoPos:!0,theme:"beautify"},tooltipConfig:{enterable:!0},titleAsterisk:!0,titleOverflow:!1,padding:!0},formDesign:{height:400,showHeader:!0,showPc:!0},formGather:{},formGroup:{},formItem:{},formView:{},icon:{},iconPicker:{icons:["home","company","comment","setting","send","envelope","envelope-open","bell","search","print","pc","goods","chart-line","edit","delete","save","folder","microphone","flag","link","location","sunny","rmb","usd","user","add-user","add-users","star","unlock","time","text","feedback","calendar","association-form","cloud-download","cloud-upload","file","subtable","chart-bar-x","chart-bar-y","chart-line","chart-pie","chart-radar"]},image:{draggable:null,showPreview:!0,showPrintButton:!0},imageGroup:{showPreview:!0,showPrintButton:!0},imagePreview:{showPrintButton:!0,maskClosable:!0},input:{startDate:new Date(1900,0,1),endDate:new Date(2100,0,1),startDay:1,selectDay:1,digits:2,controls:!0},layoutAside:{},layoutBody:{backtopConfig:{}},layoutContainer:{},layoutFooter:{},layoutHeader:{},link:{underline:!0},listDesign:{height:400,showPc:!0},listView:{},list:{virtualYConfig:{enabled:!0,gt:60}},loading:{showIcon:!0,showText:!0},menu:{},modal:{top:16,showHeader:!0,minWidth:340,minHeight:140,lockView:!0,mask:!0,duration:3e3,marginSize:0,dblclickZoom:!0,showTitleOverflow:!0,animat:!0,showClose:!0,padding:!0,draggable:!0,showConfirmButton:null,cancelClosable:!0,confirmClosable:!0,zoomConfig:{minimizeMaxSize:10,minimizeVerticalOffset:{top:-24,left:0},minimizeHorizontalOffset:{top:0,left:32}},storageKey:"VXE_MODAL_POSITION"},noticeBar:{},numberInput:{digits:2,autoFill:!0,controlConfig:{enabled:!0,layout:"right",showButton:!0,isWheel:!0,isArrow:!0}},optgroup:{},option:{},pager:{pageSizePlacement:"top"},print:{pageStyle:{}},passwordInput:{controls:!0},printPageBreak:{},pulldown:{},radio:{strict:!0},radioButton:{strict:!0},radioGroup:{strict:!0},rate:{},result:{},row:{},segmented:{},select:{multiCharOverflow:8,radioConfig:{showIcon:!0,trigger:"option"},checkboxConfig:{showIcon:!0,trigger:"option"},remoteConfig:{enabled:!0,autoLoad:!0},virtualYConfig:{enabled:!0,gt:50,oSize:2}},splitter:{resize:!0,itemConfig:{minWidth:40,minHeight:40},resizeConfig:{showTip:!0}},splitterPanel:{},slider:{max:100,min:0},steps:{},switch:{},tabPane:{},tableSelect:{gridConfig:{showOverflow:!0,showHeaderOverflow:!0,showFooterOverflow:!0,rowConfig:{isHover:!0},virtualXConfig:{enabled:!0,gt:0},virtualYConfig:{enabled:!0,gt:0}}},tabs:{},tag:{},textEllipsis:{underline:!0},text:{copyConfig:{showMessage:!0}},textarea:{resize:"none"},timeline:{},timelineItem:{},tip:{},tooltip:{trigger:"hover",theme:"dark",enterDelay:500,leaveDelay:300,isArrow:!0},tree:{indent:20,minHeight:60,radioConfig:{strict:!0},dragConfig:{showIcon:!0,animation:!0,showGuidesStatus:!0,showDragTip:!0},virtualYConfig:{enabled:!0,gt:50,oSize:2}},treeSelect:{autoClose:null,virtualYConfig:{enabled:!0,gt:0,oSize:2},treeConfig:{maxHeight:300,radioConfig:{},checkboxConfig:{},filterConfig:{autoExpandAll:!0}}},upload:{mode:"all",imageTypes:["jpg","jpeg","png","gif"],showList:!0,showUploadButton:!0,showButtonText:!0,showRemoveButton:!0,showButtonIcon:!0,showPreview:!0,dragToUpload:!0,showLimitSize:!0,showLimitCount:!0,autoSubmit:!0,maxSimultaneousUploads:5,previewImageConfig:{}},watermark:{rotate:-30,gap:[100,100]},table:{},colgroup:{},column:{},toolbar:{},grid:{},gantt:{}});var iconPrefix="vxe-icon-",_default=((0,_core.setIcon)({LOADING:iconPrefix+"spinner roll vxe-loading--default-icon",BUTTON_DROPDOWN:iconPrefix+"arrow-down",BUTTON_LOADING:iconPrefix+"spinner roll",BUTTON_TOOLTIP_ICON:iconPrefix+"question-circle-fill",MENU_ITEM_EXPAND_OPEN:iconPrefix+"arrow-down rotate180",MENU_ITEM_EXPAND_CLOSE:iconPrefix+"arrow-down",SELECT_LOADED:iconPrefix+"spinner roll",SELECT_OPEN:iconPrefix+"caret-down rotate180",SELECT_CLOSE:iconPrefix+"caret-down",SELECT_ADD_OPTION:iconPrefix+"add",ICON_PICKER_OPEN:iconPrefix+"caret-down rotate180",ICON_PICKER_CLOSE:iconPrefix+"caret-down",PAGER_HOME:iconPrefix+"home-page",PAGER_END:iconPrefix+"end-page",PAGER_JUMP_PREV:iconPrefix+"arrow-double-left",PAGER_JUMP_NEXT:iconPrefix+"arrow-double-right",PAGER_PREV_PAGE:iconPrefix+"arrow-left",PAGER_NEXT_PAGE:iconPrefix+"arrow-right",PAGER_JUMP_MORE:iconPrefix+"ellipsis-h",RADIO_CHECKED:iconPrefix+"radio-checked-fill",RADIO_UNCHECKED:iconPrefix+"radio-unchecked",RADIO_DISABLED_UNCHECKED:iconPrefix+"radio-unchecked-fill",CHECKBOX_INDETERMINATE:iconPrefix+"checkbox-indeterminate-fill",CHECKBOX_CHECKED:iconPrefix+"checkbox-checked-fill",CHECKBOX_UNCHECKED:iconPrefix+"checkbox-unchecked",CHECKBOX_DISABLED_UNCHECKED:iconPrefix+"checkbox-unchecked-fill",INPUT_CLEAR:iconPrefix+"error-circle-fill",INPUT_SEARCH:iconPrefix+"search",INPUT_PLUS_NUM:iconPrefix+"caret-up",INPUT_MINUS_NUM:iconPrefix+"caret-down",NUMBER_INPUT_MINUS_NUM:iconPrefix+"minus",NUMBER_INPUT_PLUS_NUM:iconPrefix+"add",DATE_PICKER_DATE:iconPrefix+"calendar",PASSWORD_INPUT_SHOW_PWD:iconPrefix+"eye-fill-close",PASSWORD_INPUT_HIDE_PWD:iconPrefix+"eye-fill",MODAL_ZOOM_MIN:iconPrefix+"minus",MODAL_ZOOM_REVERT:iconPrefix+"recover",MODAL_ZOOM_IN:iconPrefix+"square",MODAL_ZOOM_OUT:iconPrefix+"maximize",MODAL_CLOSE:iconPrefix+"close",MODAL_INFO:iconPrefix+"info-circle-fill",MODAL_SUCCESS:iconPrefix+"success-circle-fill",MODAL_WARNING:iconPrefix+"warning-circle-fill",MODAL_ERROR:iconPrefix+"error-circle-fill",MODAL_QUESTION:iconPrefix+"question-circle-fill",MODAL_LOADING:iconPrefix+"spinner roll",DRAWER_CLOSE:iconPrefix+"close",FORM_PREFIX:iconPrefix+"question-circle-fill",FORM_SUFFIX:iconPrefix+"question-circle-fill",FORM_FOLDING:iconPrefix+"arrow-up rotate180",FORM_UNFOLDING:iconPrefix+"arrow-up",FORM_VALID_ERROR_ICON:iconPrefix+"warning-circle-fill",FORM_DESIGN_STYLE_SETTING:iconPrefix+"layout",FORM_DESIGN_PROPS_PC:iconPrefix+"pc",FORM_DESIGN_PROPS_MOBILE:iconPrefix+"mobile",FORM_DESIGN_PROPS_ADD:iconPrefix+"add",FORM_DESIGN_PROPS_EDIT:iconPrefix+"edit",FORM_DESIGN_WIDGET_ADD:iconPrefix+"square-plus-fill",FORM_DESIGN_WIDGET_COPY:iconPrefix+"copy",FORM_DESIGN_WIDGET_DELETE:iconPrefix+"delete",FORM_DESIGN_WIDGET_SWAP_LR:iconPrefix+"swap",FORM_DESIGN_WIDGET_OPTION_DELETE:iconPrefix+"delete",FORM_DESIGN_WIDGET_OPTION_EXPAND_OPEN:iconPrefix+"square-plus",FORM_DESIGN_WIDGET_OPTION_EXPAND_CLOSE:iconPrefix+"square-minus",LIST_DESIGN_FIELD_SETTING:iconPrefix+"custom-column",LIST_DESIGN_LIST_SETTING:iconPrefix+"menu",LIST_DESIGN_LIST_SETTING_SEARCH_DELETE:iconPrefix+"delete",LIST_DESIGN_LIST_SETTING_ACTIVE_DELETE:iconPrefix+"delete",UPLOAD_FILE_ERROR:iconPrefix+"warning-circle-fill",UPLOAD_FILE_ADD:iconPrefix+"upload",UPLOAD_FILE_REMOVE:iconPrefix+"delete",UPLOAD_FILE_DOWNLOAD:iconPrefix+"download",UPLOAD_IMAGE_UPLOAD:iconPrefix+"upload",UPLOAD_IMAGE_RE_UPLOAD:iconPrefix+"repeat",UPLOAD_IMAGE_ADD:iconPrefix+"add",UPLOAD_IMAGE_REMOVE:iconPrefix+"close",UPLOAD_LOADING:iconPrefix+"spinner roll vxe-loading--default-icon",UPLOAD_FILE_TYPE_DEFAULT:iconPrefix+"file",UPLOAD_FILE_TYPE_XLSX:iconPrefix+"file-excel",UPLOAD_FILE_TYPE_XLS:iconPrefix+"file-excel",UPLOAD_FILE_TYPE_PDF:iconPrefix+"file-pdf",UPLOAD_FILE_TYPE_PNG:iconPrefix+"file-image",UPLOAD_FILE_TYPE_GIF:iconPrefix+"file-image",UPLOAD_FILE_TYPE_JPG:iconPrefix+"file-image",UPLOAD_FILE_TYPE_JPEG:iconPrefix+"file-image",UPLOAD_FILE_TYPE_MD:iconPrefix+"file-markdown",UPLOAD_FILE_TYPE_PPD:iconPrefix+"file-ppt",UPLOAD_FILE_TYPE_DOCX:iconPrefix+"file-word",UPLOAD_FILE_TYPE_DOC:iconPrefix+"file-word",UPLOAD_FILE_TYPE_ZIP:iconPrefix+"file-zip",UPLOAD_FILE_TYPE_TXT:iconPrefix+"file-txt",IMAGE_PREVIEW_CLOSE:iconPrefix+"close",IMAGE_PREVIEW_PREVIOUS:iconPrefix+"arrow-left",IMAGE_PREVIEW_NEXT:iconPrefix+"arrow-right",IMAGE_PREVIEW_PCT_FULL:iconPrefix+"pct-full",IMAGE_PREVIEW_PCT_1_1:iconPrefix+"pct-1-1",IMAGE_PREVIEW_ZOOM_OUT:iconPrefix+"search-zoom-out",IMAGE_PREVIEW_ZOOM_IN:iconPrefix+"search-zoom-in",IMAGE_PREVIEW_ROTATE_LEFT:iconPrefix+"rotate-left",IMAGE_PREVIEW_ROTATE_RIGHT:iconPrefix+"rotate-right",IMAGE_PREVIEW_PRINT:iconPrefix+"print",IMAGE_PREVIEW_DOWNLOAD:iconPrefix+"download",ALERT_CLOSE:iconPrefix+"close",ALERT_INFO:iconPrefix+"info-circle-fill",ALERT_SUCCESS:iconPrefix+"success-circle-fill",ALERT_WARNING:iconPrefix+"warning-circle-fill",ALERT_ERROR:iconPrefix+"error-circle-fill",TREE_NODE_OPEN:iconPrefix+"caret-right rotate90",TREE_NODE_CLOSE:iconPrefix+"caret-right",TREE_NODE_LOADED:iconPrefix+"spinner roll",TREE_DRAG:iconPrefix+"drag-handle",TREE_DRAG_STATUS_NODE:iconPrefix+"sort",TREE_DRAG_STATUS_SUB_NODE:iconPrefix+"add-sub",TREE_DRAG_DISABLED:iconPrefix+"no-drop",TREE_SELECT_LOADED:iconPrefix+"spinner roll",TREE_SELECT_OPEN:iconPrefix+"caret-down rotate180",TREE_SELECT_CLOSE:iconPrefix+"caret-down",TABLE_SELECT_LOADED:iconPrefix+"spinner roll",TABLE_SELECT_OPEN:iconPrefix+"caret-down rotate180",TABLE_SELECT_CLOSE:iconPrefix+"caret-down",TABS_TAB_BUTTON_TOP:iconPrefix+"arrow-up",TABS_TAB_BUTTON_BOTTOM:iconPrefix+"arrow-down",TABS_TAB_BUTTON_LEFT:iconPrefix+"arrow-left",TABS_TAB_BUTTON_RIGHT:iconPrefix+"arrow-right",TABS_TAB_CLOSE:iconPrefix+"close",TABS_TAB_REFRESH:iconPrefix+"refresh",TABS_TAB_REFRESH_LOADING:iconPrefix+"refresh roll",TEXT_COPY:iconPrefix+"copy",TEXT_LOADING:iconPrefix+"spinner roll",TAG_CLOSE:iconPrefix+"close",TAG_LOADING:iconPrefix+"spinner roll",CAROUSEL_HORIZONTAL_PREVIOUS:iconPrefix+"arrow-left",CAROUSEL_HORIZONTAL_NEXT:iconPrefix+"arrow-right",CAROUSEL_VERTICAL_PREVIOUS:iconPrefix+"arrow-up",CAROUSEL_VERTICAL_NEXT:iconPrefix+"arrow-down",COLLAPSE_OPEN:iconPrefix+"arrow-right rotate90",COLLAPSE_CLOSE:iconPrefix+"arrow-right",EMPTY_DEFAULT:iconPrefix+"empty",RESULT_INFO:iconPrefix+"info-circle-fill",RESULT_SUCCESS:iconPrefix+"success-circle-fill",RESULT_WARNING:iconPrefix+"warning-circle-fill",RESULT_ERROR:iconPrefix+"error-circle-fill",RESULT_QUESTION:iconPrefix+"question-circle-fill",RESULT_LOADING:iconPrefix+"spinner roll",RATE_CHECKED:iconPrefix+"star-fill",RATE_UNCHECKED:iconPrefix+"star",COLOR_PICKER_COLOR_COPY:iconPrefix+"copy",COLOR_PICKER_EYE_DROPPER:iconPrefix+"dropper",COLOR_PICKER_TPTY_OPEN:iconPrefix+"arrow-down rotate180",COLOR_PICKER_TPTY_CLOSE:iconPrefix+"arrow-down",SPLIT_TOP_ACTION:iconPrefix+"arrow-up",SPLIT_BOTTOM_ACTION:iconPrefix+"arrow-down",SPLIT_LEFT_ACTION:iconPrefix+"arrow-left",SPLIT_RIGHT_ACTION:iconPrefix+"arrow-right",BACKTOP_TOP:iconPrefix+"top",CONTEXT_MENU_OPTION_LOADING:iconPrefix+"spinner roll",CONTEXT_MENU_CHILDREN:iconPrefix+"arrow-right"}),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
|
-
var version = "ui v".concat("3.14.
|
|
8
|
+
var version = "ui v".concat("3.14.39");
|
|
9
9
|
var warnLog = exports.warnLog = _core.log.create('warn', version);
|
|
10
10
|
var errLog = exports.errLog = _core.log.create('error', version);
|
package/lib/ui/src/log.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,"__esModule",{value:!0}),exports.warnLog=exports.errLog=void 0;var _core=require("@vxe-ui/core"),version="ui v".concat("3.14.
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:!0}),exports.warnLog=exports.errLog=void 0;var _core=require("@vxe-ui/core"),version="ui v".concat("3.14.39"),warnLog=exports.warnLog=_core.log.create("warn",version),errLog=exports.errLog=_core.log.create("error",version);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vxe-pc-ui",
|
|
3
|
-
"version": "3.14.
|
|
3
|
+
"version": "3.14.39",
|
|
4
4
|
"description": "A vue based PC component library",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"update": "npm install --legacy-peer-deps",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"style": "lib/style.css",
|
|
26
26
|
"typings": "types/index.d.ts",
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@vxe-ui/core": "^3.4.
|
|
28
|
+
"@vxe-ui/core": "^3.4.14"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"@typescript-eslint/eslint-plugin": "^6.21.0",
|
|
@@ -967,7 +967,7 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
967
967
|
const { type, exponential } = props
|
|
968
968
|
const inpMaxLength = $xeInput.computeInpMaxLength
|
|
969
969
|
const digitsValue = $xeInput.computeDigitsValue
|
|
970
|
-
const restVal = (type === 'float' ? toFloatValueFixed(val, digitsValue) : XEUtils.toValueString(val))
|
|
970
|
+
const restVal = (type === 'float' ? toFloatValueFixed(val, digitsValue, '') : XEUtils.toValueString(val))
|
|
971
971
|
if (exponential && (val === restVal || XEUtils.toValueString(val).toLowerCase() === XEUtils.toNumber(restVal).toExponential())) {
|
|
972
972
|
return val
|
|
973
973
|
}
|
|
@@ -1200,7 +1200,7 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
1200
1200
|
$xeInput.changeValue()
|
|
1201
1201
|
} else if (type === 'float') {
|
|
1202
1202
|
if (inputValue) {
|
|
1203
|
-
const validValue = toFloatValueFixed(inputValue, digitsValue)
|
|
1203
|
+
const validValue = toFloatValueFixed(inputValue, digitsValue, '')
|
|
1204
1204
|
if (inputValue !== validValue) {
|
|
1205
1205
|
$xeInput.handleChange(validValue, { type: 'init' })
|
|
1206
1206
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { CreateElement, PropType, VNode } from 'vue'
|
|
2
2
|
import { defineVxeComponent } from '../../ui/src/comp'
|
|
3
|
-
import XEUtils from 'xe-utils'
|
|
3
|
+
import XEUtils, { CommafyOptions } from 'xe-utils'
|
|
4
4
|
import { getConfig, getIcon, getI18n, globalEvents, GLOBAL_EVENT_KEYS, createEvent, globalMixins, renderEmptyElement } from '../../ui'
|
|
5
5
|
import { getFuncText, eqEmptyValue, isEnableConf } from '../../ui/src/utils'
|
|
6
6
|
import { hasClass, getEventTargetNode, hasControlKey } from '../../ui/src/dom'
|
|
@@ -89,6 +89,11 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
89
89
|
},
|
|
90
90
|
controlConfig: Object as PropType<VxeNumberInputPropTypes.ControlConfig>,
|
|
91
91
|
|
|
92
|
+
// float
|
|
93
|
+
roundingMode: {
|
|
94
|
+
type: String as PropType<VxeNumberInputPropTypes.RoundingMode>,
|
|
95
|
+
default: null
|
|
96
|
+
},
|
|
92
97
|
// float
|
|
93
98
|
digits: {
|
|
94
99
|
type: [String, Number] as PropType<VxeNumberInputPropTypes.Digits>,
|
|
@@ -303,12 +308,20 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
303
308
|
const props = $xeNumberInput
|
|
304
309
|
const reactData = $xeNumberInput.reactData
|
|
305
310
|
|
|
306
|
-
const { type, showCurrency, currencySymbol, autoFill } = props
|
|
311
|
+
const { type, roundingMode, showCurrency, currencySymbol, autoFill } = props
|
|
307
312
|
const { inputValue } = reactData
|
|
308
313
|
const digitsValue = $xeNumberInput.computeDigitsValue
|
|
309
314
|
if (type === 'amount') {
|
|
310
315
|
const num = XEUtils.toNumber(inputValue)
|
|
311
|
-
|
|
316
|
+
const cfyOpts: CommafyOptions = { digits: digitsValue }
|
|
317
|
+
if (roundingMode === 'floor') {
|
|
318
|
+
cfyOpts.floor = true
|
|
319
|
+
} else if (roundingMode === 'ceil') {
|
|
320
|
+
cfyOpts.ceil = true
|
|
321
|
+
} else {
|
|
322
|
+
cfyOpts.round = true
|
|
323
|
+
}
|
|
324
|
+
let amountLabel = XEUtils.commafy(num, cfyOpts)
|
|
312
325
|
if (!autoFill) {
|
|
313
326
|
const [iStr, dStr] = amountLabel.split('.')
|
|
314
327
|
if (dStr) {
|
|
@@ -404,13 +417,13 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
404
417
|
const $xeNumberInput = this
|
|
405
418
|
const props = $xeNumberInput
|
|
406
419
|
|
|
407
|
-
const { exponential, autoFill } = props
|
|
420
|
+
const { exponential, roundingMode, autoFill } = props
|
|
408
421
|
const inpMaxLength = $xeNumberInput.computeInpMaxLength
|
|
409
422
|
const digitsValue = $xeNumberInput.computeDigitsValue
|
|
410
423
|
const decimalsType = $xeNumberInput.computeDecimalsType
|
|
411
424
|
let restVal = ''
|
|
412
425
|
if (decimalsType) {
|
|
413
|
-
restVal = toFloatValueFixed(val, digitsValue)
|
|
426
|
+
restVal = toFloatValueFixed(val, digitsValue, roundingMode)
|
|
414
427
|
if (!autoFill) {
|
|
415
428
|
restVal = handleNumberString(XEUtils.toNumber(restVal))
|
|
416
429
|
}
|
|
@@ -533,18 +546,18 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
533
546
|
const props = $xeNumberInput
|
|
534
547
|
const reactData = $xeNumberInput.reactData
|
|
535
548
|
|
|
536
|
-
const { autoFill } = props
|
|
549
|
+
const { roundingMode, autoFill } = props
|
|
537
550
|
const { inputValue } = reactData
|
|
538
551
|
const digitsValue = $xeNumberInput.computeDigitsValue
|
|
539
552
|
const decimalsType = $xeNumberInput.computeDecimalsType
|
|
540
553
|
if (eqEmptyValue(val)) {
|
|
541
554
|
reactData.inputValue = ''
|
|
542
555
|
} else {
|
|
543
|
-
let textValue =
|
|
556
|
+
let textValue = '' + val
|
|
544
557
|
if (decimalsType) {
|
|
545
|
-
textValue = toFloatValueFixed(val, digitsValue)
|
|
558
|
+
textValue = toFloatValueFixed(val, digitsValue, roundingMode)
|
|
546
559
|
if (!autoFill) {
|
|
547
|
-
textValue =
|
|
560
|
+
textValue = '' + XEUtils.toNumber(textValue)
|
|
548
561
|
}
|
|
549
562
|
}
|
|
550
563
|
if (textValue !== inputValue) {
|
|
@@ -560,7 +573,7 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
560
573
|
const props = $xeNumberInput
|
|
561
574
|
const reactData = $xeNumberInput.reactData
|
|
562
575
|
|
|
563
|
-
const { autoFill } = props
|
|
576
|
+
const { roundingMode, autoFill } = props
|
|
564
577
|
const { inputValue } = reactData
|
|
565
578
|
const digitsValue = $xeNumberInput.computeDigitsValue
|
|
566
579
|
const decimalsType = $xeNumberInput.computeDecimalsType
|
|
@@ -569,7 +582,7 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
569
582
|
let textValue = ''
|
|
570
583
|
let validValue: number | null = null
|
|
571
584
|
if (inputValue) {
|
|
572
|
-
textValue = toFloatValueFixed(inputValue, digitsValue)
|
|
585
|
+
textValue = toFloatValueFixed(inputValue, digitsValue, roundingMode)
|
|
573
586
|
validValue = XEUtils.toNumber(textValue)
|
|
574
587
|
if (!autoFill) {
|
|
575
588
|
textValue = `${validValue}`
|
|
@@ -1,12 +1,25 @@
|
|
|
1
1
|
import XEUtils from 'xe-utils'
|
|
2
2
|
|
|
3
|
+
import type { VxeNumberInputPropTypes } from '../../../types'
|
|
4
|
+
|
|
3
5
|
export function handleNumber (val: string | number | null | undefined) {
|
|
4
|
-
return XEUtils.isString(val) ? val.replace(
|
|
6
|
+
return XEUtils.isString(val) ? val.replace(/[^0-9e.-]/g, '') : val
|
|
5
7
|
}
|
|
6
8
|
|
|
7
|
-
export function toFloatValueFixed (inputValue: string | number, digitsValue: number) {
|
|
8
|
-
if (
|
|
9
|
-
|
|
9
|
+
export function toFloatValueFixed (inputValue: string | number, digitsValue: number, roundingMode: VxeNumberInputPropTypes.RoundingMode) {
|
|
10
|
+
if (!roundingMode || roundingMode === 'default') {
|
|
11
|
+
// 默认截取忽略
|
|
12
|
+
if (/^-/.test('' + inputValue)) {
|
|
13
|
+
return XEUtils.toFixed(XEUtils.ceil(inputValue, digitsValue), digitsValue)
|
|
14
|
+
}
|
|
15
|
+
return XEUtils.toFixed(XEUtils.floor(inputValue, digitsValue), digitsValue)
|
|
16
|
+
} else {
|
|
17
|
+
if (roundingMode === 'ceil') {
|
|
18
|
+
return XEUtils.toFixed(XEUtils.ceil(inputValue, digitsValue), digitsValue)
|
|
19
|
+
}
|
|
20
|
+
if (roundingMode === 'floor') {
|
|
21
|
+
return XEUtils.toFixed(XEUtils.floor(inputValue, digitsValue), digitsValue)
|
|
22
|
+
}
|
|
23
|
+
return XEUtils.toFixed(XEUtils.round(inputValue, digitsValue), digitsValue)
|
|
10
24
|
}
|
|
11
|
-
return XEUtils.toFixed(XEUtils.floor(inputValue, digitsValue), digitsValue)
|
|
12
25
|
}
|
|
@@ -61,6 +61,13 @@ export namespace VxeNumberInputPropTypes {
|
|
|
61
61
|
*/
|
|
62
62
|
layout?: 'left' | 'right' | 'default' | ''
|
|
63
63
|
}
|
|
64
|
+
/**
|
|
65
|
+
* 小数位数处理时的舍入方式
|
|
66
|
+
*/
|
|
67
|
+
export type RoundingMode = 'round' | 'ceil' | 'floor' | 'default' | '' | null
|
|
68
|
+
/**
|
|
69
|
+
* 保留小数位数
|
|
70
|
+
*/
|
|
64
71
|
export type Digits = string | number | null
|
|
65
72
|
export type AutoFill = boolean
|
|
66
73
|
export type Editable = boolean
|
|
@@ -139,7 +146,11 @@ export interface VxeNumberInputProps {
|
|
|
139
146
|
controlConfig?: VxeNumberInputPropTypes.ControlConfig
|
|
140
147
|
|
|
141
148
|
/**
|
|
142
|
-
*
|
|
149
|
+
* 小数位数处理时的舍入方式
|
|
150
|
+
*/
|
|
151
|
+
roundingMode?: VxeNumberInputPropTypes.RoundingMode
|
|
152
|
+
/**
|
|
153
|
+
* 保留小数位数
|
|
143
154
|
*/
|
|
144
155
|
digits?: VxeNumberInputPropTypes.Digits
|
|
145
156
|
/**
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|