Showing
1 changed file
with
22 additions
and
15 deletions
| ... | ... | @@ -31,7 +31,7 @@ |
| 31 | 31 | import { CreateContextOptions } from '/@/components/ContextMenu'; |
| 32 | 32 | |
| 33 | 33 | import { CheckEvent } from './typing'; |
| 34 | - import { LeftOutlined, RightOutlined } from '@ant-design/icons-vue'; | |
| 34 | + import { DoubleLeftOutlined, DoubleRightOutlined } from '@ant-design/icons-vue'; | |
| 35 | 35 | |
| 36 | 36 | interface State { |
| 37 | 37 | expandedKeys: Keys; |
| ... | ... | @@ -449,28 +449,21 @@ |
| 449 | 449 | |
| 450 | 450 | <Empty v-show={unref(getNotFound)} image={Empty.PRESENTED_IMAGE_SIMPLE} class="!mt-4" /> |
| 451 | 451 | <span |
| 452 | - class={['is-flod']} | |
| 453 | 452 | v-show={unref(isFlod)} |
| 454 | 453 | onClick={() => handleFlodOrUnFoldFunc(false)} |
| 455 | - style={ | |
| 456 | - isFlod.value | |
| 457 | - ? 'z-index:9999;cursor:pointer;position:absolute;top:40vh;left:17.5vw' | |
| 458 | - : 'z-index:9999;cursor:pointer;position:absolute;top:40vh;left:0.5vw' | |
| 459 | - } | |
| 454 | + class={['is-flod', unref(isFlod) ? 'fold-right' : 'fold-left']} | |
| 460 | 455 | > |
| 461 | - <RightOutlined /> | |
| 456 | + <DoubleLeftOutlined /> | |
| 462 | 457 | </span> |
| 463 | 458 | <span |
| 464 | - class={['is-unflod']} | |
| 465 | 459 | v-show={!unref(isFlod) && unref(treeDataRef).length != 0} |
| 466 | 460 | onClick={() => handleFlodOrUnFoldFunc(true)} |
| 467 | - style={ | |
| 468 | - isFlod.value | |
| 469 | - ? 'z-index:9999;cursor:pointer;position:absolute;top:40vh;left:17.5vw' | |
| 470 | - : 'z-index:9999;cursor:pointer;position:absolute;top:40vh;left:0.5vw' | |
| 471 | - } | |
| 461 | + class={[ | |
| 462 | + 'is-unflod', | |
| 463 | + !unref(isFlod) && unref(treeDataRef).length != 0 ? 'fold-left' : 'fold-right', | |
| 464 | + ]} | |
| 472 | 465 | > |
| 473 | - <LeftOutlined /> | |
| 466 | + <DoubleRightOutlined /> | |
| 474 | 467 | </span> |
| 475 | 468 | </div> |
| 476 | 469 | ); |
| ... | ... | @@ -479,6 +472,20 @@ |
| 479 | 472 | }); |
| 480 | 473 | </script> |
| 481 | 474 | <style lang="less"> |
| 475 | + .fold-left { | |
| 476 | + z-index: 9999; | |
| 477 | + cursor: pointer; | |
| 478 | + position: absolute; | |
| 479 | + top: 0.85rem; | |
| 480 | + left: 0.5vw; | |
| 481 | + } | |
| 482 | + .fold-right { | |
| 483 | + z-index: 9999; | |
| 484 | + cursor: pointer; | |
| 485 | + position: absolute; | |
| 486 | + top: 0.85rem; | |
| 487 | + left: 17.5vw; | |
| 488 | + } | |
| 482 | 489 | @prefix-cls: ~'@{namespace}-basic-tree'; |
| 483 | 490 | |
| 484 | 491 | .@{prefix-cls} { | ... | ... |