2023-06-28 19:25:11 +08:00
|
|
|
<template>
|
|
|
|
|
<div class="btn-with-switch-icon">
|
2023-07-11 19:35:18 +08:00
|
|
|
<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>
|
2023-07-11 19:35:18 +08:00
|
|
|
<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;
|
2023-07-11 19:35:18 +08:00
|
|
|
padding: 0 4px;
|
2023-06-28 19:25:11 +08:00
|
|
|
height: 100%;
|
|
|
|
|
letter-spacing: 1px;
|
|
|
|
|
color: #ade6ee;
|
|
|
|
|
|
2023-07-11 19:35:18 +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>
|