AnalysisSystemForRadionucli.../src/views/spectrumAnalysis/components/SubOperators/ButtonWithSwitchIcon.vue

50 lines
880 B
Vue
Raw Normal View History

2023-06-28 19:25:11 +08:00
<template>
<div class="btn-with-switch-icon">
<i @click="handleClick('left')">
<img src="@/assets/images/spectrum/left-arrow.png" />
</i>
2023-06-28 19:25:11 +08:00
<span>
<slot></slot>
</span>
<i @click="handleClick('right')">
<img src="@/assets/images/spectrum/right-arrow.png" />
</i>
2023-06-28 19:25:11 +08:00
</div>
</template>
<script>
export default {
methods: {
handleClick(direction) {
this.$emit('change', direction)
}
}
}
</script>
<style lang="less" scoped>
.btn-with-switch-icon {
display: flex;
justify-content: space-between;
align-items: center;
border: 1px solid #0a544e;
padding: 0 4px;
2023-06-28 19:25:11 +08:00
height: 100%;
letter-spacing: 1px;
color: #ade6ee;
user-select: none;
2023-06-28 19:25:11 +08:00
i {
cursor: pointer;
width: 16px;
text-align: center;
}
2023-06-28 19:25:11 +08:00
span {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
}
</style>