Skip to content

Commit

Permalink
fix: 懒加载不反显的bug
Browse files Browse the repository at this point in the history
  • Loading branch information
greper committed Jul 30, 2021
1 parent b169ceb commit 62dcc0e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -173,10 +173,10 @@ export default {
if (dict) {
options = dict.getNodesFromDataMap(valueArr);
if (this.defaultLabel) {
if (props.defaultLabel) {
_.forEach(options, (item) => {
if (item[labelProp] == null) {
item[labelProp] = this.defaultLabel;
item[labelProp] = props.defaultLabel;
}
});
}
Expand Down
4 changes: 4 additions & 0 deletions packages/fast-crud/src/use/use-dict-define.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,10 @@ class Dict extends UnMergeable {
}
let data: Array<any> = [];
if (this.getNodesByValues) {
if (context == null) {
logger.warn("您配置了getNodesByValues,根据value值获取节点数据需要dict.prototype=true");
return [];
}
if (context.value) {
let cacheKey = null;
if (this.cache && this.url) {
Expand Down

0 comments on commit 62dcc0e

Please sign in to comment.