mirror of
https://github.com/ElemeFE/element.git
synced 2025-12-19 12:04:02 +08:00
Tree: get prop from data if not specified in props
This commit is contained in:
@@ -68,7 +68,8 @@ const getPropertyFromData = function(node, prop) {
|
||||
} else if (typeof config === 'string') {
|
||||
return data[config];
|
||||
} else if (typeof config === 'undefined') {
|
||||
return '';
|
||||
const dataProp = data[prop];
|
||||
return dataProp === undefined ? '' : dataProp;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user