ant-design-vue
Version:
An enterprise-class UI design language and Vue-based implementation
19 lines • 607 B
JavaScript
import { computed } from 'vue';
import { toPathOptions } from '../utils/treeUtil';
export default (function (options, fieldNames, rawValues) {
return computed(function () {
var missingValues = [];
var existsValues = [];
rawValues.value.forEach(function (valueCell) {
var pathOptions = toPathOptions(valueCell, options.value, fieldNames.value);
if (pathOptions.every(function (opt) {
return opt.option;
})) {
existsValues.push(valueCell);
} else {
missingValues.push(valueCell);
}
});
return [existsValues, missingValues];
});
});