Skip to content

Commit

Permalink
label_control
Browse files Browse the repository at this point in the history
  • Loading branch information
zprobot committed Dec 23, 2023
1 parent 783795c commit 02fa821
Showing 1 changed file with 24 additions and 4 deletions.
28 changes: 24 additions & 4 deletions src/components/AeShow/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,25 @@
"
active-text="Bar"
inactive-text="Box"
@change = "changeShow"
@change = "changeShowBar"
/>
<el-switch
v-model="showLabel"
class="ml-2"
inline-prompt
v-show="showBar"
style="
--el-switch-on-color: #13ce66;
--el-switch-off-color: #ff4949;
position: absolute;
left: 5.5rem;
"
active-text="Show label"
inactive-text="Off label"
@change = "changeShowLabel"
/>
</div>

<!--tags-->
<div class="button-tag">
<el-tag v-for="(item,index) in proteinTags" :key="index" round closable :color="tagsColor[index]" @close="handleClose(item)">{{ item }}</el-tag>
Expand Down Expand Up @@ -54,6 +70,7 @@ let imgH = 500
// database
let proteinTable = []
const showBar = ref(false)
const showLabel = ref(false)
// component show
const showImg = ref(false)
// data history
Expand Down Expand Up @@ -334,7 +351,7 @@ const init = () => {
borderColor0: '#030609',
},
label: {
show: true,
show: showLabel.value,
position: 'right',
formatter: function () {
return `samples: ${samples.shift()}`
Expand Down Expand Up @@ -421,7 +438,7 @@ const init = () => {
borderColor0: '#030609',
},
label: {
show: true,
show: showLabel.value,
position: 'right',
formatter: function () {
return `samples: ${samples[index].shift()}`
Expand Down Expand Up @@ -540,7 +557,10 @@ const countSingleValue = (data, dimension) => {
}
//
const changeShow = () => {
const changeShowBar = () => {
init()
}
const changeShowLabel = () => {
init()
}
</script>
Expand Down

0 comments on commit 02fa821

Please sign in to comment.