objectPredicate中对路径是根结点的情况容错
This commit is contained in:
parent
fdff94cfcc
commit
f00599b840
|
|
@ -493,7 +493,7 @@ export default class TreeStore extends CascadeStore {
|
|||
// json中的多值查询
|
||||
const array = value instanceof Array ? value : [value];
|
||||
return (row) => {
|
||||
const data = get(row, path);
|
||||
const data = path ? get(row, path) : row;
|
||||
return differenceBy(array, data, (value) => {
|
||||
if (typeof value === 'object') {
|
||||
return JSON.stringify(value);
|
||||
|
|
@ -506,7 +506,7 @@ export default class TreeStore extends CascadeStore {
|
|||
// json中的多值查询
|
||||
const array = value instanceof Array ? value : [value];
|
||||
return (row) => {
|
||||
const data = get(row, path);
|
||||
const data = path ? get(row, path) : row;
|
||||
return intersectionBy(array, data, (value) => {
|
||||
if (typeof value === 'object') {
|
||||
return JSON.stringify(value);
|
||||
|
|
|
|||
|
|
@ -495,7 +495,7 @@ class TreeStore extends CascadeStore_1.CascadeStore {
|
|||
// json中的多值查询
|
||||
const array = value instanceof Array ? value : [value];
|
||||
return (row) => {
|
||||
const data = (0, lodash_1.get)(row, path);
|
||||
const data = path ? (0, lodash_1.get)(row, path) : row;
|
||||
return (0, lodash_1.differenceBy)(array, data, (value) => {
|
||||
if (typeof value === 'object') {
|
||||
return JSON.stringify(value);
|
||||
|
|
@ -508,7 +508,7 @@ class TreeStore extends CascadeStore_1.CascadeStore {
|
|||
// json中的多值查询
|
||||
const array = value instanceof Array ? value : [value];
|
||||
return (row) => {
|
||||
const data = (0, lodash_1.get)(row, path);
|
||||
const data = path ? (0, lodash_1.get)(row, path) : row;
|
||||
return (0, lodash_1.intersectionBy)(array, data, (value) => {
|
||||
if (typeof value === 'object') {
|
||||
return JSON.stringify(value);
|
||||
|
|
|
|||
|
|
@ -630,7 +630,7 @@ export default class TreeStore<ED extends EntityDict & BaseEntityDict> extends C
|
|||
// json中的多值查询
|
||||
const array = value instanceof Array ? value : [value];
|
||||
return (row) => {
|
||||
const data = get(row, path);
|
||||
const data = path ? get(row, path) : row;
|
||||
return differenceBy(array, data, (value: any) => {
|
||||
if (typeof value === 'object') {
|
||||
return JSON.stringify(value);
|
||||
|
|
@ -643,7 +643,7 @@ export default class TreeStore<ED extends EntityDict & BaseEntityDict> extends C
|
|||
// json中的多值查询
|
||||
const array = value instanceof Array ? value : [value];
|
||||
return (row) => {
|
||||
const data = get(row, path);
|
||||
const data = path ? get(row, path) : row;
|
||||
return intersectionBy(array, data, (value: any) => {
|
||||
if (typeof value === 'object') {
|
||||
return JSON.stringify(value);
|
||||
|
|
|
|||
Loading…
Reference in New Issue