去掉无用代码
This commit is contained in:
parent
c30ae63152
commit
dca7d6855d
|
@ -8950,10 +8950,10 @@
|
||||||
role: 'tree-node'
|
role: 'tree-node'
|
||||||
};
|
};
|
||||||
|
|
||||||
if (props.focusable) {
|
// if (props.focusable) {
|
||||||
// domProps.tabIndex = '0';//需求改成了默认选择第一个节点或者选中的节点
|
// // domProps.tabIndex = '0';//需求改成了默认选择第一个节点或者选中的节点
|
||||||
// domProps.onKeyDown = this.onKeyDown;//添加到具体的treeNode上了
|
// // domProps.onKeyDown = this.onKeyDown;//添加到具体的treeNode上了
|
||||||
}
|
// }
|
||||||
var getTreeNodesStates = function getTreeNodesStates() {
|
var getTreeNodesStates = function getTreeNodesStates() {
|
||||||
_this4.treeNodesStates = {};
|
_this4.treeNodesStates = {};
|
||||||
(0, _util.loopAllChildren)(props.children, function (item, index, pos, keyOrPos, siblingPosition) {
|
(0, _util.loopAllChildren)(props.children, function (item, index, pos, keyOrPos, siblingPosition) {
|
||||||
|
@ -9450,9 +9450,8 @@
|
||||||
|
|
||||||
function warnOnlyTreeNode() {
|
function warnOnlyTreeNode() {
|
||||||
if (onlyTreeNodeWarned) return;
|
if (onlyTreeNodeWarned) return;
|
||||||
|
|
||||||
onlyTreeNodeWarned = true;
|
onlyTreeNodeWarned = true;
|
||||||
warning(false, 'Tree only accept TreeNode as children.');
|
console.warn('Tree only accept TreeNode as children.');
|
||||||
}
|
}
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -735,10 +735,10 @@ onExpand(treeNode,keyType) {
|
||||||
role: 'tree-node',
|
role: 'tree-node',
|
||||||
};
|
};
|
||||||
|
|
||||||
if (props.focusable) {
|
// if (props.focusable) {
|
||||||
// domProps.tabIndex = '0';//需求改成了默认选择第一个节点或者选中的节点
|
// // domProps.tabIndex = '0';//需求改成了默认选择第一个节点或者选中的节点
|
||||||
// domProps.onKeyDown = this.onKeyDown;//添加到具体的treeNode上了
|
// // domProps.onKeyDown = this.onKeyDown;//添加到具体的treeNode上了
|
||||||
}
|
// }
|
||||||
const getTreeNodesStates = () => {
|
const getTreeNodesStates = () => {
|
||||||
this.treeNodesStates = {};
|
this.treeNodesStates = {};
|
||||||
loopAllChildren(props.children, (item, index, pos, keyOrPos, siblingPosition) => {
|
loopAllChildren(props.children, (item, index, pos, keyOrPos, siblingPosition) => {
|
||||||
|
|
|
@ -319,8 +319,7 @@ let onlyTreeNodeWarned = false;
|
||||||
|
|
||||||
export function warnOnlyTreeNode() {
|
export function warnOnlyTreeNode() {
|
||||||
if (onlyTreeNodeWarned) return;
|
if (onlyTreeNodeWarned) return;
|
||||||
|
|
||||||
onlyTreeNodeWarned = true;
|
onlyTreeNodeWarned = true;
|
||||||
warning(false, 'Tree only accept TreeNode as children.');
|
console.warn('Tree only accept TreeNode as children.');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue