vxe-pc-ui 4.8.11 → 4.8.13
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/README.md +4 -4
- package/es/form/index.js +0 -1
- package/es/form/src/form-config-item.js +1 -0
- package/es/form/src/form-group.js +1 -0
- package/es/form/src/form-item.js +1 -0
- package/es/form/src/form.js +67 -9
- package/es/form/src/render.js +5 -5
- package/es/icon/style.css +1 -1
- package/es/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/ui/index.js +1 -1
- package/es/ui/src/dom.js +9 -0
- package/es/ui/src/log.js +1 -1
- package/lib/form/index.js +0 -1
- package/lib/form/index.min.js +1 -1
- package/lib/form/src/form-config-item.js +1 -0
- package/lib/form/src/form-config-item.min.js +1 -1
- package/lib/form/src/form-group.js +1 -0
- package/lib/form/src/form-group.min.js +1 -1
- package/lib/form/src/form-item.js +1 -0
- package/lib/form/src/form-item.min.js +1 -1
- package/lib/form/src/form.js +75 -8
- package/lib/form/src/form.min.js +1 -1
- package/lib/form/src/render.js +6 -3
- package/lib/form/src/render.min.js +1 -1
- package/lib/icon/style/style.css +1 -1
- package/lib/icon/style/style.min.css +1 -1
- package/lib/index.umd.js +1409 -1328
- package/lib/index.umd.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/ui/index.js +1 -1
- package/lib/ui/index.min.js +1 -1
- package/lib/ui/src/dom.js +10 -0
- package/lib/ui/src/dom.min.js +1 -1
- package/lib/ui/src/log.js +1 -1
- package/lib/ui/src/log.min.js +1 -1
- package/package.json +1 -1
- package/packages/form/index.ts +0 -1
- package/packages/form/src/form-config-item.ts +1 -0
- package/packages/form/src/form-group.ts +1 -0
- package/packages/form/src/form-item.ts +1 -0
- package/packages/form/src/form.ts +71 -10
- package/packages/form/src/render.ts +11 -11
- package/packages/ui/src/dom.ts +10 -0
- package/types/components/form.d.ts +11 -2
- package/types/components/gantt-module/gantt-view.d.ts +164 -0
- package/types/components/gantt-module/index.d.ts +1 -0
- package/types/components/gantt.d.ts +113 -29
- package/types/components/grid.d.ts +38 -18
- package/types/components/table-module/custom.d.ts +2 -1
- package/types/components/table.d.ts +32 -9
- package/types/ui/commands.d.ts +3 -1
- package/types/ui/hooks.d.ts +2 -0
- /package/es/icon/{iconfont.1754563062233.ttf → iconfont.1754905375075.ttf} +0 -0
- /package/es/icon/{iconfont.1754563062233.woff → iconfont.1754905375075.woff} +0 -0
- /package/es/icon/{iconfont.1754563062233.woff2 → iconfont.1754905375075.woff2} +0 -0
- /package/es/{iconfont.1754563062233.ttf → iconfont.1754905375075.ttf} +0 -0
- /package/es/{iconfont.1754563062233.woff → iconfont.1754905375075.woff} +0 -0
- /package/es/{iconfont.1754563062233.woff2 → iconfont.1754905375075.woff2} +0 -0
- /package/lib/icon/style/{iconfont.1754563062233.ttf → iconfont.1754905375075.ttf} +0 -0
- /package/lib/icon/style/{iconfont.1754563062233.woff → iconfont.1754905375075.woff} +0 -0
- /package/lib/icon/style/{iconfont.1754563062233.woff2 → iconfont.1754905375075.woff2} +0 -0
- /package/lib/{iconfont.1754563062233.ttf → iconfont.1754905375075.ttf} +0 -0
- /package/lib/{iconfont.1754563062233.woff → iconfont.1754905375075.woff} +0 -0
- /package/lib/{iconfont.1754563062233.woff2 → iconfont.1754905375075.woff2} +0 -0
package/lib/ui/index.js
CHANGED
|
@@ -26,7 +26,7 @@ Object.keys(_core).forEach(function (key) {
|
|
|
26
26
|
});
|
|
27
27
|
var _dynamics = require("../dynamics");
|
|
28
28
|
var _log = require("./src/log");
|
|
29
|
-
const version = exports.version = "4.8.
|
|
29
|
+
const version = exports.version = "4.8.13";
|
|
30
30
|
_core.VxeUI.uiVersion = version;
|
|
31
31
|
_core.VxeUI.dynamicApp = _dynamics.dynamicApp;
|
|
32
32
|
function config(options) {
|
package/lib/ui/index.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"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.8.11";function config(e){return(0,_log.warnLog)("vxe.error.delFunc",["config","setConfig"]),(0,_core.setConfig)(e)}function setup(e){return(0,_log.warnLog)("vxe.error.delFunc",["setup","setConfig"]),(0,_core.setConfig)(e)}_core.VxeUI.uiVersion=version,_core.VxeUI.dynamicApp=_dynamics.dynamicApp,_core.VxeUI.config=config,_core.VxeUI.setup=setup,(0,_core.setConfig)({alert:{},anchor:{},anchorLink:{},avatar:{},badge:{},breadcrumb:{separator:"/"},breadcrumbItem:{},button:{trigger:"hover",prefixTooltip:{enterable:!0},suffixTooltip:{enterable:!0}},buttonGroup:{},calendar:{minDate:new Date(1900,0,1),maxDate:new Date(2100,0,1),startDay:1,selectDay:1},card:{border:!0,padding:!0},carousel:{height:200,loop:!0,interval:5e3},carouselItem:{},checkbox:{},checkboxButton:{},checkboxGroup:{},col:{},collapse:{padding:!0,expandConfig:{showIcon:!0}},collapsePane:{},countdown:{},colorPicker:{type:"rgb",clearable:!0,showAlpha:!0,clickToCopy:!0,showColorExtractor:!0,showQuick:!0},datePanel:{startDate:new Date(1900,0,1),endDate:new Date(2100,0,1),startDay:1,selectDay:1},datePicker:{shortcutConfig:{align:"left",mode:"text",autoClose:!0},startDay:1,selectDay:1,autoClose:!0,showClearButton:null,showConfirmButton:null},dateRangePicker:{shortcutConfig:{align:"left",mode:"text",autoClose:!0},startDay:1,selectDay:1,separator:" ~ ",autoClose:!0,showClearButton:null,showConfirmButton:null},drawer:{position:"right",showHeader:!0,lockView:!0,mask:!0,showTitleOverflow:!0,showClose:!0,padding:!0,cancelClosable:!0,confirmClosable:!0},empty:{},form:{validConfig:{showMessage:!0,autoPos:!0,theme:"beautify"},tooltipConfig:{enterable:!0},titleAsterisk:!0,titleOverflow:!1,padding:!0},formDesign:{height:400,showHeader:!0,showPc:!0},formGather:{},formGroup:{},formItem:{},formView:{},icon:{},iconPicker:{icons:["home","company","comment","setting","send","envelope","envelope-open","bell","search","print","pc","goods","chart-line","edit","delete","save","folder","microphone","flag","link","location","sunny","rmb","usd","user","add-user","add-users","star","unlock","time","text","feedback","calendar","association-form","cloud-download","cloud-upload","file","subtable","chart-bar-x","chart-bar-y","chart-line","chart-pie","chart-radar"]},image:{showPreview:!0,showPrintButton:!0,maskClosable:!0},imageGroup:{showPreview:!0,showPrintButton:!0},imagePreview:{showPrintButton:!0},input:{startDate:new Date(1900,0,1),endDate:new Date(2100,0,1),startDay:1,selectDay:1,digits:2,controls:!0},layoutAside:{},layoutBody:{},layoutContainer:{},layoutFooter:{},layoutHeader:{},link:{underline:!0},listDesign:{height:400,showPc:!0},listView:{},list:{virtualYConfig:{enabled:!0,gt:100}},loading:{showIcon:!0,showText:!0},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:{destroyOnClose:!0},radio:{strict:!0},radioButton:{strict:!0},radioGroup:{strict:!0},rate:{},result:{},row:{},select:{multiCharOverflow:8,remoteConfig:{enabled:!0,autoLoad:!0},virtualYConfig:{enabled:!0,gt:50,oSize:2}},split:{resize:!0,itemConfig:{minWidth:40,minHeight:40}},splitPane:{},slider:{max:100,min:0},steps:{},switch:{},tabPane:{},tableSelect:{gridConfig:{showOverflow:!0,showHeaderOverflow:!0,showFooterOverflow:!0,rowConfig:{isHover:!0},virtualXConfig:{enabled:!0,gt:0},virtualYConfig:{enabled:!0,gt:0}}},tabs:{},tag:{},textEllipsis:{underline:!0},text:{},textarea:{resize:"none"},tip:{},tooltip:{trigger:"hover",theme:"dark",enterDelay:500,leaveDelay:300,isArrow:!0},tree:{indent:20,minHeight:60,radioConfig:{strict:!0},virtualYConfig:{enabled:!0,gt:50,oSize:2}},treeSelect:{autoClose:!0,virtualYConfig:{enabled:!0,gt:0,oSize:2},treeConfig:{maxHeight:300,radioConfig:{},checkboxConfig:{},filterConfig:{autoExpandAll:!0}}},upload:{mode:"all",imageTypes:["jpg","jpeg","png","gif"],showList:!0,showUploadButton:!0,showButtonText:!0,showRemoveButton:!0,showButtonIcon:!0,showPreview:!0,dragToUpload:!0,showLimitSize:!0,showLimitCount:!0,autoSubmit:!0,maxSimultaneousUploads:5},watermark:{rotate:-30,gap:[100,100]},table:{},colgroup:{},column:{},toolbar:{},grid:{},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_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.8.13";function config(e){return(0,_log.warnLog)("vxe.error.delFunc",["config","setConfig"]),(0,_core.setConfig)(e)}function setup(e){return(0,_log.warnLog)("vxe.error.delFunc",["setup","setConfig"]),(0,_core.setConfig)(e)}_core.VxeUI.uiVersion=version,_core.VxeUI.dynamicApp=_dynamics.dynamicApp,_core.VxeUI.config=config,_core.VxeUI.setup=setup,(0,_core.setConfig)({alert:{},anchor:{},anchorLink:{},avatar:{},badge:{},breadcrumb:{separator:"/"},breadcrumbItem:{},button:{trigger:"hover",prefixTooltip:{enterable:!0},suffixTooltip:{enterable:!0}},buttonGroup:{},calendar:{minDate:new Date(1900,0,1),maxDate:new Date(2100,0,1),startDay:1,selectDay:1},card:{border:!0,padding:!0},carousel:{height:200,loop:!0,interval:5e3},carouselItem:{},checkbox:{},checkboxButton:{},checkboxGroup:{},col:{},collapse:{padding:!0,expandConfig:{showIcon:!0}},collapsePane:{},countdown:{},colorPicker:{type:"rgb",clearable:!0,showAlpha:!0,clickToCopy:!0,showColorExtractor:!0,showQuick:!0},datePanel:{startDate:new Date(1900,0,1),endDate:new Date(2100,0,1),startDay:1,selectDay:1},datePicker:{shortcutConfig:{align:"left",mode:"text",autoClose:!0},startDay:1,selectDay:1,autoClose:!0,showClearButton:null,showConfirmButton:null},dateRangePicker:{shortcutConfig:{align:"left",mode:"text",autoClose:!0},startDay:1,selectDay:1,separator:" ~ ",autoClose:!0,showClearButton:null,showConfirmButton:null},drawer:{position:"right",showHeader:!0,lockView:!0,mask:!0,showTitleOverflow:!0,showClose:!0,padding:!0,cancelClosable:!0,confirmClosable:!0},empty:{},form:{validConfig:{showMessage:!0,autoPos:!0,theme:"beautify"},tooltipConfig:{enterable:!0},titleAsterisk:!0,titleOverflow:!1,padding:!0},formDesign:{height:400,showHeader:!0,showPc:!0},formGather:{},formGroup:{},formItem:{},formView:{},icon:{},iconPicker:{icons:["home","company","comment","setting","send","envelope","envelope-open","bell","search","print","pc","goods","chart-line","edit","delete","save","folder","microphone","flag","link","location","sunny","rmb","usd","user","add-user","add-users","star","unlock","time","text","feedback","calendar","association-form","cloud-download","cloud-upload","file","subtable","chart-bar-x","chart-bar-y","chart-line","chart-pie","chart-radar"]},image:{showPreview:!0,showPrintButton:!0,maskClosable:!0},imageGroup:{showPreview:!0,showPrintButton:!0},imagePreview:{showPrintButton:!0},input:{startDate:new Date(1900,0,1),endDate:new Date(2100,0,1),startDay:1,selectDay:1,digits:2,controls:!0},layoutAside:{},layoutBody:{},layoutContainer:{},layoutFooter:{},layoutHeader:{},link:{underline:!0},listDesign:{height:400,showPc:!0},listView:{},list:{virtualYConfig:{enabled:!0,gt:100}},loading:{showIcon:!0,showText:!0},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:{destroyOnClose:!0},radio:{strict:!0},radioButton:{strict:!0},radioGroup:{strict:!0},rate:{},result:{},row:{},select:{multiCharOverflow:8,remoteConfig:{enabled:!0,autoLoad:!0},virtualYConfig:{enabled:!0,gt:50,oSize:2}},split:{resize:!0,itemConfig:{minWidth:40,minHeight:40}},splitPane:{},slider:{max:100,min:0},steps:{},switch:{},tabPane:{},tableSelect:{gridConfig:{showOverflow:!0,showHeaderOverflow:!0,showFooterOverflow:!0,rowConfig:{isHover:!0},virtualXConfig:{enabled:!0,gt:0},virtualYConfig:{enabled:!0,gt:0}}},tabs:{},tag:{},textEllipsis:{underline:!0},text:{},textarea:{resize:"none"},tip:{},tooltip:{trigger:"hover",theme:"dark",enterDelay:500,leaveDelay:300,isArrow:!0},tree:{indent:20,minHeight:60,radioConfig:{strict:!0},virtualYConfig:{enabled:!0,gt:50,oSize:2}},treeSelect:{autoClose:!0,virtualYConfig:{enabled:!0,gt:0,oSize:2},treeConfig:{maxHeight:300,radioConfig:{},checkboxConfig:{},filterConfig:{autoExpandAll:!0}}},upload:{mode:"all",imageTypes:["jpg","jpeg","png","gif"],showList:!0,showUploadButton:!0,showButtonText:!0,showRemoveButton:!0,showButtonIcon:!0,showPreview:!0,dragToUpload:!0,showLimitSize:!0,showLimitCount:!0,autoSubmit:!0,maxSimultaneousUploads:5},watermark:{rotate:-30,gap:[100,100]},table:{},colgroup:{},column:{},toolbar:{},grid:{},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_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/dom.js
CHANGED
|
@@ -8,6 +8,7 @@ exports.getAbsolutePos = getAbsolutePos;
|
|
|
8
8
|
exports.getDomNode = getDomNode;
|
|
9
9
|
exports.getEventTargetNode = getEventTargetNode;
|
|
10
10
|
exports.getOffsetPos = getOffsetPos;
|
|
11
|
+
exports.getPaddingLeftRightSize = getPaddingLeftRightSize;
|
|
11
12
|
exports.getPaddingTopBottomSize = getPaddingTopBottomSize;
|
|
12
13
|
exports.getTpImg = getTpImg;
|
|
13
14
|
exports.hasClass = hasClass;
|
|
@@ -157,6 +158,15 @@ function getPaddingTopBottomSize(elem) {
|
|
|
157
158
|
}
|
|
158
159
|
return 0;
|
|
159
160
|
}
|
|
161
|
+
function getPaddingLeftRightSize(elem) {
|
|
162
|
+
if (elem) {
|
|
163
|
+
const computedStyle = getComputedStyle(elem);
|
|
164
|
+
const paddingLeft = _xeUtils.default.toNumber(computedStyle.paddingLeft);
|
|
165
|
+
const paddingRight = _xeUtils.default.toNumber(computedStyle.paddingRight);
|
|
166
|
+
return paddingLeft + paddingRight;
|
|
167
|
+
}
|
|
168
|
+
return 0;
|
|
169
|
+
}
|
|
160
170
|
const scrollIntoViewIfNeeded = 'scrollIntoViewIfNeeded';
|
|
161
171
|
const scrollIntoView = 'scrollIntoView';
|
|
162
172
|
function scrollToView(elem) {
|
package/lib/ui/src/dom.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.addClass=addClass,exports.getAbsolutePos=getAbsolutePos,exports.getDomNode=getDomNode,exports.getEventTargetNode=getEventTargetNode,exports.getOffsetPos=getOffsetPos,exports.getPaddingTopBottomSize=getPaddingTopBottomSize,exports.getTpImg=getTpImg,exports.hasClass=hasClass,exports.hasControlKey=hasControlKey,exports.initTpImg=initTpImg,exports.isNodeElement=isNodeElement,exports.isPx=isPx,exports.isScale=isScale,exports.removeClass=removeClass,exports.scrollToView=scrollToView,exports.toCssUnit=toCssUnit,exports.triggerEvent=triggerEvent,exports.updatePanelPlacement=updatePanelPlacement;var _xeUtils=_interopRequireDefault(require("xe-utils"));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}let tpImgEl;function initTpImg(){return tpImgEl||((tpImgEl=new Image).src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII="),tpImgEl}function getTpImg(){return tpImgEl||initTpImg()}const reClsMap={};function getClsRE(e){return reClsMap[e]||(reClsMap[e]=new RegExp(`(?:^|\\s)${e}(?!\\S)`,"g")),reClsMap[e]}function getNodeOffset(e,t,o){if(e){var s=e.parentNode;if(o.top+=e.offsetTop,o.left+=e.offsetLeft,s&&s!==document.documentElement&&s!==document.body&&(o.top-=s.scrollTop,o.left-=s.scrollLeft),(!t||e!==t&&e.offsetParent!==t)&&e.offsetParent)return getNodeOffset(e.offsetParent,t,o)}return o}function isPx(e){return e&&/^\d+(px)?$/.test(e)}function isScale(e){return e&&/^\d+%$/.test(e)}function hasClass(e,t){return!!(e&&e.className&&e.className.match&&e.className.match(getClsRE(t)))}function removeClass(e,t){e&&hasClass(e,t)&&(e.className=e.className.replace(getClsRE(t),""))}function addClass(e,t){e&&!hasClass(e,t)&&(removeClass(e,t),e.className=e.className+" "+t)}function hasControlKey(e){return e.ctrlKey||e.metaKey}function toCssUnit(e,t="px"){return _xeUtils.default.isNumber(e)||/^\d+$/.test(""+e)?""+e+t:""+(e||"")}function getDomNode(){var e=document.documentElement,t=document.body;return{scrollTop:e.scrollTop||t.scrollTop,scrollLeft:e.scrollLeft||t.scrollLeft,visibleHeight:e.clientHeight||t.clientHeight,visibleWidth:e.clientWidth||t.clientWidth}}function getEventTargetNode(e,t,o,s){let n
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.addClass=addClass,exports.getAbsolutePos=getAbsolutePos,exports.getDomNode=getDomNode,exports.getEventTargetNode=getEventTargetNode,exports.getOffsetPos=getOffsetPos,exports.getPaddingLeftRightSize=getPaddingLeftRightSize,exports.getPaddingTopBottomSize=getPaddingTopBottomSize,exports.getTpImg=getTpImg,exports.hasClass=hasClass,exports.hasControlKey=hasControlKey,exports.initTpImg=initTpImg,exports.isNodeElement=isNodeElement,exports.isPx=isPx,exports.isScale=isScale,exports.removeClass=removeClass,exports.scrollToView=scrollToView,exports.toCssUnit=toCssUnit,exports.triggerEvent=triggerEvent,exports.updatePanelPlacement=updatePanelPlacement;var _xeUtils=_interopRequireDefault(require("xe-utils"));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}let tpImgEl;function initTpImg(){return tpImgEl||((tpImgEl=new Image).src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII="),tpImgEl}function getTpImg(){return tpImgEl||initTpImg()}const reClsMap={};function getClsRE(e){return reClsMap[e]||(reClsMap[e]=new RegExp(`(?:^|\\s)${e}(?!\\S)`,"g")),reClsMap[e]}function getNodeOffset(e,t,o){if(e){var s=e.parentNode;if(o.top+=e.offsetTop,o.left+=e.offsetLeft,s&&s!==document.documentElement&&s!==document.body&&(o.top-=s.scrollTop,o.left-=s.scrollLeft),(!t||e!==t&&e.offsetParent!==t)&&e.offsetParent)return getNodeOffset(e.offsetParent,t,o)}return o}function isPx(e){return e&&/^\d+(px)?$/.test(e)}function isScale(e){return e&&/^\d+%$/.test(e)}function hasClass(e,t){return!!(e&&e.className&&e.className.match&&e.className.match(getClsRE(t)))}function removeClass(e,t){e&&hasClass(e,t)&&(e.className=e.className.replace(getClsRE(t),""))}function addClass(e,t){e&&!hasClass(e,t)&&(removeClass(e,t),e.className=e.className+" "+t)}function hasControlKey(e){return e.ctrlKey||e.metaKey}function toCssUnit(e,t="px"){return _xeUtils.default.isNumber(e)||/^\d+$/.test(""+e)?""+e+t:""+(e||"")}function getDomNode(){var e=document.documentElement,t=document.body;return{scrollTop:e.scrollTop||t.scrollTop,scrollLeft:e.scrollLeft||t.scrollLeft,visibleHeight:e.clientHeight||t.clientHeight,visibleWidth:e.clientWidth||t.clientWidth}}function getEventTargetNode(e,t,o,s){let i,n=e.target.shadowRoot&&e.composed&&e.composedPath()[0]||e.target;for(;n&&n.nodeType&&n!==document;){if(o&&hasClass(n,o)&&(!s||s(n)))i=n;else if(n===t)return{flag:!o||!!i,container:t,targetElem:i};n=n.parentNode}return{flag:!1}}function getOffsetPos(e,t){return getNodeOffset(e,t,{left:0,top:0})}function getAbsolutePos(e){var e=e.getBoundingClientRect(),t=e.top,e=e.left,{scrollTop:o,scrollLeft:s,visibleHeight:i,visibleWidth:n}=getDomNode();return{boundingTop:t,top:o+t,boundingLeft:e,left:s+e,visibleHeight:i,visibleWidth:n}}function getPaddingTopBottomSize(e){return e?(e=getComputedStyle(e),_xeUtils.default.toNumber(e.paddingTop)+_xeUtils.default.toNumber(e.paddingBottom)):0}function getPaddingLeftRightSize(e){return e?(e=getComputedStyle(e),_xeUtils.default.toNumber(e.paddingLeft)+_xeUtils.default.toNumber(e.paddingRight)):0}const scrollIntoViewIfNeeded="scrollIntoViewIfNeeded",scrollIntoView="scrollIntoView";function scrollToView(e){e&&(e[scrollIntoViewIfNeeded]?e[scrollIntoViewIfNeeded]():e[scrollIntoView]&&e[scrollIntoView]())}function triggerEvent(e,t){e&&e.dispatchEvent(new Event(t))}function isNodeElement(e){return e&&1===e.nodeType}function updatePanelPlacement(e,t,o){var{placement:o,teleportTo:s,marginSize:i}=Object.assign({teleportTo:!1,marginSize:32},o);let n="bottom",l="",r="",a="";var d,g,f,u,p,c,m,h="",C={};return t&&e&&(m=document.documentElement,d=document.body,g=e.offsetHeight,f=t.offsetHeight,u=t.offsetWidth,t=t.getBoundingClientRect(),p=e.getBoundingClientRect(),c=m.clientHeight||d.clientHeight,m=m.clientWidth||d.clientWidth,h=e.offsetWidth,s?(a=p.left,l=p.top+g,"top"===o?(n="top",l=p.top-f):o||(l+f+i>c&&(n="top",l=p.top-f),l<i&&(n="bottom",l=p.top+g)),a+u+i>m&&(a-=a+u+i-m),a<i&&(a=i)):("top"===o?(n="top",r=g):o||(l=g,p.top+p.height+i>c&&p.top-g-f>i&&(n="top",l="",r=g)),t.left+t.width+i>m&&(a=-(t.left+t.width+i-m))),_xeUtils.default.isNumber(l)&&(C.top=toCssUnit(l)),_xeUtils.default.isNumber(r)&&(C.bottom=toCssUnit(r)),_xeUtils.default.isNumber(a)&&(C.left=toCssUnit(a)),_xeUtils.default.isNumber("")&&(C.right=toCssUnit("")),_xeUtils.default.isNumber(h))&&(C.minWidth=toCssUnit(h)),{top:l||0,bottom:r||0,left:a||0,right:0,style:C,placement:n}}
|
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.8.
|
|
8
|
+
const version = `ui v${"4.8.13"}`;
|
|
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.8.
|
|
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.8.13",warnLog=exports.warnLog=_core.log.create("warn",version),errLog=exports.errLog=_core.log.create("error",version);
|
package/package.json
CHANGED
package/packages/form/index.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { h, ref, Ref, provide, computed, inject, reactive, watch, nextTick, PropType, onMounted, onUnmounted } from 'vue'
|
|
2
2
|
import { defineVxeComponent } from '../../ui/src/comp'
|
|
3
3
|
import XEUtils from 'xe-utils'
|
|
4
|
-
import { getConfig, validators, renderer, createEvent, useSize } from '../../ui'
|
|
4
|
+
import { getConfig, validators, renderer, createEvent, useSize, globalEvents } from '../../ui'
|
|
5
5
|
import { eqEmptyValue, getFuncText, isEnableConf } from '../../ui/src/utils'
|
|
6
6
|
import { scrollToView } from '../../ui/src/dom'
|
|
7
7
|
import { createItem, handleFieldOrItem, isHiddenItem, isActiveItem } from './util'
|
|
@@ -11,6 +11,8 @@ import VxeLoadingComponent from '../../loading/src/loading'
|
|
|
11
11
|
import { getSlotVNs } from '../../ui/src/vn'
|
|
12
12
|
import { warnLog, errLog } from '../../ui/src/log'
|
|
13
13
|
|
|
14
|
+
import '../render'
|
|
15
|
+
|
|
14
16
|
import type { VxeFormConstructor, VxeFormPropTypes, VxeFormEmits, FormReactData, FormMethods, FormPrivateRef, VxeFormPrivateMethods, VxeFormDefines, VxeFormItemPropTypes, VxeTooltipInstance, FormInternalData, VxeFormPrivateComputed } from '../../../types'
|
|
15
17
|
import type { VxeGridConstructor, VxeGridPrivateMethods } from '../../../types/components/grid'
|
|
16
18
|
|
|
@@ -255,7 +257,8 @@ export default defineVxeComponent({
|
|
|
255
257
|
const reactData = reactive<FormReactData>({
|
|
256
258
|
collapseAll: props.collapseStatus,
|
|
257
259
|
staticItems: [],
|
|
258
|
-
formItems: []
|
|
260
|
+
formItems: [],
|
|
261
|
+
itemWidth: 0
|
|
259
262
|
})
|
|
260
263
|
|
|
261
264
|
const internalData = createInternalData()
|
|
@@ -277,6 +280,25 @@ export default defineVxeComponent({
|
|
|
277
280
|
return Object.assign({}, getConfig().form.collapseConfig, props.collapseConfig)
|
|
278
281
|
})
|
|
279
282
|
|
|
283
|
+
const computeAutoItemWidthList = computed(() => {
|
|
284
|
+
const { titleWidth: allTitleWidth, vertical: allVertical } = props
|
|
285
|
+
const { formItems } = reactData
|
|
286
|
+
const itemList: VxeFormDefines.ItemInfo[] = []
|
|
287
|
+
XEUtils.eachTree(formItems, (item) => {
|
|
288
|
+
const { titleWidth, vertical } = item
|
|
289
|
+
if (titleWidth === 'auto') {
|
|
290
|
+
itemList.push(item)
|
|
291
|
+
} else {
|
|
292
|
+
const itemVertical = XEUtils.eqNull(vertical) ? allVertical : vertical
|
|
293
|
+
const itemTitleWidth = itemVertical ? null : (XEUtils.eqNull(titleWidth) ? allTitleWidth : titleWidth)
|
|
294
|
+
if (itemTitleWidth === 'auto' && (!item.children || !item.children.length)) {
|
|
295
|
+
itemList.push(item)
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
}, { children: 'children' })
|
|
299
|
+
return itemList
|
|
300
|
+
})
|
|
301
|
+
|
|
280
302
|
const refMaps: FormPrivateRef = {
|
|
281
303
|
refElem
|
|
282
304
|
}
|
|
@@ -285,7 +307,8 @@ export default defineVxeComponent({
|
|
|
285
307
|
computeSize,
|
|
286
308
|
computeValidOpts,
|
|
287
309
|
computeTooltipOpts,
|
|
288
|
-
computeCollapseOpts
|
|
310
|
+
computeCollapseOpts,
|
|
311
|
+
computeAutoItemWidthList
|
|
289
312
|
}
|
|
290
313
|
|
|
291
314
|
const $xeForm = {
|
|
@@ -328,7 +351,9 @@ export default defineVxeComponent({
|
|
|
328
351
|
}
|
|
329
352
|
reactData.staticItems = XEUtils.mapTree(list, item => createItem($xeForm, item), { children: 'children' })
|
|
330
353
|
internalData.itemFormatCache = {}
|
|
331
|
-
return nextTick()
|
|
354
|
+
return nextTick().then(() => {
|
|
355
|
+
return recalculate()
|
|
356
|
+
})
|
|
332
357
|
}
|
|
333
358
|
|
|
334
359
|
const getItems = () => {
|
|
@@ -361,6 +386,7 @@ export default defineVxeComponent({
|
|
|
361
386
|
formMethods.dispatchEvent('toggle-collapse', { status, collapse: status, data: props.data }, evnt)
|
|
362
387
|
formMethods.dispatchEvent('collapse', { status, collapse: status, data: props.data }, evnt)
|
|
363
388
|
nextTick(() => {
|
|
389
|
+
recalculate()
|
|
364
390
|
if ($xeGrid) {
|
|
365
391
|
$xeGrid.recalculate()
|
|
366
392
|
}
|
|
@@ -426,7 +452,8 @@ export default defineVxeComponent({
|
|
|
426
452
|
})
|
|
427
453
|
}
|
|
428
454
|
internalData.itemFormatCache = {}
|
|
429
|
-
|
|
455
|
+
clearValidate()
|
|
456
|
+
return recalculate()
|
|
430
457
|
}
|
|
431
458
|
|
|
432
459
|
const resetEvent = (evnt: Event) => {
|
|
@@ -569,7 +596,7 @@ export default defineVxeComponent({
|
|
|
569
596
|
})
|
|
570
597
|
}
|
|
571
598
|
|
|
572
|
-
const beginValidate = (itemList: VxeFormDefines.ItemInfo[], type?: string, callback?: any): Promise<
|
|
599
|
+
const beginValidate = (itemList: VxeFormDefines.ItemInfo[], type?: string, callback?: any): Promise<VxeFormDefines.ValidateErrorMapParams | void> => {
|
|
573
600
|
const { data, rules: formRules } = props
|
|
574
601
|
const validOpts = computeValidOpts.value
|
|
575
602
|
const validRest: any = {}
|
|
@@ -635,7 +662,10 @@ export default defineVxeComponent({
|
|
|
635
662
|
if (readonly) {
|
|
636
663
|
return nextTick()
|
|
637
664
|
}
|
|
638
|
-
return beginValidate(getItems(), '', callback)
|
|
665
|
+
return beginValidate(getItems(), '', callback).then((params) => {
|
|
666
|
+
recalculate()
|
|
667
|
+
return params
|
|
668
|
+
})
|
|
639
669
|
}
|
|
640
670
|
|
|
641
671
|
const validateField = (fieldOrItem: VxeFormItemPropTypes.Field | VxeFormItemPropTypes.Field[] | VxeFormDefines.ItemInfo | VxeFormDefines.ItemInfo[], callback: any) => {
|
|
@@ -651,7 +681,10 @@ export default defineVxeComponent({
|
|
|
651
681
|
fields = [fieldOrItem]
|
|
652
682
|
}
|
|
653
683
|
}
|
|
654
|
-
return beginValidate(fields.map(field => handleFieldOrItem($xeForm, field) as VxeFormDefines.ItemInfo), '', callback)
|
|
684
|
+
return beginValidate(fields.map(field => handleFieldOrItem($xeForm, field) as VxeFormDefines.ItemInfo), '', callback).then((params) => {
|
|
685
|
+
recalculate()
|
|
686
|
+
return params
|
|
687
|
+
})
|
|
655
688
|
}
|
|
656
689
|
|
|
657
690
|
const submitEvent = (evnt: Event) => {
|
|
@@ -661,6 +694,7 @@ export default defineVxeComponent({
|
|
|
661
694
|
clearValidate()
|
|
662
695
|
if (readonly) {
|
|
663
696
|
formMethods.dispatchEvent('submit', { data: props.data }, evnt)
|
|
697
|
+
recalculate()
|
|
664
698
|
return
|
|
665
699
|
}
|
|
666
700
|
beginValidate(getItems()).then((errMap) => {
|
|
@@ -669,6 +703,7 @@ export default defineVxeComponent({
|
|
|
669
703
|
} else {
|
|
670
704
|
formMethods.dispatchEvent('submit', { data: props.data }, evnt)
|
|
671
705
|
}
|
|
706
|
+
recalculate()
|
|
672
707
|
})
|
|
673
708
|
}
|
|
674
709
|
}
|
|
@@ -758,6 +793,27 @@ export default defineVxeComponent({
|
|
|
758
793
|
return triggerItemEvent(new Event('change'), field, itemValue)
|
|
759
794
|
}
|
|
760
795
|
|
|
796
|
+
const recalculate = () => {
|
|
797
|
+
const autoItemWidthList = computeAutoItemWidthList.value
|
|
798
|
+
const el = refElem.value
|
|
799
|
+
if (el && autoItemWidthList.length) {
|
|
800
|
+
const itemElList = el.querySelectorAll<HTMLElement>(autoItemWidthList.map(item => `.vxe-form--item-title[itemid="${item.id}"]`).join(','))
|
|
801
|
+
let maxItemWidth = 0
|
|
802
|
+
XEUtils.arrayEach(itemElList, itemEl => {
|
|
803
|
+
itemEl.style.width = ''
|
|
804
|
+
maxItemWidth = Math.max(maxItemWidth, Math.ceil(itemEl.clientWidth + 2))
|
|
805
|
+
})
|
|
806
|
+
XEUtils.arrayEach(itemElList, itemEl => {
|
|
807
|
+
itemEl.style.width = `${maxItemWidth}px`
|
|
808
|
+
})
|
|
809
|
+
}
|
|
810
|
+
return nextTick()
|
|
811
|
+
}
|
|
812
|
+
|
|
813
|
+
const handleGlobalResizeEvent = () => {
|
|
814
|
+
recalculate()
|
|
815
|
+
}
|
|
816
|
+
|
|
761
817
|
formMethods = {
|
|
762
818
|
dispatchEvent (type, params, evnt) {
|
|
763
819
|
emit(type, createEvent(evnt, { $form: $xeForm, $grid: $xeGrid }, params))
|
|
@@ -770,7 +826,8 @@ export default defineVxeComponent({
|
|
|
770
826
|
toggleCollapse,
|
|
771
827
|
getItems,
|
|
772
828
|
getItemByField,
|
|
773
|
-
closeTooltip
|
|
829
|
+
closeTooltip,
|
|
830
|
+
recalculate
|
|
774
831
|
}
|
|
775
832
|
|
|
776
833
|
const formPrivateMethods: VxeFormPrivateMethods = {
|
|
@@ -786,7 +843,6 @@ export default defineVxeComponent({
|
|
|
786
843
|
const renderVN = () => {
|
|
787
844
|
const { loading, border, className, data, customLayout } = props
|
|
788
845
|
const { formItems } = reactData
|
|
789
|
-
// const formItems: any[] = []
|
|
790
846
|
const vSize = computeSize.value
|
|
791
847
|
const tooltipOpts = computeTooltipOpts.value
|
|
792
848
|
const defaultSlot = slots.default
|
|
@@ -841,6 +897,9 @@ export default defineVxeComponent({
|
|
|
841
897
|
})
|
|
842
898
|
watch(staticItemFlag, () => {
|
|
843
899
|
reactData.formItems = reactData.staticItems
|
|
900
|
+
nextTick().then(() => {
|
|
901
|
+
recalculate()
|
|
902
|
+
})
|
|
844
903
|
})
|
|
845
904
|
|
|
846
905
|
const itemFlag = ref(0)
|
|
@@ -872,9 +931,11 @@ export default defineVxeComponent({
|
|
|
872
931
|
errLog('vxe.error.errConflicts', ['custom-layout', 'items'])
|
|
873
932
|
}
|
|
874
933
|
})
|
|
934
|
+
globalEvents.on($xeForm, 'resize', handleGlobalResizeEvent)
|
|
875
935
|
})
|
|
876
936
|
|
|
877
937
|
onUnmounted(() => {
|
|
938
|
+
globalEvents.off($xeForm, 'resize')
|
|
878
939
|
XEUtils.assign(internalData, createInternalData())
|
|
879
940
|
})
|
|
880
941
|
|
|
@@ -8,7 +8,7 @@ import VxeTooltipComponent from '../../tooltip/src/tooltip'
|
|
|
8
8
|
import VxeIconComponent from '../../icon/src/icon'
|
|
9
9
|
import XEUtils from 'xe-utils'
|
|
10
10
|
|
|
11
|
-
import type { VxeFormConstructor, VxeFormDefines, VxeFormItemPropTypes, VxeFormPrivateMethods, VxeComponentSlotType } from '../../../types'
|
|
11
|
+
import type { VxeFormConstructor, VxeFormDefines, VxeFormItemPropTypes, VxeFormPrivateMethods, VxeComponentSlotType, VxeComponentStyleType } from '../../../types'
|
|
12
12
|
|
|
13
13
|
function renderPrefixIcon (titlePrefix: VxeFormItemPropTypes.TitlePrefix) {
|
|
14
14
|
return h('span', {
|
|
@@ -193,6 +193,14 @@ export function renderTitle ($xeForm: VxeFormConstructor & VxeFormPrivateMethods
|
|
|
193
193
|
onMouseleave: $xeForm.handleTitleTipLeaveEvent
|
|
194
194
|
}
|
|
195
195
|
: {}
|
|
196
|
+
const itStyle: VxeComponentStyleType = Object.assign(
|
|
197
|
+
{},
|
|
198
|
+
XEUtils.isFunction(itemTitleStyle) ? itemTitleStyle(params) : itemTitleStyle,
|
|
199
|
+
XEUtils.isFunction(titleStyle) ? titleStyle(params) : titleStyle
|
|
200
|
+
)
|
|
201
|
+
if (titleWidth && titleWidth !== 'auto' && showContent !== false) {
|
|
202
|
+
itStyle.width = toCssUnit(titleWidth)
|
|
203
|
+
}
|
|
196
204
|
|
|
197
205
|
return isTitle
|
|
198
206
|
? h('div', {
|
|
@@ -204,16 +212,8 @@ export function renderTitle ($xeForm: VxeFormConstructor & VxeFormPrivateMethods
|
|
|
204
212
|
itemTitleClassName ? (XEUtils.isFunction(itemTitleClassName) ? itemTitleClassName(params) : itemTitleClassName) : '',
|
|
205
213
|
titleClassName ? (XEUtils.isFunction(titleClassName) ? titleClassName(params) : titleClassName) : ''
|
|
206
214
|
],
|
|
207
|
-
style:
|
|
208
|
-
|
|
209
|
-
XEUtils.isFunction(itemTitleStyle) ? itemTitleStyle(params) : itemTitleStyle,
|
|
210
|
-
XEUtils.isFunction(titleStyle) ? titleStyle(params) : titleStyle,
|
|
211
|
-
titleWidth && showContent !== false
|
|
212
|
-
? {
|
|
213
|
-
width: toCssUnit(titleWidth)
|
|
214
|
-
}
|
|
215
|
-
: null
|
|
216
|
-
),
|
|
215
|
+
style: itStyle,
|
|
216
|
+
itemid: item.id,
|
|
217
217
|
title: ovTitle ? getFuncText(title) : null,
|
|
218
218
|
...ons
|
|
219
219
|
}, [
|
package/packages/ui/src/dom.ts
CHANGED
|
@@ -131,6 +131,16 @@ export function getPaddingTopBottomSize (elem: HTMLElement) {
|
|
|
131
131
|
return 0
|
|
132
132
|
}
|
|
133
133
|
|
|
134
|
+
export function getPaddingLeftRightSize (elem: HTMLElement) {
|
|
135
|
+
if (elem) {
|
|
136
|
+
const computedStyle = getComputedStyle(elem)
|
|
137
|
+
const paddingLeft = XEUtils.toNumber(computedStyle.paddingLeft)
|
|
138
|
+
const paddingRight = XEUtils.toNumber(computedStyle.paddingRight)
|
|
139
|
+
return paddingLeft + paddingRight
|
|
140
|
+
}
|
|
141
|
+
return 0
|
|
142
|
+
}
|
|
143
|
+
|
|
134
144
|
const scrollIntoViewIfNeeded = 'scrollIntoViewIfNeeded'
|
|
135
145
|
const scrollIntoView = 'scrollIntoView'
|
|
136
146
|
|
|
@@ -112,6 +112,9 @@ export interface VxeFormProps<D = any> {
|
|
|
112
112
|
titleBackground?: VxeFormPropTypes.TitleBackground
|
|
113
113
|
titleBold?: VxeFormPropTypes.TitleBold
|
|
114
114
|
titleAlign?: VxeFormPropTypes.TitleAlign
|
|
115
|
+
/**
|
|
116
|
+
* 所有标题默认宽度,支持 px,auto
|
|
117
|
+
*/
|
|
115
118
|
titleWidth?: VxeFormPropTypes.TitleWidth
|
|
116
119
|
titleColon?: VxeFormPropTypes.TitleColon
|
|
117
120
|
titleAsterisk?: VxeFormPropTypes.TitleAsterisk
|
|
@@ -140,6 +143,7 @@ export interface FormPrivateComputed {
|
|
|
140
143
|
computeValidOpts: ComputedRef<VxeFormPropTypes.ValidConfig>
|
|
141
144
|
computeTooltipOpts: ComputedRef<VxeFormPropTypes.TooltipConfig>
|
|
142
145
|
computeCollapseOpts: ComputedRef<VxeFormPropTypes.CollapseConfig>
|
|
146
|
+
computeAutoItemWidthList: ComputedRef<VxeFormDefines.ItemInfo[]>
|
|
143
147
|
}
|
|
144
148
|
export interface VxeFormPrivateComputed extends FormPrivateComputed { }
|
|
145
149
|
|
|
@@ -147,6 +151,7 @@ export interface FormReactData {
|
|
|
147
151
|
collapseAll: boolean
|
|
148
152
|
staticItems: any[]
|
|
149
153
|
formItems: VxeFormDefines.ItemInfo[]
|
|
154
|
+
itemWidth: number
|
|
150
155
|
}
|
|
151
156
|
|
|
152
157
|
export interface FormInternalData {
|
|
@@ -175,13 +180,13 @@ export interface FormMethods<D = any> {
|
|
|
175
180
|
* 对表单进行校验,参数为一个回调函数。该回调函数会在校验结束后被调用 callback(errMap)。若不传入回调函数,则会返回一个 promise
|
|
176
181
|
* @param callback 回调函数
|
|
177
182
|
*/
|
|
178
|
-
validate(callback?: (errMap?: VxeFormDefines.ValidateErrorMapParams) => void): Promise<VxeFormDefines.ValidateErrorMapParams>
|
|
183
|
+
validate(callback?: (errMap?: VxeFormDefines.ValidateErrorMapParams) => void): Promise<VxeFormDefines.ValidateErrorMapParams | void>
|
|
179
184
|
/**
|
|
180
185
|
* 对表单指定项进行校验,参数为一个回调函数。该回调函数会在校验结束后被调用 callback(errMap)。若不传入回调函数,则会返回一个 promise
|
|
181
186
|
* @param field 字段名
|
|
182
187
|
* @param callback 回调函数
|
|
183
188
|
*/
|
|
184
|
-
validateField(field: VxeFormItemPropTypes.Field | VxeFormItemPropTypes.Field[] | VxeFormDefines.ItemInfo | VxeFormDefines.ItemInfo[] | null, callback?: (errMap?: VxeFormDefines.ValidateErrorMapParams) => void): Promise<VxeFormDefines.ValidateErrorMapParams>
|
|
189
|
+
validateField(field: VxeFormItemPropTypes.Field | VxeFormItemPropTypes.Field[] | VxeFormDefines.ItemInfo | VxeFormDefines.ItemInfo[] | null, callback?: (errMap?: VxeFormDefines.ValidateErrorMapParams) => void): Promise<VxeFormDefines.ValidateErrorMapParams | void>
|
|
185
190
|
/**
|
|
186
191
|
* 手动清除校验状态,如果指定 field 则清除指定的项,否则清除整个表单
|
|
187
192
|
* @param field 字段名
|
|
@@ -216,6 +221,10 @@ export interface FormMethods<D = any> {
|
|
|
216
221
|
* 手动切换折叠状态
|
|
217
222
|
*/
|
|
218
223
|
toggleCollapse(): Promise<any>
|
|
224
|
+
/**
|
|
225
|
+
* 重新计算表单
|
|
226
|
+
*/
|
|
227
|
+
recalculate(): Promise<void>
|
|
219
228
|
}
|
|
220
229
|
export interface VxeFormMethods<D = any> extends FormMethods<D> { }
|
|
221
230
|
|