Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
this.visibleColumn.forEach(column => {
if (column.property && !XEUtils.has(recordItem, column.property)) {
XEUtils.set(recordItem, column.property, null)
}
// 如果设置了 Key 就必须要唯一,可以自行设置;如果为空,则默认生成一个随机数
if (rowKey && !XEUtils.get(recordItem, rowKey)) {
XEUtils.set(recordItem, rowKey, ++rowUniqueId + Date.now())
}
})
return recordItem
this.visibleColumn.forEach(column => {
if (column.property && !XEUtils.has(recordItem, column.property)) {
XEUtils.set(recordItem, column.property, null)
}
// 如果设置了 Key 就必须要唯一,可以自行设置;如果为空,则默认生成一个随机数
if (rowKey && !XEUtils.get(recordItem, rowKey)) {
XEUtils.set(recordItem, rowKey, ++rowUniqueId + Date.now())
}
})
return recordItem
if (value === -1) {
treeIndeterminates.push(row)
XEUtils.set(row, property, false)
} else {
// 更新子节点状态
XEUtils.eachTree([row], item => XEUtils.set(item, property, value), treeConfig)
XEUtils.remove(treeIndeterminates, item => item === row)
}
// 如果存在父节点,更新父节点状态
let matchObj = XEUtils.findTree(tableFullData, item => item === row, treeConfig)
if (matchObj && matchObj.parent) {
let selectItems = matchObj.items.filter(item => XEUtils.get(item, property))
return this.triggerCheckRowEvent(evnt, { row: matchObj.parent }, selectItems.length === matchObj.items.length ? true : (selectItems.length || value === -1 ? -1 : false))
}
} else {
XEUtils.set(row, property, value)
}
} else {
if (treeConfig) {
if (value === -1) {
treeIndeterminates.push(row)
XEUtils.remove(selection, item => item === row)
} else {
// 更新子节点状态
XEUtils.eachTree([row], item => {
if (value) {
if (selection.indexOf(item) === -1) {
selection.push(item)
}
} else {
XEUtils.remove(selection, select => select === item)
}
this.getColumns().forEach(column => {
if (column.property && !XEUtils.has(recordItem, column.property)) {
XEUtils.set(recordItem, column.property, null)
}
})
return recordItem
let updateValue = (row, rowIndex) => {
if (!checkMethod || checkMethod({ row, rowIndex })) {
XEUtils.set(row, property, value)
}
}
if (treeConfig) {
XEUtils.eachTree(tableFullData, item => XEUtils.set(item, property, false), treeConfig)
} else {
columns.forEach(column => {
if (column.property) {
XEUtils.set(record, column.property, null)
}
})
})
callback (value) {
XEUtils.set(row, column.property, value)
}
}
callback (value) {
XEUtils.set(row, column.property, value)
}
}
.then(() => {
if (this.configs.checkedEditMethod ? this.configs.checkedEditMethod({ row: row.data, rowIndex, column, columnIndex, cell }, evnt) !== false : true) {
XEUtils.set(row.data, column.property, null)
XEUtils.set(row.data, column.property, null)
}
})
} else {