tiny-vue/examples/sites/demos/pc/app/button/image.vue

35 lines
552 B
Vue

<template>
<tiny-button class="demo-button">
<img :src="image" width="26" />
<span>图片按钮</span>
</tiny-button>
</template>
<script>
import { Button } from '@opentiny/vue'
export default {
components: {
TinyButton: Button
},
data() {
return {
image: `${import.meta.env.VITE_APP_BUILD_BASE_URL}static/images/email.png`
}
}
}
</script>
<style>
.demo-button img {
width: 16px;
height: 16px;
margin-right: 8px;
border-radius: 2px;
}
.demo-button span {
height: 16px;
line-height: 16px;
}
</style>