vxe-pc-ui 4.17.7 → 4.17.8
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/dist/all.esm.js +205 -222
- package/dist/style.css +1 -1
- package/dist/style.min.css +1 -1
- package/es/button-group/style.css +1 -1
- package/es/button-group/style.min.css +1 -1
- package/es/icon/style.css +1 -1
- package/es/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/tooltip/src/tooltip.js +80 -134
- package/es/tree/src/tree.js +2 -2
- package/es/ui/index.js +4 -4
- package/es/ui/src/dom.js +118 -81
- package/es/ui/src/log.js +1 -1
- package/es/vxe-button-group/style.css +1 -1
- package/es/vxe-button-group/style.min.css +1 -1
- package/lib/button-group/style/style.css +1 -1
- package/lib/button-group/style/style.min.css +1 -1
- package/lib/icon/style/style.css +1 -1
- package/lib/icon/style/style.min.css +1 -1
- package/lib/index.umd.js +210 -225
- package/lib/index.umd.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/tooltip/src/tooltip.js +91 -140
- package/lib/tooltip/src/tooltip.min.js +1 -1
- package/lib/tree/src/tree.js +2 -1
- package/lib/tree/src/tree.min.js +1 -1
- package/lib/ui/index.js +4 -4
- package/lib/ui/index.min.js +1 -1
- package/lib/ui/src/dom.js +113 -79
- 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/lib/vxe-button-group/style/style.css +1 -1
- package/lib/vxe-button-group/style/style.min.css +1 -1
- package/package.json +3 -2
- package/packages/tooltip/src/tooltip.ts +83 -134
- package/packages/tree/src/tree.ts +2 -2
- package/packages/ui/index.ts +3 -3
- package/packages/ui/src/dom.ts +128 -83
- package/styles/components/button-group.scss +4 -2
- package/types/components/table.d.ts +6 -0
- package/types/components/tooltip.d.ts +4 -0
- /package/es/icon/{iconfont.1787197092496.ttf → iconfont.1787216141017.ttf} +0 -0
- /package/es/icon/{iconfont.1787197092496.woff → iconfont.1787216141017.woff} +0 -0
- /package/es/icon/{iconfont.1787197092496.woff2 → iconfont.1787216141017.woff2} +0 -0
- /package/es/{iconfont.1787197092496.ttf → iconfont.1787216141017.ttf} +0 -0
- /package/es/{iconfont.1787197092496.woff → iconfont.1787216141017.woff} +0 -0
- /package/es/{iconfont.1787197092496.woff2 → iconfont.1787216141017.woff2} +0 -0
- /package/lib/icon/style/{iconfont.1787197092496.ttf → iconfont.1787216141017.ttf} +0 -0
- /package/lib/icon/style/{iconfont.1787197092496.woff → iconfont.1787216141017.woff} +0 -0
- /package/lib/icon/style/{iconfont.1787197092496.woff2 → iconfont.1787216141017.woff2} +0 -0
- /package/lib/{iconfont.1787197092496.ttf → iconfont.1787216141017.ttf} +0 -0
- /package/lib/{iconfont.1787197092496.woff → iconfont.1787216141017.woff} +0 -0
- /package/lib/{iconfont.1787197092496.woff2 → iconfont.1787216141017.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.17.
|
|
29
|
+
const version = exports.version = "4.17.8";
|
|
30
30
|
_core.VxeUI.uiVersion = version;
|
|
31
31
|
_core.VxeUI.dynamicApp = _dynamics.dynamicApp;
|
|
32
32
|
function config(options) {
|
|
@@ -443,7 +443,8 @@ _core.VxeUI.setup = setup;
|
|
|
443
443
|
theme: 'dark',
|
|
444
444
|
enterDelay: 500,
|
|
445
445
|
leaveDelay: 300,
|
|
446
|
-
isArrow: true
|
|
446
|
+
isArrow: true,
|
|
447
|
+
defaultPlacement: 'top'
|
|
447
448
|
},
|
|
448
449
|
transfer: {},
|
|
449
450
|
tree: {
|
|
@@ -457,8 +458,7 @@ _core.VxeUI.setup = setup;
|
|
|
457
458
|
tooltipConfig: {
|
|
458
459
|
mode: 'tooltip',
|
|
459
460
|
enterable: true,
|
|
460
|
-
leaveDelay: 300
|
|
461
|
-
defaultPlacement: 'top'
|
|
461
|
+
leaveDelay: 300
|
|
462
462
|
},
|
|
463
463
|
dragConfig: {
|
|
464
464
|
showIcon: true,
|
package/lib/ui/index.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,"__esModule",{value:!0});var _exportNames={version:!0,config:!0,setup:!0},_core=(exports.config=config,exports.default=void 0,exports.setup=setup,exports.version=void 0,require("@vxe-ui/core")),_dynamics=(Object.keys(_core).forEach(function(e){"default"===e||"__esModule"===e||Object.prototype.hasOwnProperty.call(_exportNames,e)||e in exports&&exports[e]===_core[e]||Object.defineProperty(exports,e,{enumerable:!0,get:function(){return _core[e]}})}),require("../dynamics")),_log=require("./src/log");let version=exports.version="4.17.7";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:{showFullLabel:!0,treeConfig:{showIcon:!0},filterConfig:{autoExpandMode:"first"}},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:{startDate:new Date(1900,0,1),endDate:new Date(2100,0,1),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"],popupConfig:{}},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:{rowConfig:{contentField:"label"},dragConfig:{showIcon:!0,animation:!0,showGuidesStatus:!0,showDragTip:!0},virtualYConfig:{enabled:!0,gt:100}},loading:{showIcon:!0,showText:!0},menu:{},modal:{top:16,showHeader:!0,minWidth:340,minHeight:140,lockView:!0,mask:!0,duration:3e3,marginSize:0,dblclickZoom:!0,showTitleOverflow:!0,animat:!0,showClose:!0,padding:!0,draggable:!0,showConfirmButton:null,cancelClosable:!0,confirmClosable:!0,zoomConfig:{minimizeMaxSize:10,minimizeVerticalOffset:{top:-24,left:0},minimizeHorizontalOffset:{top:0,left:32}},storageKey:"VXE_MODAL_POSITION"},noticeBar:{},numberInput:{digits:2,autoFill:!0,controlConfig:{enabled:!0,layout:"right",showButton:!0,isWheel:!0,isArrow:!0}},optgroup:{},option:{},pager:{pageSizePlacement:"top"},print:{pageStyle:{}},passwordInput:{controls:!0},printPageBreak:{},pulldown:{},radio:{strict:!0},radioButton:{strict:!0},radioGroup:{strict:!0},rate:{},result:{},row:{},segmented:{},select:{emptyValue:null,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},actionConfig:{autoHideButton:!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}}},tableTransfer:{},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},transfer:{},tree:{indent:20,minHeight:60,showOverflow:!0,radioConfig:{strict:!0},tooltipConfig:{mode:"tooltip",enterable:!0,leaveDelay:300,defaultPlacement:"top"},dragConfig:{showIcon:!0,animation:!0,showGuidesStatus:!0,showDragTip:!0},virtualYConfig:{enabled:!0,gt:50,oSize:2}},treeSelect:{virtualYConfig:{enabled:!0,gt:0,oSize:2},treeConfig:{maxHeight:300,radioConfig:{},checkboxConfig:{},filterConfig:{autoExpandAll:!0}}},upload:{mode:"all",imageTypes:["jpg","jpeg","png","gif"],showList:!0,showUploadButton:!0,showButtonText:!0,showRemoveButton:!0,showButtonIcon:!0,showPreview:!0,dragToUpload:!0,showLimitSize:!0,showLimitCount:!0,autoSubmit:!0,maxSimultaneousUploads:5,previewImageConfig:{}},watermark:{rotate:-30,gap:[100,100]},table:{},colgroup:{},column:{},toolbar:{},grid:{},gantt:{}});let iconPrefix="vxe-icon-";(0,_core.setIcon)({LOADING:iconPrefix+"spinner roll vxe-loading--default-icon",BUTTON_DROPDOWN:iconPrefix+"arrow-down",BUTTON_LOADING:iconPrefix+"spinner roll",BUTTON_TOOLTIP_ICON:iconPrefix+"question-circle-fill",MENU_ITEM_EXPAND_OPEN:iconPrefix+"arrow-right rotate90",MENU_ITEM_EXPAND_CLOSE:iconPrefix+"arrow-right",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",CASCADER_NODE_OPEN:iconPrefix+"arrow-right",CASCADER_NODE_CLOSE:iconPrefix+"arrow-right",CASCADER_NODE_LOADED:iconPrefix+"spinner roll",LIST_DRAG:iconPrefix+"drag-handle",LIST_DRAG_STATUS_NODE:iconPrefix+"sort",LIST_DRAG_DISABLED:iconPrefix+"no-drop"});var _default=exports.default=_core.VxeUI;
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:!0});var _exportNames={version:!0,config:!0,setup:!0},_core=(exports.config=config,exports.default=void 0,exports.setup=setup,exports.version=void 0,require("@vxe-ui/core")),_dynamics=(Object.keys(_core).forEach(function(e){"default"===e||"__esModule"===e||Object.prototype.hasOwnProperty.call(_exportNames,e)||e in exports&&exports[e]===_core[e]||Object.defineProperty(exports,e,{enumerable:!0,get:function(){return _core[e]}})}),require("../dynamics")),_log=require("./src/log");let version=exports.version="4.17.8";function config(e){return(0,_log.warnLog)("vxe.error.delFunc",["config","setConfig"]),(0,_core.setConfig)(e)}function setup(e){return(0,_log.warnLog)("vxe.error.delFunc",["setup","setConfig"]),(0,_core.setConfig)(e)}_core.VxeUI.uiVersion=version,_core.VxeUI.dynamicApp=_dynamics.dynamicApp,_core.VxeUI.config=config,_core.VxeUI.setup=setup,(0,_core.setConfig)({alert:{},anchor:{},anchorLink:{},avatar:{},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:{showFullLabel:!0,treeConfig:{showIcon:!0},filterConfig:{autoExpandMode:"first"}},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:{startDate:new Date(1900,0,1),endDate:new Date(2100,0,1),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"],popupConfig:{}},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:{rowConfig:{contentField:"label"},dragConfig:{showIcon:!0,animation:!0,showGuidesStatus:!0,showDragTip:!0},virtualYConfig:{enabled:!0,gt:100}},loading:{showIcon:!0,showText:!0},menu:{},modal:{top:16,showHeader:!0,minWidth:340,minHeight:140,lockView:!0,mask:!0,duration:3e3,marginSize:0,dblclickZoom:!0,showTitleOverflow:!0,animat:!0,showClose:!0,padding:!0,draggable:!0,showConfirmButton:null,cancelClosable:!0,confirmClosable:!0,zoomConfig:{minimizeMaxSize:10,minimizeVerticalOffset:{top:-24,left:0},minimizeHorizontalOffset:{top:0,left:32}},storageKey:"VXE_MODAL_POSITION"},noticeBar:{},numberInput:{digits:2,autoFill:!0,controlConfig:{enabled:!0,layout:"right",showButton:!0,isWheel:!0,isArrow:!0}},optgroup:{},option:{},pager:{pageSizePlacement:"top"},print:{pageStyle:{}},passwordInput:{controls:!0},printPageBreak:{},pulldown:{},radio:{strict:!0},radioButton:{strict:!0},radioGroup:{strict:!0},rate:{},result:{},row:{},segmented:{},select:{emptyValue:null,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},actionConfig:{autoHideButton:!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}}},tableTransfer:{},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,defaultPlacement:"top"},transfer:{},tree:{indent:20,minHeight:60,showOverflow:!0,radioConfig:{strict:!0},tooltipConfig:{mode:"tooltip",enterable:!0,leaveDelay:300},dragConfig:{showIcon:!0,animation:!0,showGuidesStatus:!0,showDragTip:!0},virtualYConfig:{enabled:!0,gt:50,oSize:2}},treeSelect:{virtualYConfig:{enabled:!0,gt:0,oSize:2},treeConfig:{maxHeight:300,radioConfig:{},checkboxConfig:{},filterConfig:{autoExpandAll:!0}}},upload:{mode:"all",imageTypes:["jpg","jpeg","png","gif"],showList:!0,showUploadButton:!0,showButtonText:!0,showRemoveButton:!0,showButtonIcon:!0,showPreview:!0,dragToUpload:!0,showLimitSize:!0,showLimitCount:!0,autoSubmit:!0,maxSimultaneousUploads:5,previewImageConfig:{}},watermark:{rotate:-30,gap:[100,100]},table:{},colgroup:{},column:{},toolbar:{},grid:{},gantt:{}});let iconPrefix="vxe-icon-";(0,_core.setIcon)({LOADING:iconPrefix+"spinner roll vxe-loading--default-icon",BUTTON_DROPDOWN:iconPrefix+"arrow-down",BUTTON_LOADING:iconPrefix+"spinner roll",BUTTON_TOOLTIP_ICON:iconPrefix+"question-circle-fill",MENU_ITEM_EXPAND_OPEN:iconPrefix+"arrow-right rotate90",MENU_ITEM_EXPAND_CLOSE:iconPrefix+"arrow-right",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",CASCADER_NODE_OPEN:iconPrefix+"arrow-right",CASCADER_NODE_CLOSE:iconPrefix+"arrow-right",CASCADER_NODE_LOADED:iconPrefix+"spinner roll",LIST_DRAG:iconPrefix+"drag-handle",LIST_DRAG_STATUS_NODE:iconPrefix+"sort",LIST_DRAG_DISABLED:iconPrefix+"no-drop"});var _default=exports.default=_core.VxeUI;
|
package/lib/ui/src/dom.js
CHANGED
|
@@ -10,6 +10,7 @@ exports.getEventTargetNode = getEventTargetNode;
|
|
|
10
10
|
exports.getOffsetPos = getOffsetPos;
|
|
11
11
|
exports.getPaddingLeftRightSize = getPaddingLeftRightSize;
|
|
12
12
|
exports.getPaddingTopBottomSize = getPaddingTopBottomSize;
|
|
13
|
+
exports.getPopupAppendElement = getPopupAppendElement;
|
|
13
14
|
exports.getPopupContainer = getPopupContainer;
|
|
14
15
|
exports.getTpImg = getTpImg;
|
|
15
16
|
exports.hasClass = hasClass;
|
|
@@ -193,8 +194,13 @@ function triggerEvent(targetElem, type) {
|
|
|
193
194
|
function isNodeElement(elem) {
|
|
194
195
|
return elem && elem.nodeType === 1;
|
|
195
196
|
}
|
|
197
|
+
/**
|
|
198
|
+
* 通用定位计算
|
|
199
|
+
*/
|
|
196
200
|
function updatePanelPlacement(targetElem, panelElem, options) {
|
|
197
201
|
const {
|
|
202
|
+
defaultTop,
|
|
203
|
+
defaultLeft,
|
|
198
204
|
placement,
|
|
199
205
|
defaultPlacement,
|
|
200
206
|
teleportTo,
|
|
@@ -208,108 +214,136 @@ function updatePanelPlacement(targetElem, panelElem, options) {
|
|
|
208
214
|
let panelPlacement = 'bottom';
|
|
209
215
|
let top = '';
|
|
210
216
|
let bottom = '';
|
|
211
|
-
let left =
|
|
212
|
-
const right = '';
|
|
217
|
+
let left = 0;
|
|
213
218
|
let minWidth = '';
|
|
219
|
+
let arrowLeft = '';
|
|
214
220
|
const stys = {};
|
|
215
221
|
if (panelElem && targetElem) {
|
|
216
|
-
const
|
|
217
|
-
const
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
222
|
+
const parentEl = panelElem.parentElement;
|
|
223
|
+
const parentWrapperEl = parentEl === document.body ? document.documentElement : parentEl;
|
|
224
|
+
if (parentWrapperEl) {
|
|
225
|
+
const targetWidth = targetElem.offsetWidth;
|
|
226
|
+
const targetHeight = targetElem.offsetHeight;
|
|
227
|
+
const panelHeight = panelElem.offsetHeight;
|
|
228
|
+
const panelWidth = panelElem.offsetWidth;
|
|
229
|
+
const parentWrapperRect = parentWrapperEl.getBoundingClientRect();
|
|
230
|
+
const panelRect = panelElem.getBoundingClientRect();
|
|
231
|
+
const targetRect = targetElem.getBoundingClientRect();
|
|
232
|
+
const visibleHeight = parentWrapperEl.clientHeight;
|
|
233
|
+
const visibleWidth = parentWrapperEl.clientWidth;
|
|
234
|
+
const offsetLeft = parentWrapperRect.left;
|
|
235
|
+
const offsetTop = parentWrapperRect.top;
|
|
236
|
+
const targetLeft = targetRect.left;
|
|
237
|
+
const targetTop = targetRect.top;
|
|
238
|
+
minWidth = targetElem.offsetWidth;
|
|
239
|
+
if (teleportTo) {
|
|
240
|
+
left = defaultLeft || targetLeft;
|
|
241
|
+
top = defaultTop || targetTop + targetHeight;
|
|
242
|
+
if (placement === 'top') {
|
|
234
243
|
panelPlacement = 'top';
|
|
235
|
-
top =
|
|
236
|
-
|
|
237
|
-
if (
|
|
238
|
-
panelPlacement = 'bottom';
|
|
239
|
-
top = targetRect.top + targetHeight;
|
|
240
|
-
}
|
|
241
|
-
// 如果下面不够放,则向上(优先)
|
|
242
|
-
if (top + panelHeight + marginSize > visibleHeight) {
|
|
244
|
+
top = targetTop - panelHeight;
|
|
245
|
+
} else if (!placement) {
|
|
246
|
+
if (defaultPlacement === 'top') {
|
|
243
247
|
panelPlacement = 'top';
|
|
244
|
-
top =
|
|
248
|
+
top = targetTop - panelHeight;
|
|
249
|
+
// 如果上面不够放,则向下
|
|
250
|
+
if (top < marginSize) {
|
|
251
|
+
panelPlacement = 'bottom';
|
|
252
|
+
top = targetTop + targetHeight;
|
|
253
|
+
}
|
|
254
|
+
// 如果下面不够放,则向上(优先)
|
|
255
|
+
if (top + panelHeight + marginSize > visibleHeight) {
|
|
256
|
+
panelPlacement = 'top';
|
|
257
|
+
top = targetTop - panelHeight;
|
|
258
|
+
}
|
|
259
|
+
} else {
|
|
260
|
+
// 如果下面不够放,则向上
|
|
261
|
+
if (top + panelHeight + marginSize > visibleHeight) {
|
|
262
|
+
panelPlacement = 'top';
|
|
263
|
+
top = targetTop - panelHeight;
|
|
264
|
+
}
|
|
265
|
+
// 如果上面不够放,则向下(优先)
|
|
266
|
+
if (top < marginSize) {
|
|
267
|
+
panelPlacement = 'bottom';
|
|
268
|
+
top = targetTop + targetHeight;
|
|
269
|
+
}
|
|
245
270
|
}
|
|
246
|
-
}
|
|
271
|
+
}
|
|
272
|
+
// 如果溢出右边
|
|
273
|
+
if (left + panelWidth + marginSize > visibleWidth) {
|
|
274
|
+
left -= left + panelWidth + marginSize - visibleWidth;
|
|
275
|
+
}
|
|
276
|
+
// 如果溢出左边
|
|
277
|
+
if (left < marginSize) {
|
|
278
|
+
left = marginSize;
|
|
279
|
+
}
|
|
280
|
+
// 偏移
|
|
281
|
+
top -= offsetTop;
|
|
282
|
+
left -= offsetLeft;
|
|
283
|
+
} else {
|
|
284
|
+
if (placement === 'top') {
|
|
285
|
+
panelPlacement = 'top';
|
|
286
|
+
bottom = targetHeight;
|
|
287
|
+
} else if (!placement) {
|
|
247
288
|
// 如果下面不够放,则向上
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
289
|
+
top = targetHeight;
|
|
290
|
+
if (targetTop + targetHeight + panelHeight + marginSize > visibleHeight) {
|
|
291
|
+
// 如果上面不够放,则向下(优先)
|
|
292
|
+
if (targetTop - targetHeight - panelHeight > marginSize) {
|
|
293
|
+
panelPlacement = 'top';
|
|
294
|
+
top = '';
|
|
295
|
+
bottom = targetHeight;
|
|
296
|
+
}
|
|
256
297
|
}
|
|
257
298
|
}
|
|
299
|
+
// 是否超出右侧
|
|
300
|
+
if (panelRect.left + panelRect.width + marginSize > visibleWidth) {
|
|
301
|
+
left = -(panelRect.left + panelRect.width + marginSize - visibleWidth);
|
|
302
|
+
}
|
|
258
303
|
}
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
left -= left + panelWidth + marginSize - visibleWidth;
|
|
304
|
+
if (_xeUtils.default.isNumber(top)) {
|
|
305
|
+
stys.top = toCssUnit(top);
|
|
262
306
|
}
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
left = marginSize;
|
|
307
|
+
if (_xeUtils.default.isNumber(bottom)) {
|
|
308
|
+
stys.bottom = toCssUnit(bottom);
|
|
266
309
|
}
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
panelPlacement = 'top';
|
|
270
|
-
bottom = targetHeight;
|
|
271
|
-
} else if (!placement) {
|
|
272
|
-
// 如果下面不够放,则向上
|
|
273
|
-
top = targetHeight;
|
|
274
|
-
if (targetRect.top + targetHeight + panelHeight + marginSize > visibleHeight) {
|
|
275
|
-
// 如果上面不够放,则向下(优先)
|
|
276
|
-
if (targetRect.top - targetHeight - panelHeight > marginSize) {
|
|
277
|
-
panelPlacement = 'top';
|
|
278
|
-
top = '';
|
|
279
|
-
bottom = targetHeight;
|
|
280
|
-
}
|
|
281
|
-
}
|
|
310
|
+
if (_xeUtils.default.isNumber(left)) {
|
|
311
|
+
stys.left = toCssUnit(left);
|
|
282
312
|
}
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
313
|
+
if (isMinWidth && _xeUtils.default.isNumber(minWidth)) {
|
|
314
|
+
stys.minWidth = toCssUnit(minWidth);
|
|
315
|
+
}
|
|
316
|
+
// 箭头
|
|
317
|
+
if (left === targetLeft) {
|
|
318
|
+
if (targetWidth <= panelWidth) {
|
|
319
|
+
arrowLeft = targetWidth / 2;
|
|
320
|
+
}
|
|
321
|
+
} else if (left < targetLeft) {
|
|
322
|
+
if (left + panelWidth > targetLeft + targetWidth) {
|
|
323
|
+
arrowLeft = targetLeft - left + targetWidth / 2;
|
|
324
|
+
} else {
|
|
325
|
+
arrowLeft = targetLeft - left + (panelWidth - (targetLeft - left)) / 2;
|
|
326
|
+
}
|
|
286
327
|
}
|
|
287
|
-
}
|
|
288
|
-
if (_xeUtils.default.isNumber(top)) {
|
|
289
|
-
stys.top = toCssUnit(top);
|
|
290
|
-
}
|
|
291
|
-
if (_xeUtils.default.isNumber(bottom)) {
|
|
292
|
-
stys.bottom = toCssUnit(bottom);
|
|
293
|
-
}
|
|
294
|
-
if (_xeUtils.default.isNumber(left)) {
|
|
295
|
-
stys.left = toCssUnit(left);
|
|
296
|
-
}
|
|
297
|
-
if (_xeUtils.default.isNumber(right)) {
|
|
298
|
-
stys.right = toCssUnit(right);
|
|
299
|
-
}
|
|
300
|
-
if (isMinWidth && _xeUtils.default.isNumber(minWidth)) {
|
|
301
|
-
stys.minWidth = toCssUnit(minWidth);
|
|
302
328
|
}
|
|
303
329
|
}
|
|
304
330
|
return {
|
|
305
331
|
top: top || 0,
|
|
306
332
|
bottom: bottom || 0,
|
|
307
333
|
left: left || 0,
|
|
308
|
-
|
|
334
|
+
arrowLeft: arrowLeft || 0,
|
|
309
335
|
style: stys,
|
|
310
336
|
placement: panelPlacement
|
|
311
337
|
};
|
|
312
338
|
}
|
|
313
339
|
function getPopupContainer(appendTo) {
|
|
314
|
-
|
|
340
|
+
const selectElem = appendTo && _xeUtils.default.isFunction(appendTo) ? appendTo({}) : appendTo;
|
|
341
|
+
return selectElem || 'body';
|
|
342
|
+
}
|
|
343
|
+
function getPopupAppendElement(appendTo) {
|
|
344
|
+
const selectElem = getPopupContainer(appendTo);
|
|
345
|
+
if (_xeUtils.default.isString(selectElem)) {
|
|
346
|
+
return document.querySelector(selectElem) || document.body;
|
|
347
|
+
}
|
|
348
|
+
return selectElem;
|
|
315
349
|
}
|
package/lib/ui/src/dom.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
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.getPopupContainer=getPopupContainer,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(
|
|
1
|
+
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.getPopupAppendElement=getPopupAppendElement,exports.getPopupContainer=getPopupContainer,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()}let 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 n=e.parentNode;if(o.top+=e.offsetTop,o.left+=e.offsetLeft,n&&n!==document.documentElement&&n!==document.body&&(o.top-=n.scrollTop,o.left-=n.scrollLeft),(!t||e!==t&&e.offsetParent!==t)&&e.offsetParent)return getNodeOffset(e.offsetParent,t,o)}return o}function isPx(e){return e&&/^\d+(\.\d+)?(px)?$/.test(e)}function isScale(e){return e&&/^\d+(\.\d+)?%$/.test(e)}function hasClass(e,t){return!!e&&(e.classList?e.classList.contains(t):!!(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,n){let s,i=e.target.shadowRoot&&e.composed&&e.composedPath()[0]||e.target;for(;i&&i.nodeType&&i!==document;){if(o&&hasClass(i,o)&&(!n||n(i)))s=i;else if(i===t)return{flag:!o||!!s,container:t,targetElem:s};i=i.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:n,visibleHeight:s,visibleWidth:i}=getDomNode();return{boundingTop:t,top:o+t,boundingLeft:e,left:n+e,visibleHeight:s,visibleWidth:i}}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}let 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{defaultTop:o,defaultLeft:n,placement:s,defaultPlacement:i,teleportTo:l,marginSize:r,isMinWidth:a}=Object.assign({teleportTo:!1,marginSize:18,isMinWidth:!0},o);let d="bottom",p="",u="",f=0;var g="";let c="";var m,C,h,x,A,N,P,b,E,T,I={};return t&&e&&(N=(N=t.parentElement)===document.body?document.documentElement:N)&&(m=e.offsetWidth,C=e.offsetHeight,h=t.offsetHeight,x=t.offsetWidth,b=N.getBoundingClientRect(),t=t.getBoundingClientRect(),T=e.getBoundingClientRect(),A=N.clientHeight,N=N.clientWidth,P=b.left,b=b.top,E=T.left,T=T.top,g=e.offsetWidth,l?(f=n||E,p=o||T+C,"top"===s?(d="top",p=T-h):s||("top"===i?(d="top",(p=T-h)<r&&(d="bottom",p=T+C),p+h+r>A&&(d="top",p=T-h)):(p+h+r>A&&(d="top",p=T-h),p<r&&(d="bottom",p=T+C))),f+x+r>N&&(f-=f+x+r-N),f<r&&(f=r),p-=b,f-=P):("top"===s?(d="top",u=C):s||A<T+(p=C)+h+r&&r<T-C-h&&(d="top",p="",u=C),t.left+t.width+r>N&&(f=-(t.left+t.width+r-N))),_xeUtils.default.isNumber(p)&&(I.top=toCssUnit(p)),_xeUtils.default.isNumber(u)&&(I.bottom=toCssUnit(u)),_xeUtils.default.isNumber(f)&&(I.left=toCssUnit(f)),a&&_xeUtils.default.isNumber(g)&&(I.minWidth=toCssUnit(g)),f===E?m<=x&&(c=m/2):f<E&&(c=f+x>E+m?E-f+m/2:E-f+(x-(E-f))/2)),{top:p||0,bottom:u||0,left:f||0,arrowLeft:c||0,style:I,placement:d}}function getPopupContainer(e){return(e&&_xeUtils.default.isFunction(e)?e({}):e)||"body"}function getPopupAppendElement(e){e=getPopupContainer(e);return _xeUtils.default.isString(e)?document.querySelector(e)||document.body:e}
|
package/lib/ui/src/log.js
CHANGED
|
@@ -9,7 +9,7 @@ var _core = require("@vxe-ui/core");
|
|
|
9
9
|
const {
|
|
10
10
|
log
|
|
11
11
|
} = _core.VxeUI;
|
|
12
|
-
const uiVersion = `ui v${"4.17.
|
|
12
|
+
const uiVersion = `ui v${"4.17.8"}`;
|
|
13
13
|
function createComponentLog(name) {
|
|
14
14
|
const tableVersion = _core.VxeUI.tableVersion ? `table v${_core.VxeUI.tableVersion}` : '';
|
|
15
15
|
const ganttVersion = _core.VxeUI.ganttVersion ? `gantt v${_core.VxeUI.ganttVersion}` : '';
|
package/lib/ui/src/log.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,"__esModule",{value:!0}),exports.createComponentLog=createComponentLog,exports.warnLog=exports.errLog=void 0;var _core=require("@vxe-ui/core");let log=_core.VxeUI.log,uiVersion="ui v4.17.
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:!0}),exports.createComponentLog=createComponentLog,exports.warnLog=exports.errLog=void 0;var _core=require("@vxe-ui/core");let log=_core.VxeUI.log,uiVersion="ui v4.17.8";function createComponentLog(e){var r=_core.VxeUI.tableVersion?"table v"+_core.VxeUI.tableVersion:"",o=_core.VxeUI.ganttVersion?"gantt v"+_core.VxeUI.ganttVersion:"",n=_core.VxeUI.designVersion?"design v"+_core.VxeUI.designVersion:"",r=[uiVersion,r,o,n].filter(e=>e).join(" ");return{warnLog:log.create("warn",r+"] ["+e),errLog:log.create("error",r+"] ["+e)}}let warnLog=exports.warnLog=log.create("warn",uiVersion),errLog=exports.errLog=log.create("error",uiVersion);
|
|
@@ -22,6 +22,6 @@
|
|
|
22
22
|
.vxe-button-group.is--vertical > .vxe-button.type--button, .vxe-button-group.is--vertical > .vxe-button--dropdown {
|
|
23
23
|
margin-right: 0;
|
|
24
24
|
}
|
|
25
|
-
.vxe-button-group.is--vertical > .vxe-button + .vxe-button--dropdown, .vxe-button-group.is--vertical > .vxe-button--dropdown + .vxe-button {
|
|
25
|
+
.vxe-button-group.is--vertical > .vxe-button.type--button + .vxe-button.type--button, .vxe-button-group.is--vertical > .vxe-button.type--button + .vxe-button--dropdown, .vxe-button-group.is--vertical > .vxe-button--dropdown + .vxe-button.type--button, .vxe-button-group.is--vertical > .vxe-button--dropdown + .vxe-button--dropdown {
|
|
26
26
|
margin-left: 0;
|
|
27
27
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.vxe-button-group{display:inline-flex}.vxe-button-group.is--vertical{flex-direction:column}.vxe-button-group.is--vertical>.vxe-button--dropdown,.vxe-button-group.is--vertical>.vxe-button.type--button{margin-top:var(--vxe-ui-base-margin-gap-default)}.vxe-button-group.is--vertical>.vxe-button--dropdown.size--medium,.vxe-button-group.is--vertical>.vxe-button.type--button.size--medium{margin-top:var(--vxe-ui-base-margin-gap-medium)}.vxe-button-group.is--vertical>.vxe-button--dropdown.size--small,.vxe-button-group.is--vertical>.vxe-button.type--button.size--small{margin-top:var(--vxe-ui-base-margin-gap-small)}.vxe-button-group.is--vertical>.vxe-button--dropdown.size--mini,.vxe-button-group.is--vertical>.vxe-button.type--button.size--mini{margin-top:var(--vxe-ui-base-margin-gap-mini)}.vxe-button-group.is--vertical>.vxe-button--dropdown:first-of-type,.vxe-button-group.is--vertical>.vxe-button.type--button:first-of-type{margin-top:0}.vxe-button-group.is--vertical>.vxe-button--dropdown,.vxe-button-group.is--vertical>.vxe-button.type--button{margin-right:0}.vxe-button-group.is--vertical>.vxe-button+.vxe-button--dropdown,.vxe-button-group.is--vertical>.vxe-button--dropdown+.vxe-button{margin-left:0}
|
|
1
|
+
.vxe-button-group{display:inline-flex}.vxe-button-group.is--vertical{flex-direction:column}.vxe-button-group.is--vertical>.vxe-button--dropdown,.vxe-button-group.is--vertical>.vxe-button.type--button{margin-top:var(--vxe-ui-base-margin-gap-default)}.vxe-button-group.is--vertical>.vxe-button--dropdown.size--medium,.vxe-button-group.is--vertical>.vxe-button.type--button.size--medium{margin-top:var(--vxe-ui-base-margin-gap-medium)}.vxe-button-group.is--vertical>.vxe-button--dropdown.size--small,.vxe-button-group.is--vertical>.vxe-button.type--button.size--small{margin-top:var(--vxe-ui-base-margin-gap-small)}.vxe-button-group.is--vertical>.vxe-button--dropdown.size--mini,.vxe-button-group.is--vertical>.vxe-button.type--button.size--mini{margin-top:var(--vxe-ui-base-margin-gap-mini)}.vxe-button-group.is--vertical>.vxe-button--dropdown:first-of-type,.vxe-button-group.is--vertical>.vxe-button.type--button:first-of-type{margin-top:0}.vxe-button-group.is--vertical>.vxe-button--dropdown,.vxe-button-group.is--vertical>.vxe-button.type--button{margin-right:0}.vxe-button-group.is--vertical>.vxe-button--dropdown+.vxe-button--dropdown,.vxe-button-group.is--vertical>.vxe-button--dropdown+.vxe-button.type--button,.vxe-button-group.is--vertical>.vxe-button.type--button+.vxe-button--dropdown,.vxe-button-group.is--vertical>.vxe-button.type--button+.vxe-button.type--button{margin-left:0}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vxe-pc-ui",
|
|
3
|
-
"version": "4.17.
|
|
3
|
+
"version": "4.17.8",
|
|
4
4
|
"description": "A vue based PC component library",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"update": "npm install --legacy-peer-deps",
|
|
@@ -66,7 +66,8 @@
|
|
|
66
66
|
"typescript": "~5.9.3",
|
|
67
67
|
"vue": "3.4.27",
|
|
68
68
|
"vue-router": "~4.5.1",
|
|
69
|
-
"vxe-table": "^4.20.1"
|
|
69
|
+
"vxe-table": "^4.20.1",
|
|
70
|
+
"vxe-gantt": "^4.7.1"
|
|
70
71
|
},
|
|
71
72
|
"vetur": {
|
|
72
73
|
"tags": "helper/vetur/tags.json",
|