Compare commits

..

6 Commits

Author SHA1 Message Date
gx d759ef774a 2.1.56 2021-04-30 10:14:22 +08:00
gx cd492b9fee fix: 拖拽样式修改 2021-04-21 22:24:59 +08:00
gx-mac cc5f98d777 2.1.55 2021-04-07 19:22:56 +08:00
gx-mac 864e286202 fix: add mouse events 2021-04-07 19:22:40 +08:00
gx-mac 5d72cddcd0 2.1.54 2021-04-07 16:32:16 +08:00
gx-mac e79d90ac27 fix: remove this.isIn 2021-04-07 16:31:51 +08:00
9 changed files with 66 additions and 28 deletions

View File

@ -1,3 +1,31 @@
## [2.1.56](https://github.com/tinper-bee/bee-tree/compare/v2.1.55...v2.1.56) (2021-04-30)
### Bug Fixes
* 拖拽样式修改 ([cd492b9](https://github.com/tinper-bee/bee-tree/commit/cd492b9fee9e37449271dbf7ce924e03b819dda6))
## [2.1.55](https://github.com/tinper-bee/bee-tree/compare/v2.1.54...v2.1.55) (2021-04-07)
### Bug Fixes
* add mouse events ([864e286](https://github.com/tinper-bee/bee-tree/commit/864e286202440d2f417273e12e495a90362d08c8))
## [2.1.54](https://github.com/tinper-bee/bee-tree/compare/v2.1.52...v2.1.54) (2021-04-07)
### Bug Fixes
* add compare function in sort ([b25ff2a](https://github.com/tinper-bee/bee-tree/commit/b25ff2a98e4916463e0ac44351eb73636f0f7543))
* remove this.isIn ([e79d90a](https://github.com/tinper-bee/bee-tree/commit/e79d90ac2767a2248f029a8e21b6fa36a196940a))
## [2.1.53](https://github.com/tinper-bee/bee-tree/compare/v2.1.48...v2.1.53) (2021-03-29) ## [2.1.53](https://github.com/tinper-bee/bee-tree/compare/v2.1.48...v2.1.53) (2021-03-29)

22
dist/demo.css vendored
View File

@ -94,28 +94,30 @@
opacity: 0.8; opacity: 0.8;
position: relative; } position: relative; }
.u-tree li.drag-over-gap-top > a[draggable] { .u-tree li.drag-over-gap-top > a[draggable] {
border-top: 2px #108ee9 solid; border-top: 22x #108ee9 solid;
position: relative; } position: relative;
border-radius: 0; }
.u-tree li.drag-over-gap-top > a[draggable]::before { .u-tree li.drag-over-gap-top > a[draggable]::before {
position: absolute; position: absolute;
top: -6px; top: -6px;
left: -7px; left: -8px;
content: ' '; content: ' ';
width: 8px; width: 10px;
height: 8px; height: 10px;
border: 2px solid #108ee9; border: 2px solid #108ee9;
border-radius: 99px; border-radius: 99px;
opacity: 1; } opacity: 1; }
.u-tree li.drag-over-gap-bottom > a[draggable] { .u-tree li.drag-over-gap-bottom > a[draggable] {
border-bottom: 2px #108ee9 solid; border-bottom: 2px #108ee9 solid;
position: relative; } position: relative;
border-radius: 0; }
.u-tree li.drag-over-gap-bottom > a[draggable]::before { .u-tree li.drag-over-gap-bottom > a[draggable]::before {
position: absolute; position: absolute;
bottom: -5px; bottom: -6px;
left: -6px; left: -8px;
content: ' '; content: ' ';
width: 8px; width: 10px;
height: 8px; height: 10px;
border: 2px solid #108ee9; border: 2px solid #108ee9;
border-radius: 99px; border-radius: 99px;
opacity: 1; } opacity: 1; }

2
dist/demo.css.map vendored

File diff suppressed because one or more lines are too long

13
dist/demo.js vendored
View File

@ -40584,7 +40584,7 @@
var targetDom = e.target; var targetDom = e.target;
// 如果当前tree节点不包括上一个焦点节点会触发此方法 // 如果当前tree节点不包括上一个焦点节点会触发此方法
if (this.tree == targetDom && !this.isIn && !this.tree.contains(e.relatedTarget)) { if (this.tree == targetDom && !this.tree.contains(e.relatedTarget)) {
var _props4 = this.props, var _props4 = this.props,
onFocus = _props4.onFocus, onFocus = _props4.onFocus,
children = _props4.children; children = _props4.children;
@ -40618,13 +40618,14 @@
}; };
Tree.prototype.onUlMouseEnter = function onUlMouseEnter(e) { Tree.prototype.onUlMouseEnter = function onUlMouseEnter(e) {
this.isIn = true; // this.isIn = true;
// console.log('onUlMouseEnter----isIn-----',this.isIn); // console.log('onUlMouseEnter----isIn-----',this.isIn);
}; };
Tree.prototype.onUlMouseLeave = function onUlMouseLeave(e) { Tree.prototype.onUlMouseLeave = function onUlMouseLeave(e) {
this.isIn = false; // this.isIn = false;
// console.log('onUlMouseLeave----isIn-----',this.isIn); // console.log('onUlMouseLeave----isIn-----',this.isIn);
}; };
Tree.prototype.getFilterExpandedKeys = function getFilterExpandedKeys(props, expandKeyProp, expandAll) { Tree.prototype.getFilterExpandedKeys = function getFilterExpandedKeys(props, expandKeyProp, expandAll) {
@ -41044,7 +41045,7 @@
_this8.hasCalculateRowHeight = true; _this8.hasCalculateRowHeight = true;
var rowHeight = treenodes.getBoundingClientRect().height; var rowHeight = treenodes.getBoundingClientRect().height;
_this8.store.setState({ _this8.store.setState({
rowHeight: rowHeight rowHeight: rowHeight || 24
}); });
}; };
@ -41992,7 +41993,9 @@
} }
levelObj[posLen].push(item); levelObj[posLen].push(item);
}); });
var levelArr = Object.keys(levelObj).sort(); var levelArr = Object.keys(levelObj).sort(function (a, b) {
return +a > +b;
});
var _loop = function _loop(i) { var _loop = function _loop(i) {
if (levelArr[i + 1]) { if (levelArr[i + 1]) {

2
dist/demo.js.map vendored

File diff suppressed because one or more lines are too long

2
package-lock.json generated
View File

@ -1,6 +1,6 @@
{ {
"name": "bee-tree", "name": "bee-tree",
"version": "2.1.53", "version": "2.1.56",
"lockfileVersion": 1, "lockfileVersion": 1,
"requires": true, "requires": true,
"dependencies": { "dependencies": {

View File

@ -1,6 +1,6 @@
{ {
"name": "bee-tree", "name": "bee-tree",
"version": "2.1.54-beta", "version": "2.1.56",
"version-yonui": "2.1.27-yonui.0", "version-yonui": "2.1.27-yonui.0",
"description": "Tree ui component for react", "description": "Tree ui component for react",
"keywords": [ "keywords": [

View File

@ -786,10 +786,13 @@ onExpand(treeNode,keyType) {
onUlMouseEnter(e){ onUlMouseEnter(e){
// console.log('onUlMouseEnter----isIn-----'); // this.isIn = true;
// console.log('onUlMouseEnter----isIn-----',this.isIn);
} }
onUlMouseLeave(e){ onUlMouseLeave(e){
// console.log('onUlMouseLeave----isIn-----'); // this.isIn = false;
// console.log('onUlMouseLeave----isIn-----',this.isIn);
} }
getFilterExpandedKeys(props, expandKeyProp, expandAll) { getFilterExpandedKeys(props, expandKeyProp, expandAll) {

View File

@ -140,13 +140,14 @@ $treePrefixCls : "u-tree";
li.drag-over-gap-top > a[draggable] { li.drag-over-gap-top > a[draggable] {
border-top: 2px #108ee9 solid; border-top: 2px #108ee9 solid;
position: relative; position: relative;
border-radius: 0;
&::before { &::before {
position: absolute; position: absolute;
top: -6px; top: -6px;
left: -7px; left: -8px;
content: ' '; content: ' ';
width: 8px; width: 10px;
height: 8px; height: 10px;
border: 2px solid #108ee9; border: 2px solid #108ee9;
border-radius: 99px; border-radius: 99px;
opacity: 1; opacity: 1;
@ -155,13 +156,14 @@ $treePrefixCls : "u-tree";
li.drag-over-gap-bottom > a[draggable] { li.drag-over-gap-bottom > a[draggable] {
border-bottom: 2px #108ee9 solid; border-bottom: 2px #108ee9 solid;
position: relative; position: relative;
border-radius: 0;
&::before { &::before {
position: absolute; position: absolute;
bottom: -5px; bottom: -6px;
left: -6px; left: -8px;
content: ' '; content: ' ';
width: 8px; width: 10px;
height: 8px; height: 10px;
border: 2px solid #108ee9; border: 2px solid #108ee9;
border-radius: 99px; border-radius: 99px;
opacity: 1; opacity: 1;