12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- <script setup>
- import { ref } from "vue";
- const x = ref(0);
- const y = ref(0);
- const onClick = () => {
- console.log(111);
- };
- </script>
- <template>
- <movable-area style="width: 112rpx">
- <movable-view
- :x="x"
- :y="y"
- direction="all"
- @change="onChange"
- class="contact"
- ><image class="contact-img" @click="onClick"></image
- ></movable-view>
- </movable-area>
- </template>
- <style lang="scss" scoped>
- @import "@/uni.scss";
- .contact {
- color: $uni-primary;
- font-size: 28rpx;
- background: transparent;
- padding: 0;
- margin: 0;
- &::after {
- border: 0; // 或者 border: none;
- }
- .contact-img {
- background: url("https://openwork-oss.oss-cn-shenzhen.aliyuncs.com/uploads/question/2025/05/jWjoCzJjk3DqjcGpHoJXYAUU5MXykAyWjF2UGgGO.png")
- no-repeat center center;
- background-size: cover;
- width: 144rpx;
- height: 150rpx;
- }
- }
- </style>
|