You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
app-grassland/components/image-button.vue

47 lines
639 B

<template>
<button type="default" @click="btnClick" class="btn" :class="className">
<image :src="imgSrc" class="btn-img" />
</button>
</template>
<script>
export default {
name: "image-button",
props: {
click: Function,
imgSrc: String,
className: String
},
data() {
return {
};
},
methods: {
btnClick(e) {
this.$emit('click', e);
}
}
}
</script>
<style scoped>
.map {
height: 100vh;
}
.btn {
width: 48px;
height: 48px;
border-radius: 10px;
display: flex;
align-items: center;
padding: 0;
justify-content: center;
}
.btn-img {
width: 32px;
height: 32px;
}
</style>