Merge remote-tracking branch 'baidu/master'

This commit is contained in:
liaoxuezhi 2019-10-21 19:23:23 +08:00
commit ca0344567b
2 changed files with 20 additions and 3 deletions

View File

@ -105,6 +105,12 @@
}
}
&:last-child {
> a {
margin: 0;
}
}
&.is-active {
> a:first-child,
> a:first-child:hover,

View File

@ -3,7 +3,7 @@ import {iRendererStore} from './iRenderer';
import {resolveVariable} from '../utils/tpl-builtin';
import isEqual = require('lodash/isEqual');
import find = require('lodash/find');
import {isBreakpoint, createObject, isObject, isVisible, guid, findTree, flattenTree, eachTree} from '../utils/helper';
import {isBreakpoint, createObject, isObject, isVisible, guid, findTree, flattenTree, eachTree, difference} from '../utils/helper';
import {evalExpression} from '../utils/tpl';
export const Column = types
@ -235,8 +235,19 @@ export const TableStore = iRendererStore
return getToggableColumns().filter(item => item.toggled);
}
function getModifiedRows() {
return self.rows.filter(item => item.modified);
function getModifiedRows(rows:IRow[] = [], modifiedRows:IRow[] = []) {
rows = rows && rows.length ? rows : self.rows;
rows.forEach((item:IRow) => {
if (item.children && item.children.length) {
getModifiedRows(item.children, modifiedRows);
}
let diff = difference(item.data, item.pristine);
let hasDifference = Object.keys(diff).length;
if (hasDifference) {
modifiedRows.push(item);
}
});
return modifiedRows;
}
function getModified() {