123456789101112131415161718192021222324252627282930313233343536373839404142 |
- <template>
- <a
- class="scroll-top"
- href="javascript:;"
- @click="$emit('handleScrollTop')">
- <van-icon
- :color="'#333'"
- name="arrow-up"/>
- </a>
- </template>
- <script>
- import { Icon } from 'vant'
- export default {
- name: 'index',
- components: {
- 'van-icon': Icon
- }
- }
- </script>
- <style lang="scss" scoped>
- .scroll-top {
- position: absolute;
- bottom: 20px;
- right: 10px;
- z-index: 10;
- display: flex;
- justify-content: center;
- align-items: center;
- width: 50px;
- height: 50px;
- border-radius: 50%;
- background: #fff;
- box-shadow: 0 0 10px 0 #ccc;
- ::v-deep .van-icon {
- font-size: 30px;
- }
- }
- </style>
|