vxe-table 4.13.13 → 4.13.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/style.css +1 -1
- package/es/table/src/footer.js +1 -1
- package/es/table/src/header.js +1 -1
- package/es/table/src/table.js +118 -74
- package/es/ui/index.js +1 -1
- package/es/ui/src/dom.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/lib/index.umd.js +14 -58
- package/lib/index.umd.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/table/src/footer.js +1 -1
- package/lib/table/src/footer.min.js +1 -1
- package/lib/table/src/header.js +1 -1
- package/lib/table/src/header.min.js +1 -1
- package/lib/table/src/table.js +9 -53
- package/lib/table/src/table.min.js +1 -1
- package/lib/ui/index.js +1 -1
- package/lib/ui/index.min.js +1 -1
- package/lib/ui/src/dom.js +1 -1
- 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 +2 -2
- package/packages/table/src/footer.ts +1 -1
- package/packages/table/src/header.ts +1 -1
- package/packages/table/src/table.ts +121 -76
- package/packages/ui/src/dom.ts +1 -1
- /package/es/{iconfont.1745800678796.ttf → iconfont.1745889641364.ttf} +0 -0
- /package/es/{iconfont.1745800678796.woff → iconfont.1745889641364.woff} +0 -0
- /package/es/{iconfont.1745800678796.woff2 → iconfont.1745889641364.woff2} +0 -0
- /package/lib/{iconfont.1745800678796.ttf → iconfont.1745889641364.ttf} +0 -0
- /package/lib/{iconfont.1745800678796.woff → iconfont.1745889641364.woff} +0 -0
- /package/lib/{iconfont.1745800678796.woff2 → iconfont.1745889641364.woff2} +0 -0
package/lib/ui/index.js
CHANGED
|
@@ -13,7 +13,7 @@ Object.defineProperty(exports, "VxeUI", {
|
|
|
13
13
|
exports.version = exports.validators = exports.use = exports.t = exports.setup = exports.setTheme = exports.setLanguage = exports.setIcon = exports.setI18n = exports.setConfig = exports.saveFile = exports.renderer = exports.readFile = exports.print = exports.modal = exports.menus = exports.log = exports.interceptor = exports.hooks = exports.globalResize = exports.globalEvents = exports.getTheme = exports.getIcon = exports.getI18n = exports.getConfig = exports.formats = exports.default = exports.config = exports.commands = exports.clipboard = exports._t = void 0;
|
|
14
14
|
var _core = require("@vxe-ui/core");
|
|
15
15
|
var _utils = require("./src/utils");
|
|
16
|
-
const version = exports.version = "4.13.
|
|
16
|
+
const version = exports.version = "4.13.15";
|
|
17
17
|
_core.VxeUI.version = version;
|
|
18
18
|
_core.VxeUI.tableVersion = version;
|
|
19
19
|
_core.VxeUI.setConfig({
|
package/lib/ui/index.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,"__esModule",{value:!0}),exports.VXETable=void 0,Object.defineProperty(exports,"VxeUI",{enumerable:!0,get:function(){return _core.VxeUI}}),exports.version=exports.validators=exports.use=exports.t=exports.setup=exports.setTheme=exports.setLanguage=exports.setIcon=exports.setI18n=exports.setConfig=exports.saveFile=exports.renderer=exports.readFile=exports.print=exports.modal=exports.menus=exports.log=exports.interceptor=exports.hooks=exports.globalResize=exports.globalEvents=exports.getTheme=exports.getIcon=exports.getI18n=exports.getConfig=exports.formats=exports.default=exports.config=exports.commands=exports.clipboard=exports._t=void 0;var _core=require("@vxe-ui/core"),_utils=require("./src/utils");let version=exports.version="4.13.
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:!0}),exports.VXETable=void 0,Object.defineProperty(exports,"VxeUI",{enumerable:!0,get:function(){return _core.VxeUI}}),exports.version=exports.validators=exports.use=exports.t=exports.setup=exports.setTheme=exports.setLanguage=exports.setIcon=exports.setI18n=exports.setConfig=exports.saveFile=exports.renderer=exports.readFile=exports.print=exports.modal=exports.menus=exports.log=exports.interceptor=exports.hooks=exports.globalResize=exports.globalEvents=exports.getTheme=exports.getIcon=exports.getI18n=exports.getConfig=exports.formats=exports.default=exports.config=exports.commands=exports.clipboard=exports._t=void 0;var _core=require("@vxe-ui/core"),_utils=require("./src/utils");let version=exports.version="4.13.15",iconPrefix=(_core.VxeUI.version=version,_core.VxeUI.tableVersion=version,_core.VxeUI.setConfig({emptyCell:" ",table:{fit:!0,showHeader:!0,animat:!0,delayHover:250,autoResize:!0,minHeight:144,resizeConfig:{},resizableConfig:{dragMode:"auto",showDragTip:!0,isSyncAutoHeight:!0,isSyncAutoWidth:!0,minHeight:18},radioConfig:{strict:!0},rowDragConfig:{showIcon:!0,animation:!0,showGuidesStatus:!0,showDragTip:!0},columnDragConfig:{showIcon:!0,animation:!0,showGuidesStatus:!0,showDragTip:!0},checkboxConfig:{strict:!0},tooltipConfig:{enterable:!0},validConfig:{showMessage:!0,autoClear:!0,autoPos:!0,message:"inline",msgMode:"single",theme:"beautify"},columnConfig:{maxFixedSize:4},cellConfig:{padding:!0},headerCellConfig:{height:"unset"},footerCellConfig:{height:"unset"},customConfig:{allowVisible:!0,allowResizable:!0,allowFixed:!0,allowSort:!0,showFooter:!0,placement:"top-right",modalOptions:{showMaximize:!0,mask:!0,lockView:!0,resize:!0,escClosable:!0},drawerOptions:{mask:!0,lockView:!0,escClosable:!0,resize:!0}},sortConfig:{showIcon:!0,allowClear:!0,allowBtn:!0,iconLayout:"vertical"},filterConfig:{showIcon:!0},rowGroupConfig:{padding:!0,rowField:"id",parentField:"_X_ROW_PARENT_KEY",childrenField:"_X_ROW_CHILDREN",mapChildrenField:"_X_ROW_CHILD_LIST",indent:20,showIcon:!0},treeConfig:{padding:!0,rowField:"id",parentField:"parentId",childrenField:"children",hasChildField:"hasChild",mapChildrenField:"_X_ROW_CHILD",indent:20,showIcon:!0},expandConfig:{showIcon:!0,mode:"fixed"},editConfig:{showIcon:!0,showAsterisk:!0,autoFocus:!0},importConfig:{_typeMaps:{csv:1,html:1,xml:1,txt:1}},exportConfig:{_typeMaps:{csv:1,html:1,xml:1,txt:1}},printConfig:{},mouseConfig:{extension:!0},keyboardConfig:{isEsc:!0},areaConfig:{autoClear:!0,selectCellByHeader:!0,selectCellByBody:!0,extendDirection:{top:!0,left:!0,bottom:!0,right:!0}},clipConfig:{isCopy:!0,isCut:!0,isPaste:!0},fnrConfig:{isFind:!0,isReplace:!0},virtualXConfig:{enabled:!0,gt:24,preSize:1,oSize:0},virtualYConfig:{enabled:!0,gt:100,preSize:1,oSize:0},scrollbarConfig:{}},grid:{formConfig:{enabled:!0},pagerConfig:{enabled:!0},toolbarConfig:{enabled:!0},proxyConfig:{enabled:!0,autoLoad:!0,showResponseMsg:!0,showActiveMsg:!0,props:{list:null,result:"result",total:"page.total",message:"message"}}},toolbar:{}}),"vxe-table-icon-"),setTheme=(_core.VxeUI.setIcon({TABLE_SORT_ASC:iconPrefix+"caret-up",TABLE_SORT_DESC:iconPrefix+"caret-down",TABLE_FILTER_NONE:iconPrefix+"funnel",TABLE_FILTER_MATCH:iconPrefix+"funnel",TABLE_EDIT:iconPrefix+"edit",TABLE_TITLE_PREFIX:iconPrefix+"question-circle-fill",TABLE_TITLE_SUFFIX:iconPrefix+"question-circle-fill",TABLE_TREE_LOADED:iconPrefix+"spinner roll",TABLE_TREE_OPEN:iconPrefix+"caret-right rotate90",TABLE_TREE_CLOSE:iconPrefix+"caret-right",TABLE_EXPAND_LOADED:iconPrefix+"spinner roll",TABLE_EXPAND_OPEN:iconPrefix+"arrow-right rotate90",TABLE_EXPAND_CLOSE:iconPrefix+"arrow-right",TABLE_CHECKBOX_CHECKED:iconPrefix+"checkbox-checked-fill",TABLE_CHECKBOX_UNCHECKED:iconPrefix+"checkbox-unchecked",TABLE_CHECKBOX_INDETERMINATE:iconPrefix+"checkbox-indeterminate-fill",TABLE_RADIO_CHECKED:iconPrefix+"radio-checked-fill",TABLE_RADIO_UNCHECKED:iconPrefix+"radio-unchecked",TABLE_CUSTOM_SORT:iconPrefix+"drag-handle",TABLE_MENU_OPTIONS:iconPrefix+"arrow-right",TABLE_DRAG_ROW:iconPrefix+"drag-handle",TABLE_DRAG_COLUMN:iconPrefix+"drag-handle",TABLE_DRAG_STATUS_ROW:iconPrefix+"sort",TABLE_DRAG_STATUS_SUB_ROW:iconPrefix+"add-sub",TABLE_DRAG_STATUS_COLUMN:iconPrefix+"swap",TABLE_DRAG_DISABLED:iconPrefix+"no-drop",TABLE_ROW_GROUP_OPEN:iconPrefix+"arrow-right rotate90",TABLE_ROW_GROUP_CLOSE:iconPrefix+"arrow-right",TOOLBAR_TOOLS_REFRESH:iconPrefix+"repeat",TOOLBAR_TOOLS_REFRESH_LOADING:iconPrefix+"repeat roll",TOOLBAR_TOOLS_IMPORT:iconPrefix+"upload",TOOLBAR_TOOLS_EXPORT:iconPrefix+"download",TOOLBAR_TOOLS_PRINT:iconPrefix+"print",TOOLBAR_TOOLS_FULLSCREEN:iconPrefix+"fullscreen",TOOLBAR_TOOLS_MINIMIZE:iconPrefix+"minimize",TOOLBAR_TOOLS_CUSTOM:iconPrefix+"custom-column",TOOLBAR_TOOLS_FIXED_LEFT:iconPrefix+"fixed-left",TOOLBAR_TOOLS_FIXED_LEFT_ACTIVE:iconPrefix+"fixed-left-fill",TOOLBAR_TOOLS_FIXED_RIGHT:iconPrefix+"fixed-right",TOOLBAR_TOOLS_FIXED_RIGHT_ACTIVE:iconPrefix+"fixed-right-fill"}),exports.setTheme=_core.VxeUI.setTheme),getTheme=exports.getTheme=_core.VxeUI.getTheme,setConfig=exports.setConfig=_core.VxeUI.setConfig,getConfig=exports.getConfig=_core.VxeUI.getConfig,setIcon=exports.setIcon=_core.VxeUI.setIcon,getIcon=exports.getIcon=_core.VxeUI.getIcon,setLanguage=exports.setLanguage=_core.VxeUI.setLanguage,setI18n=exports.setI18n=_core.VxeUI.setI18n,getI18n=exports.getI18n=_core.VxeUI.getI18n,globalEvents=exports.globalEvents=_core.VxeUI.globalEvents,globalResize=exports.globalResize=_core.VxeUI.globalResize,renderer=exports.renderer=_core.VxeUI.renderer,validators=exports.validators=_core.VxeUI.validators,menus=exports.menus=_core.VxeUI.menus,formats=exports.formats=_core.VxeUI.formats,commands=exports.commands=_core.VxeUI.commands,interceptor=exports.interceptor=_core.VxeUI.interceptor,clipboard=exports.clipboard=_core.VxeUI.clipboard,log=exports.log=_core.VxeUI.log,hooks=exports.hooks=_core.VxeUI.hooks,use=exports.use=_core.VxeUI.use,setup=e=>_core.VxeUI.setConfig(e),config=(exports.setup=setup,_core.VxeUI.setup=setup,e=>_core.VxeUI.setConfig(e)),t=(exports.config=config,_core.VxeUI.config=config,(e,o)=>_core.VxeUI.getI18n(e,o)),_t=(exports.t=t,_core.VxeUI.t=t,(e,o)=>(0,_utils.getFuncText)(e,o)),VXETable=(exports._t=_t,_core.VxeUI._t=_t,exports.VXETable=_core.VxeUI),saveFile=e=>_core.VxeUI.saveFile(e),readFile=(exports.saveFile=saveFile,e=>_core.VxeUI.readFile(e)),print=(exports.readFile=readFile,e=>_core.VxeUI.print(e)),modal=(exports.print=print,exports.modal={get(e){return _core.VxeUI.modal.get(e)},close(e){return _core.VxeUI.modal.close(e)},open(e){return _core.VxeUI.modal.open(e)},alert(e,o,r){return _core.VxeUI.modal.alert(e,o,r)},confirm(e,o,r){return _core.VxeUI.modal.confirm(e,o,r)},message(e,o){return _core.VxeUI.modal.message(e,o)},notification(e,o,r){return _core.VxeUI.modal.notification(e,o,r)}});var _default=exports.default=_core.VxeUI;
|
package/lib/ui/src/dom.js
CHANGED
|
@@ -73,7 +73,7 @@ function isScale(val) {
|
|
|
73
73
|
return val && /^\d+%$/.test(val);
|
|
74
74
|
}
|
|
75
75
|
function hasClass(elem, cls) {
|
|
76
|
-
return elem && elem.className && elem.className.match && elem.className.match(getClsRE(cls));
|
|
76
|
+
return !!(elem && elem.className && elem.className.match && elem.className.match(getClsRE(cls)));
|
|
77
77
|
}
|
|
78
78
|
function removeClass(elem, cls) {
|
|
79
79
|
if (elem && hasClass(elem, cls)) {
|
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.getOffsetHeight=getOffsetHeight,exports.getOffsetPos=getOffsetPos,exports.getPaddingTopBottomSize=getPaddingTopBottomSize,exports.getPropClass=getPropClass,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.setScrollLeft=setScrollLeft,exports.setScrollTop=setScrollTop,exports.toCssUnit=toCssUnit,exports.triggerEvent=triggerEvent,exports.updateCellTitle=updateCellTitle;var _xeUtils=_interopRequireDefault(require("xe-utils"));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}let reClsMap={},tpImgEl;function initTpImg(){return tpImgEl||((tpImgEl=new Image).src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII="),tpImgEl}function getTpImg(){return tpImgEl||initTpImg()}function getPropClass(e,t){return e?_xeUtils.default.isFunction(e)?e(t):e:""}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
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:!0}),exports.addClass=addClass,exports.getAbsolutePos=getAbsolutePos,exports.getDomNode=getDomNode,exports.getEventTargetNode=getEventTargetNode,exports.getOffsetHeight=getOffsetHeight,exports.getOffsetPos=getOffsetPos,exports.getPaddingTopBottomSize=getPaddingTopBottomSize,exports.getPropClass=getPropClass,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.setScrollLeft=setScrollLeft,exports.setScrollTop=setScrollTop,exports.toCssUnit=toCssUnit,exports.triggerEvent=triggerEvent,exports.updateCellTitle=updateCellTitle;var _xeUtils=_interopRequireDefault(require("xe-utils"));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}let reClsMap={},tpImgEl;function initTpImg(){return tpImgEl||((tpImgEl=new Image).src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII="),tpImgEl}function getTpImg(){return tpImgEl||initTpImg()}function getPropClass(e,t){return e?_xeUtils.default.isFunction(e)?e(t):e:""}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 getOffsetHeight(e){return e?e.offsetHeight:0}function getPaddingTopBottomSize(e){return e?(e=getComputedStyle(e),_xeUtils.default.toNumber(e.paddingTop)+_xeUtils.default.toNumber(e.paddingBottom)):0}function setScrollTop(e,t){e&&(e.scrollTop=t)}function setScrollLeft(e,t){e&&(e.scrollLeft=t)}function updateCellTitle(e,t){t="html"===t.type?e.innerText:e.textContent;e.getAttribute("title")!==t&&e.setAttribute("title",t)}function getEventTargetNode(e,t,o,s){let l,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)))l=n;else if(n===t)return{flag:!o||!!l,container:t,targetElem:l};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:l,visibleWidth:n}=getDomNode();return{boundingTop:t,top:o+t,boundingLeft:e,left:s+e,visibleHeight:l,visibleWidth:n}}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}
|
package/lib/ui/src/log.js
CHANGED
|
@@ -8,6 +8,6 @@ var _core = require("@vxe-ui/core");
|
|
|
8
8
|
const {
|
|
9
9
|
log
|
|
10
10
|
} = _core.VxeUI;
|
|
11
|
-
const version = `table v${"4.13.
|
|
11
|
+
const version = `table v${"4.13.15"}`;
|
|
12
12
|
const warnLog = exports.warnLog = log.create('warn', version);
|
|
13
13
|
const errLog = exports.errLog = log.create('error', version);
|
package/lib/ui/src/log.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,"__esModule",{value:!0}),exports.warnLog=exports.errLog=void 0;var _core=require("@vxe-ui/core");let log=_core.VxeUI.log,version="table v4.13.
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:!0}),exports.warnLog=exports.errLog=void 0;var _core=require("@vxe-ui/core");let log=_core.VxeUI.log,version="table v4.13.15",warnLog=exports.warnLog=log.create("warn",version),errLog=exports.errLog=log.create("error",version);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vxe-table",
|
|
3
|
-
"version": "4.13.
|
|
3
|
+
"version": "4.13.15",
|
|
4
4
|
"description": "一个基于 vue 的 PC 端表格组件,支持增删改查、虚拟树、拖拽排序,懒加载、快捷菜单、数据校验、树形结构、打印、导入导出、自定义模板、渲染器、JSON 配置式...",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"update": "npm install --legacy-peer-deps",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"style": "lib/style.css",
|
|
29
29
|
"typings": "types/index.d.ts",
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"vxe-pc-ui": "^4.5.
|
|
31
|
+
"vxe-pc-ui": "^4.5.33"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@types/resize-observer-browser": "^0.1.11",
|
|
@@ -58,7 +58,7 @@ export default defineComponent({
|
|
|
58
58
|
const defaultRowHeight = computeDefaultRowHeight.value
|
|
59
59
|
const cellOpts = computeCellOpts.value
|
|
60
60
|
const footerCellOpts = computeFooterCellOpts.value
|
|
61
|
-
const currCellHeight = getCellHeight(footerCellOpts.height
|
|
61
|
+
const currCellHeight = getCellHeight(footerCellOpts.height) || defaultRowHeight
|
|
62
62
|
|
|
63
63
|
return tableColumn.map((column, $columnIndex) => {
|
|
64
64
|
const { type, showFooterOverflow, footerAlign, align, footerClassName, editRender, cellRender } = column
|
|
@@ -55,7 +55,7 @@ export default defineComponent({
|
|
|
55
55
|
const cellOpts = computeCellOpts.value
|
|
56
56
|
const defaultRowHeight = computeDefaultRowHeight.value
|
|
57
57
|
const headerCellOpts = computeHeaderCellOpts.value
|
|
58
|
-
const currCellHeight = getCellHeight(headerCellOpts.height
|
|
58
|
+
const currCellHeight = getCellHeight(headerCellOpts.height) || defaultRowHeight
|
|
59
59
|
const { disabledMethod: dragDisabledMethod, isCrossDrag, isPeerDrag } = columnDragOpts
|
|
60
60
|
|
|
61
61
|
return cols.map((column, $columnIndex) => {
|
|
@@ -9,7 +9,7 @@ import TableHeaderComponent from './header'
|
|
|
9
9
|
import TableFooterComponent from './footer'
|
|
10
10
|
import tableProps from './props'
|
|
11
11
|
import tableEmits from './emits'
|
|
12
|
-
import { getRowUniqueId, clearTableAllStatus, getRowkey, getRowid, rowToVisible, colToVisible, getCellValue, setCellValue, handleRowidOrRow, handleFieldOrColumn, toTreePathSeq, restoreScrollLocation, getRootColumn, getRefElem, getColReMinWidth, createHandleUpdateRowId, createHandleGetRowId } from './util'
|
|
12
|
+
import { getRowUniqueId, clearTableAllStatus, getRowkey, getRowid, rowToVisible, colToVisible, getCellValue, setCellValue, handleRowidOrRow, handleFieldOrColumn, toTreePathSeq, restoreScrollLocation, getRootColumn, getRefElem, getColReMinWidth, createHandleUpdateRowId, createHandleGetRowId, getCellHeight } from './util'
|
|
13
13
|
import { getSlotVNs } from '../../ui/src/vn'
|
|
14
14
|
import { warnLog, errLog } from '../../ui/src/log'
|
|
15
15
|
import TableCustomPanelComponent from '../module/custom/panel'
|
|
@@ -559,17 +559,15 @@ export default defineComponent({
|
|
|
559
559
|
|
|
560
560
|
const computeHeaderCellOpts = computed(() => {
|
|
561
561
|
const headerCellOpts = Object.assign({}, getConfig().table.headerCellConfig, props.headerCellConfig)
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
}
|
|
562
|
+
const cellOpts = computeCellOpts.value
|
|
563
|
+
headerCellOpts.height = XEUtils.toNumber(getCellHeight(headerCellOpts.height || cellOpts.height))
|
|
565
564
|
return headerCellOpts
|
|
566
565
|
})
|
|
567
566
|
|
|
568
567
|
const computeFooterCellOpts = computed(() => {
|
|
569
568
|
const footerCellOpts = Object.assign({}, getConfig().table.footerCellConfig, props.footerCellConfig)
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
}
|
|
569
|
+
const cellOpts = computeCellOpts.value
|
|
570
|
+
footerCellOpts.height = XEUtils.toNumber(getCellHeight(footerCellOpts.height || cellOpts.height))
|
|
573
571
|
return footerCellOpts
|
|
574
572
|
})
|
|
575
573
|
|
|
@@ -2292,7 +2290,7 @@ export default defineComponent({
|
|
|
2292
2290
|
if (tableElem) {
|
|
2293
2291
|
tableElem.style.width = tWidth ? `${tWidth}px` : ''
|
|
2294
2292
|
// 兼容性处理
|
|
2295
|
-
tableElem.style.paddingRight = osbWidth && fixedType && (browseObj
|
|
2293
|
+
tableElem.style.paddingRight = osbWidth && fixedType && (browseObj.firefox || browseObj.safari) ? `${osbWidth}px` : ''
|
|
2296
2294
|
}
|
|
2297
2295
|
const emptyBlockElem = getRefElem(elemStore[`${name}-${layout}-emptyBlock`])
|
|
2298
2296
|
if (emptyBlockElem) {
|
|
@@ -3744,41 +3742,41 @@ export default defineComponent({
|
|
|
3744
3742
|
}
|
|
3745
3743
|
}
|
|
3746
3744
|
|
|
3747
|
-
|
|
3748
|
-
|
|
3749
|
-
|
|
3750
|
-
|
|
3751
|
-
|
|
3752
|
-
|
|
3753
|
-
|
|
3754
|
-
|
|
3755
|
-
|
|
3756
|
-
|
|
3757
|
-
|
|
3758
|
-
|
|
3759
|
-
|
|
3760
|
-
|
|
3761
|
-
|
|
3762
|
-
|
|
3763
|
-
|
|
3764
|
-
|
|
3765
|
-
|
|
3766
|
-
|
|
3767
|
-
|
|
3768
|
-
|
|
3769
|
-
|
|
3770
|
-
|
|
3771
|
-
|
|
3772
|
-
|
|
3773
|
-
|
|
3774
|
-
|
|
3775
|
-
|
|
3776
|
-
|
|
3777
|
-
|
|
3778
|
-
|
|
3779
|
-
|
|
3780
|
-
|
|
3781
|
-
|
|
3745
|
+
const lazyScrollXData = () => {
|
|
3746
|
+
const { lxTimeout, lxRunTime, scrollXStore } = internalData
|
|
3747
|
+
const { visibleSize } = scrollXStore
|
|
3748
|
+
const fpsTime = visibleSize > 26 ? 26 : (visibleSize > 16 ? 14 : 6)
|
|
3749
|
+
if (lxTimeout) {
|
|
3750
|
+
clearTimeout(lxTimeout)
|
|
3751
|
+
}
|
|
3752
|
+
if (!lxRunTime || lxRunTime + fpsTime < Date.now()) {
|
|
3753
|
+
internalData.lxRunTime = Date.now()
|
|
3754
|
+
loadScrollXData()
|
|
3755
|
+
}
|
|
3756
|
+
internalData.lxTimeout = setTimeout(() => {
|
|
3757
|
+
internalData.lxTimeout = undefined
|
|
3758
|
+
internalData.lxRunTime = undefined
|
|
3759
|
+
loadScrollXData()
|
|
3760
|
+
}, fpsTime)
|
|
3761
|
+
}
|
|
3762
|
+
|
|
3763
|
+
const lazyScrollYData = () => {
|
|
3764
|
+
const { lyTimeout, lyRunTime, scrollYStore } = internalData
|
|
3765
|
+
const { visibleSize } = scrollYStore
|
|
3766
|
+
const fpsTime = visibleSize > 30 ? 32 : (visibleSize > 20 ? 18 : 8)
|
|
3767
|
+
if (lyTimeout) {
|
|
3768
|
+
clearTimeout(lyTimeout)
|
|
3769
|
+
}
|
|
3770
|
+
if (!lyRunTime || lyRunTime + fpsTime < Date.now()) {
|
|
3771
|
+
internalData.lyRunTime = Date.now()
|
|
3772
|
+
loadScrollYData()
|
|
3773
|
+
}
|
|
3774
|
+
internalData.lyTimeout = setTimeout(() => {
|
|
3775
|
+
internalData.lyTimeout = undefined
|
|
3776
|
+
internalData.lyRunTime = undefined
|
|
3777
|
+
loadScrollYData()
|
|
3778
|
+
}, fpsTime)
|
|
3779
|
+
}
|
|
3782
3780
|
|
|
3783
3781
|
const checkLastSyncScroll = (isRollX: boolean, isRollY: boolean) => {
|
|
3784
3782
|
const { scrollXLoad, scrollYLoad } = reactData
|
|
@@ -9648,23 +9646,23 @@ export default defineComponent({
|
|
|
9648
9646
|
* 横向 X 可视渲染事件处理
|
|
9649
9647
|
*/
|
|
9650
9648
|
triggerScrollXEvent () {
|
|
9651
|
-
|
|
9652
|
-
|
|
9653
|
-
|
|
9654
|
-
|
|
9655
|
-
|
|
9656
|
-
|
|
9649
|
+
const virtualXOpts = computeVirtualXOpts.value
|
|
9650
|
+
if (virtualXOpts.immediate) {
|
|
9651
|
+
loadScrollXData()
|
|
9652
|
+
} else {
|
|
9653
|
+
lazyScrollXData()
|
|
9654
|
+
}
|
|
9657
9655
|
},
|
|
9658
9656
|
/**
|
|
9659
9657
|
* 纵向 Y 可视渲染事件处理
|
|
9660
9658
|
*/
|
|
9661
9659
|
triggerScrollYEvent () {
|
|
9662
|
-
|
|
9663
|
-
|
|
9664
|
-
|
|
9665
|
-
|
|
9666
|
-
|
|
9667
|
-
|
|
9660
|
+
const virtualYOpts = computeVirtualYOpts.value
|
|
9661
|
+
if (virtualYOpts.immediate) {
|
|
9662
|
+
loadScrollYData()
|
|
9663
|
+
} else {
|
|
9664
|
+
lazyScrollYData()
|
|
9665
|
+
}
|
|
9668
9666
|
},
|
|
9669
9667
|
triggerBodyScrollEvent (evnt, fixedType) {
|
|
9670
9668
|
const { scrollYLoad, scrollXLoad } = reactData
|
|
@@ -9877,9 +9875,8 @@ export default defineComponent({
|
|
|
9877
9875
|
if (isRollX) {
|
|
9878
9876
|
evnt.preventDefault()
|
|
9879
9877
|
internalData.inWheelScroll = true
|
|
9880
|
-
|
|
9881
|
-
|
|
9882
|
-
const currLeftNum = offsetLeft
|
|
9878
|
+
if (browseObj.firefox || browseObj.safari) {
|
|
9879
|
+
const currLeftNum = scrollLeft
|
|
9883
9880
|
setScrollLeft(xHandleEl, currLeftNum)
|
|
9884
9881
|
setScrollLeft(bodyScrollElem, currLeftNum)
|
|
9885
9882
|
setScrollLeft(headerScrollElem, currLeftNum)
|
|
@@ -9891,14 +9888,29 @@ export default defineComponent({
|
|
|
9891
9888
|
type: 'table',
|
|
9892
9889
|
fixed: ''
|
|
9893
9890
|
})
|
|
9894
|
-
}
|
|
9891
|
+
} else {
|
|
9892
|
+
wheelScrollLeftTo(scrollLeft, (offsetLeft: number) => {
|
|
9893
|
+
internalData.inWheelScroll = true
|
|
9894
|
+
const currLeftNum = offsetLeft
|
|
9895
|
+
setScrollLeft(xHandleEl, currLeftNum)
|
|
9896
|
+
setScrollLeft(bodyScrollElem, currLeftNum)
|
|
9897
|
+
setScrollLeft(headerScrollElem, currLeftNum)
|
|
9898
|
+
setScrollLeft(footerScrollElem, currLeftNum)
|
|
9899
|
+
if (scrollXLoad) {
|
|
9900
|
+
$xeTable.triggerScrollXEvent(evnt)
|
|
9901
|
+
}
|
|
9902
|
+
$xeTable.handleScrollEvent(evnt, isRollY, isRollX, bodyScrollElem.scrollTop, currLeftNum, {
|
|
9903
|
+
type: 'table',
|
|
9904
|
+
fixed: ''
|
|
9905
|
+
})
|
|
9906
|
+
})
|
|
9907
|
+
}
|
|
9895
9908
|
}
|
|
9896
9909
|
if (isRollY) {
|
|
9897
9910
|
evnt.preventDefault()
|
|
9898
9911
|
internalData.inWheelScroll = true
|
|
9899
|
-
|
|
9900
|
-
|
|
9901
|
-
const currTopNum = bodyScrollElem.scrollTop + offsetTop
|
|
9912
|
+
if (browseObj.firefox || browseObj.safari) {
|
|
9913
|
+
const currTopNum = scrollTop
|
|
9902
9914
|
setScrollTop(yHandleEl, currTopNum)
|
|
9903
9915
|
setScrollTop(bodyScrollElem, currTopNum)
|
|
9904
9916
|
setScrollTop(leftScrollElem, currTopNum)
|
|
@@ -9911,7 +9923,24 @@ export default defineComponent({
|
|
|
9911
9923
|
type: 'table',
|
|
9912
9924
|
fixed: ''
|
|
9913
9925
|
})
|
|
9914
|
-
}
|
|
9926
|
+
} else {
|
|
9927
|
+
wheelScrollTopTo(scrollTop - currScrollTop, (offsetTop: number) => {
|
|
9928
|
+
internalData.inWheelScroll = true
|
|
9929
|
+
const currTopNum = bodyScrollElem.scrollTop + offsetTop
|
|
9930
|
+
setScrollTop(yHandleEl, currTopNum)
|
|
9931
|
+
setScrollTop(bodyScrollElem, currTopNum)
|
|
9932
|
+
setScrollTop(leftScrollElem, currTopNum)
|
|
9933
|
+
setScrollTop(rightScrollElem, currTopNum)
|
|
9934
|
+
setScrollTop(rowExpandEl, currTopNum)
|
|
9935
|
+
if (scrollYLoad) {
|
|
9936
|
+
$xeTable.triggerScrollYEvent(evnt)
|
|
9937
|
+
}
|
|
9938
|
+
$xeTable.handleScrollEvent(evnt, isRollY, isRollX, currTopNum, bodyScrollElem.scrollLeft, {
|
|
9939
|
+
type: 'table',
|
|
9940
|
+
fixed: ''
|
|
9941
|
+
})
|
|
9942
|
+
})
|
|
9943
|
+
}
|
|
9915
9944
|
}
|
|
9916
9945
|
},
|
|
9917
9946
|
triggerVirtualScrollXEvent (evnt) {
|
|
@@ -10050,22 +10079,20 @@ export default defineComponent({
|
|
|
10050
10079
|
isScrollXBig = true
|
|
10051
10080
|
}
|
|
10052
10081
|
|
|
10053
|
-
|
|
10054
|
-
|
|
10055
|
-
marginLeft = `${xSpaceLeft}px`
|
|
10082
|
+
if (!(scrollXLoad && overflowX)) {
|
|
10083
|
+
xSpaceLeft = 0
|
|
10056
10084
|
}
|
|
10085
|
+
|
|
10057
10086
|
if (headerTableElem) {
|
|
10058
|
-
headerTableElem.style.
|
|
10087
|
+
headerTableElem.style.transform = headerTableElem.getAttribute('xvm') ? `translate(${xSpaceLeft}px, 0px)` : ''
|
|
10059
10088
|
}
|
|
10060
10089
|
if (bodyTableElem) {
|
|
10061
|
-
bodyTableElem.style.
|
|
10090
|
+
bodyTableElem.style.transform = `translate(${xSpaceLeft}px, ${reactData.scrollYTop || 0}px)`
|
|
10062
10091
|
}
|
|
10063
10092
|
if (footerTableElem) {
|
|
10064
|
-
footerTableElem.style.
|
|
10093
|
+
footerTableElem.style.transform = footerTableElem.getAttribute('xvm') ? `translate(${xSpaceLeft}px, 0px)` : ''
|
|
10065
10094
|
}
|
|
10066
10095
|
|
|
10067
|
-
reactData.isScrollXBig = isScrollXBig
|
|
10068
|
-
|
|
10069
10096
|
const containerList = ['main']
|
|
10070
10097
|
containerList.forEach(name => {
|
|
10071
10098
|
const layoutList = ['header', 'body', 'footer']
|
|
@@ -10076,6 +10103,11 @@ export default defineComponent({
|
|
|
10076
10103
|
}
|
|
10077
10104
|
})
|
|
10078
10105
|
})
|
|
10106
|
+
|
|
10107
|
+
reactData.scrollXLeft = xSpaceLeft
|
|
10108
|
+
reactData.scrollXWidth = ySpaceWidth
|
|
10109
|
+
reactData.isScrollXBig = isScrollXBig
|
|
10110
|
+
|
|
10079
10111
|
const scrollXSpaceEl = refScrollXSpaceElem.value
|
|
10080
10112
|
if (scrollXSpaceEl) {
|
|
10081
10113
|
scrollXSpaceEl.style.width = `${ySpaceWidth}px`
|
|
@@ -10092,7 +10124,7 @@ export default defineComponent({
|
|
|
10092
10124
|
},
|
|
10093
10125
|
// 更新纵向 Y 可视渲染上下剩余空间大小
|
|
10094
10126
|
updateScrollYSpace () {
|
|
10095
|
-
const { isAllOverflow, scrollYLoad, expandColumn } = reactData
|
|
10127
|
+
const { isAllOverflow, overflowY, scrollYLoad, expandColumn } = reactData
|
|
10096
10128
|
const { scrollYStore, elemStore, isResizeCellHeight, afterFullData, fullAllDataRowIdData, rowExpandedMaps } = internalData
|
|
10097
10129
|
const { startIndex } = scrollYStore
|
|
10098
10130
|
const mouseOpts = computeMouseOpts.value
|
|
@@ -10102,6 +10134,8 @@ export default defineComponent({
|
|
|
10102
10134
|
const defaultRowHeight = computeDefaultRowHeight.value
|
|
10103
10135
|
const bodyScrollElem = getRefElem(elemStore['main-body-scroll'])
|
|
10104
10136
|
const bodyTableElem = getRefElem(elemStore['main-body-table'])
|
|
10137
|
+
const leftBodyTableElem = getRefElem(elemStore['left-body-table'])
|
|
10138
|
+
const rightbodyTableElem = getRefElem(elemStore['right-body-table'])
|
|
10105
10139
|
const containerList = ['main', 'left', 'right']
|
|
10106
10140
|
let ySpaceTop = 0
|
|
10107
10141
|
let scrollYHeight = 0
|
|
@@ -10153,12 +10187,22 @@ export default defineComponent({
|
|
|
10153
10187
|
}
|
|
10154
10188
|
ySpaceHeight = maxYHeight
|
|
10155
10189
|
}
|
|
10190
|
+
if (!(scrollYLoad && overflowY)) {
|
|
10191
|
+
scrollYTop = 0
|
|
10192
|
+
}
|
|
10193
|
+
|
|
10194
|
+
if (leftBodyTableElem) {
|
|
10195
|
+
leftBodyTableElem.style.transform = `translate(0px, ${scrollYTop}px)`
|
|
10196
|
+
}
|
|
10197
|
+
if (bodyTableElem) {
|
|
10198
|
+
bodyTableElem.style.transform = `translate(${reactData.scrollXLeft || 0}px, ${scrollYTop}px)`
|
|
10199
|
+
}
|
|
10200
|
+
if (rightbodyTableElem) {
|
|
10201
|
+
rightbodyTableElem.style.transform = `translate(0px, ${scrollYTop}px)`
|
|
10202
|
+
}
|
|
10203
|
+
|
|
10156
10204
|
containerList.forEach(name => {
|
|
10157
10205
|
const layoutList = ['header', 'body', 'footer']
|
|
10158
|
-
const tableElem = getRefElem(elemStore[`${name}-body-table`])
|
|
10159
|
-
if (tableElem) {
|
|
10160
|
-
tableElem.style.marginTop = scrollYTop ? `${scrollYTop}px` : ''
|
|
10161
|
-
}
|
|
10162
10206
|
layoutList.forEach(layout => {
|
|
10163
10207
|
const ySpaceElem = getRefElem(elemStore[`${name}-${layout}-ySpace`])
|
|
10164
10208
|
if (ySpaceElem) {
|
|
@@ -10166,6 +10210,7 @@ export default defineComponent({
|
|
|
10166
10210
|
}
|
|
10167
10211
|
})
|
|
10168
10212
|
})
|
|
10213
|
+
|
|
10169
10214
|
const scrollYSpaceEl = refScrollYSpaceElem.value
|
|
10170
10215
|
if (scrollYSpaceEl) {
|
|
10171
10216
|
scrollYSpaceEl.style.height = ySpaceHeight ? `${ySpaceHeight}px` : ''
|
package/packages/ui/src/dom.ts
CHANGED
|
@@ -55,7 +55,7 @@ export function isScale (val: any) {
|
|
|
55
55
|
}
|
|
56
56
|
|
|
57
57
|
export function hasClass (elem: any, cls: any) {
|
|
58
|
-
return elem && elem.className && elem.className.match && elem.className.match(getClsRE(cls))
|
|
58
|
+
return !!(elem && elem.className && elem.className.match && elem.className.match(getClsRE(cls)))
|
|
59
59
|
}
|
|
60
60
|
|
|
61
61
|
export function removeClass (elem: any, cls: any) {
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|