例子为:"返回首页"按钮
<template>
<div class="backHome" @click="getBackHome" @touchstart="start" @touchmove.prevent="move" @touchend="end" ref="dragRef" style=
"width: 1.28rem;
height: 1.28rem;
position: absolute;
z-index: 999;
right: 15px;
bottom: 85px;">
</div>
</template>
<style lang="less" scoped>
.backHome{
background: url(https://ss1.bdstatic.com/70cFvXSh_Q1YnxGkpoWK1HF6hhy/it/u=2844600277,3862327726&fm=26&gp=0.jpg) no-repeat;
background-size: 100%;
-webkit-touch-callout: none;
}
</style>
<script>
export default {
name: 'backHome',
data () {
return {
position: {
x: 0, y: 0 }