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

44 lines
802 B
Vue
Raw Normal View History

2023-06-28 19:25:11 +08:00
<template>
<div class="btn-with-switch-icon">
<img src="@/assets/images/spectrum/left-arrow.png" @click="handleClick('left')" />
<span>
<slot></slot>
</span>
<img src="@/assets/images/spectrum/right-arrow.png" @click="handleClick('right')" />
</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 12px;
height: 100%;
letter-spacing: 1px;
color: #ade6ee;
span {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
margin: 0 5px;
}
img {
cursor: pointer;
}
}
</style>