vxe-table 3.7.9-beta.0 → 3.7.9-beta.1
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 +2 -2
- package/lib/edit/src/mixin.js +2 -2
- package/lib/edit/src/mixin.min.js +1 -1
- package/lib/icon/style/style.css +1 -1
- package/lib/icon/style/style.min.css +1 -1
- package/lib/index.css +1 -1
- package/lib/index.umd.js +22 -13
- package/lib/index.umd.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/table/src/body.js +11 -5
- package/lib/table/src/body.min.js +1 -1
- package/lib/table/src/methods.js +4 -2
- package/lib/table/src/methods.min.js +1 -1
- package/lib/tools/dom.js +4 -2
- package/lib/tools/dom.min.js +1 -1
- package/lib/tools/log.js +1 -1
- package/lib/tools/log.min.js +1 -1
- package/lib/v-x-e-table/index.js +1 -1
- package/lib/v-x-e-table/index.min.js +1 -1
- package/package.json +2 -2
- package/packages/edit/src/mixin.js +2 -2
- package/packages/table/src/body.js +8 -5
- package/packages/table/src/methods.js +4 -2
- package/packages/tools/dom.js +4 -2
- /package/lib/icon/style/{iconfont.1705883476685.ttf → iconfont.1708907653537.ttf} +0 -0
- /package/lib/icon/style/{iconfont.1705883476685.woff → iconfont.1708907653537.woff} +0 -0
- /package/lib/icon/style/{iconfont.1705883476685.woff2 → iconfont.1708907653537.woff2} +0 -0
- /package/lib/{iconfont.1705883476685.ttf → iconfont.1708907653537.ttf} +0 -0
- /package/lib/{iconfont.1705883476685.woff → iconfont.1708907653537.woff} +0 -0
- /package/lib/{iconfont.1705883476685.woff2 → iconfont.1708907653537.woff2} +0 -0
|
@@ -29,7 +29,7 @@ function insertTreeRow (_vm, newRecords, isAppend) {
|
|
|
29
29
|
}
|
|
30
30
|
parentChilds[funcName](item)
|
|
31
31
|
mapChilds[funcName](item)
|
|
32
|
-
const rest = { row: item, rowid, seq: -1, index: -1, _index: -1, $index: -1, items: parentChilds, parent, level: parentLevel + 1 }
|
|
32
|
+
const rest = { row: item, rowid, seq: -1, index: -1, _index: -1, $index: -1, items: parentChilds, parent: parentRow, level: parentLevel + 1 }
|
|
33
33
|
fullDataRowIdData[rowid] = rest
|
|
34
34
|
fullAllDataRowIdData[rowid] = rest
|
|
35
35
|
} else {
|
|
@@ -55,7 +55,7 @@ function handleInsertRowAt (_vm, records, row, isInsertNextRow) {
|
|
|
55
55
|
records = [records]
|
|
56
56
|
}
|
|
57
57
|
const newRecords = _vm.defineField(records.map(record => Object.assign(treeConfig && transform ? { [mapChildrenField]: [], [childrenField]: [] } : {}, record)))
|
|
58
|
-
if (
|
|
58
|
+
if (XEUtils.eqNull(row)) {
|
|
59
59
|
// 如果为虚拟树
|
|
60
60
|
if (treeConfig && transform) {
|
|
61
61
|
insertTreeRow(_vm, newRecords, false)
|
|
@@ -87,7 +87,7 @@ function renderColumn (h, _vm, $xetable, seq, rowid, fixedType, rowLevel, row, r
|
|
|
87
87
|
columnOpts,
|
|
88
88
|
validErrorMaps
|
|
89
89
|
} = $xetable
|
|
90
|
-
const { type, cellRender, editRender, align, showOverflow, className, treeNode } = column
|
|
90
|
+
const { type, cellRender, editRender, align, showOverflow, className, treeNode, slots } = column
|
|
91
91
|
const { actived } = editStore
|
|
92
92
|
const { rHeight: scrollYRHeight } = sYOpts
|
|
93
93
|
const { height: rowHeight } = rowOpts
|
|
@@ -245,13 +245,16 @@ function renderColumn (h, _vm, $xetable, seq, rowid, fixedType, rowLevel, row, r
|
|
|
245
245
|
}, column.renderCell(h, params))
|
|
246
246
|
)
|
|
247
247
|
if (showValidTip && errorValidItem) {
|
|
248
|
+
const errRule = errorValidItem.rule
|
|
249
|
+
const validSlot = slots ? slots.valid : null
|
|
250
|
+
const validParams = { ...params, ...errorValidItem }
|
|
248
251
|
tdVNs.push(
|
|
249
252
|
h('div', {
|
|
250
|
-
class: 'vxe-cell--valid-error-hint',
|
|
251
|
-
style:
|
|
252
|
-
width: `${
|
|
253
|
+
class: ['vxe-cell--valid-error-hint', UtilTools.getClass(validOpts.className, errorValidItem)],
|
|
254
|
+
style: errRule && errRule.maxWidth ? {
|
|
255
|
+
width: `${errRule.maxWidth}px`
|
|
253
256
|
} : null
|
|
254
|
-
}, [
|
|
257
|
+
}, validSlot ? $xetable.callSlot(validSlot, validParams, h) : [
|
|
255
258
|
h('span', {
|
|
256
259
|
class: 'vxe-cell--valid-error-msg'
|
|
257
260
|
}, errorValidItem.content)
|
|
@@ -680,7 +680,8 @@ const Methods = {
|
|
|
680
680
|
}
|
|
681
681
|
XEUtils.eachTree(rows, (childRow, index, items, path, parent, nodes) => {
|
|
682
682
|
const rowid = getRowid(this, childRow)
|
|
683
|
-
const
|
|
683
|
+
const parentRow = parent || row
|
|
684
|
+
const rest = { row: childRow, rowid, seq: -1, index, _index: -1, $index: -1, items, parent: parentRow, level: parentLevel + nodes.length }
|
|
684
685
|
fullDataRowIdData[rowid] = rest
|
|
685
686
|
fullDataRowMap.set(childRow, rest)
|
|
686
687
|
fullAllDataRowIdData[rowid] = rest
|
|
@@ -1382,7 +1383,8 @@ const Methods = {
|
|
|
1382
1383
|
rowid = getRowid(this, rowOrRowid)
|
|
1383
1384
|
}
|
|
1384
1385
|
if (rowid) {
|
|
1385
|
-
|
|
1386
|
+
const rest = fullDataRowIdData[rowid]
|
|
1387
|
+
return rest ? rest.parent : null
|
|
1386
1388
|
}
|
|
1387
1389
|
}
|
|
1388
1390
|
return null
|
package/packages/tools/dom.js
CHANGED
|
@@ -132,9 +132,11 @@ export const DomTools = {
|
|
|
132
132
|
return getNodeOffset(elem, container, { left: 0, top: 0 })
|
|
133
133
|
},
|
|
134
134
|
getAbsolutePos (elem) {
|
|
135
|
+
// 当主页面嵌套在iframe时,elem.getBoundingClientRect()仅计算在当前body内的边界距离,忽略了body所在的边界距离
|
|
136
|
+
const bodyBounding = document.body.getBoundingClientRect()
|
|
135
137
|
const bounding = elem.getBoundingClientRect()
|
|
136
|
-
const boundingTop = bounding.top
|
|
137
|
-
const boundingLeft = bounding.left
|
|
138
|
+
const boundingTop = bounding.top - bodyBounding.top
|
|
139
|
+
const boundingLeft = bounding.left - bodyBounding.left
|
|
138
140
|
const { scrollTop, scrollLeft, visibleHeight, visibleWidth } = getDomNode()
|
|
139
141
|
return { boundingTop, top: scrollTop + boundingTop, boundingLeft, left: scrollLeft + boundingLeft, visibleHeight, visibleWidth }
|
|
140
142
|
},
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|