wangrong
2026-08-30 4c949c0dc9bcae785c281c9d8125295f09810b15
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
<script lang="ts" setup>
import icon_left_outlined from '@/assets/svg/icon_left_outlined.svg'
import icon_right_outlined from '@/assets/svg/icon_right_outlined.svg'
import { useAppStoreWithOut } from '@/store/modules/app'
const appStore = useAppStoreWithOut()
defineProps({
  isInside: {
    type: Boolean,
    default: false
  }
})
const emits = defineEmits(['changeSideTreeStatus'])
const handleClick = val => {
  appStore.setArrowSide(val)
  emits('changeSideTreeStatus', val)
}
</script>
 
<template>
  <div
    @click="handleClick(false)"
    v-if="appStore.getArrowSide && !isInside"
    class="arrow-side-tree arrow-side-tree-left"
  >
    <el-icon>
      <Icon name="icon_left_outlined"><icon_left_outlined class="svg-icon" /></Icon>
    </el-icon>
  </div>
  <div
    @click="handleClick(true)"
    v-else-if="!appStore.getArrowSide && isInside"
    class="arrow-side-tree arrow-side-tree-right"
  >
    <el-icon>
      <Icon name="icon_right_outlined"><icon_right_outlined class="svg-icon" /></Icon>
    </el-icon>
  </div>
</template>
 
<style lang="less" scoped>
.arrow-side-tree-left {
  top: 44px;
  height: 24px;
  width: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0px 5px 10px 0px #1f23291a;
}
 
.arrow-side-tree-right {
  box-shadow: 0px 4px 8px 0px #0000001a;
  top: 44px;
  height: 24px;
  width: 20px;
  display: flex;
  align-items: center;
  padding-left: 2px;
  border-top-right-radius: 12px;
  border-bottom-right-radius: 12px;
  &:hover {
    padding-left: 4px;
    width: 24px;
  }
}
 
.arrow-side-tree {
  position: absolute;
  border: 1px solid #dee0e3;
  background: #fff;
  cursor: pointer;
  z-index: 10;
  &:hover {
    .ed-icon {
      color: var(--ed-color-primary);
    }
  }
  .ed-icon {
    font-size: 12px;
  }
}
</style>