Skip to content

Commit 123e8cb

Browse files
committed
添加重置按钮
1 parent aa4f652 commit 123e8cb

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

src/components/graph.vue

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<template>
22
<div id="graphRender" ref="plotRef"></div>
3+
<button id="refresh" @click="emit('requireFullUpdate')">重置</button>
34
</template>
45

56
<script setup lang="ts">
@@ -73,4 +74,24 @@ onMounted(async () => {
7374
.top-right-legend {
7475
display: none;
7576
}
77+
78+
#refresh {
79+
color: var(--c-text);
80+
padding: 6px 10px;
81+
border: none;
82+
background: var(--c-bk3);
83+
border-radius: 5px;
84+
opacity: 0.75;
85+
border: var(--c-border) 1px solid;
86+
position: absolute;
87+
top: 25px;
88+
right: 25px;
89+
}
90+
#refresh:hover {
91+
opacity: 1;
92+
}
93+
#refresh:active {
94+
opacity: 1;
95+
filter: brightness(0.5);
96+
}
7697
</style>

0 commit comments

Comments
 (0)