去掉无用代码

This commit is contained in:
wanghaoo 2019-01-14 14:21:26 +08:00
parent c30ae63152
commit dca7d6855d
4 changed files with 11 additions and 13 deletions

11
dist/demo.js vendored
View File

@ -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.');
} }
/***/ }), /***/ }),

2
dist/demo.js.map vendored

File diff suppressed because one or more lines are too long

View File

@ -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) => {

View File

@ -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.');
} }