| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- <template>
- <div class="icon" :title="title ? title : ''" @click="$emit('click')">
- <span>{{unicode}}</span>
- <ripple :color="ripple || ''"></ripple>
- </div>
- </template>
- <script>
- import Ripple from '@/components/Ripple'
- export default {
- components: { Ripple },
- props: ['unicode', 'title', 'ripple']
- }
- </script>
- <style lang="scss" scoped>
- @import '~@/style/theme.scss';
- .icon {
- position: relative;
- display: flex;
- align-items: center;
- justify-content: center;
- background: rgba(255, 255, 255, .8);
- padding: 8px;
- border-radius: 100px;
- min-width: 28px;
- min-height: 28px;
- width: 28px;
- height: 28px;
- user-select: none;
- cursor: pointer;
- text-align: center;
- font-family: 'iconfont', sans-serif;
- font-size: 0;
- color: $icon-normal-color;
- transition: all 0.2s;
- overflow: hidden;
- & > span {
- font-size: 24px;
- }
- &:hover {
- opacity: 0.8;
- background: white;
- }
- &:active {
- color: darken($icon-hover-color, 10);
- }
- }
- </style>
|