Skip to content

Commit

Permalink
docs(button): [button] update image button demo
Browse files Browse the repository at this point in the history
  • Loading branch information
kagol committed Oct 29, 2024
1 parent f6f512f commit 5733029
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 7 deletions.
6 changes: 3 additions & 3 deletions examples/sites/demos/pc/app/button/image-composition-api.vue
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
<template>
<tiny-button class="demo-button">
<img :src="image" width="26" />
<img :src="image" />
<span>图片按钮</span>
</tiny-button>
</template>

<script setup>
import { TinyButton } from '@opentiny/vue'
const image = `${import.meta.env.VITE_APP_BUILD_BASE_URL}static/images/email.png`
const image = `${import.meta.env.VITE_APP_BUILD_BASE_URL}static/images/button-image.png`
</script>
<style>
<style scoped>
.demo-button img {
width: 16px;
height: 16px;
Expand Down
6 changes: 3 additions & 3 deletions examples/sites/demos/pc/app/button/image.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<tiny-button class="demo-button">
<img :src="image" width="26" />
<img :src="image" />
<span>图片按钮</span>
</tiny-button>
</template>
Expand All @@ -14,13 +14,13 @@ export default {
},
data() {
return {
image: `${import.meta.env.VITE_APP_BUILD_BASE_URL}static/images/email.png`
image: `${import.meta.env.VITE_APP_BUILD_BASE_URL}static/images/button-image.png`
}
}
}
</script>
<style>
<style scoped>
.demo-button img {
width: 16px;
height: 16px;
Expand Down
Binary file modified examples/sites/public/static/images/button-image.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed examples/sites/public/static/images/email.png
Binary file not shown.
3 changes: 2 additions & 1 deletion packages/theme/src/button/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
.@{button-prefix-cls} {
.inject-Button-vars();

display: inline-block;
display: inline-flex;
align-items: center;
appearance: none;
text-align: center;
white-space: nowrap;
Expand Down

0 comments on commit 5733029

Please sign in to comment.