如何解决vuedraggable 背景使 div 不可拖动
我将 vuedraggable 添加到我正在制作的手机游戏中,人们可以在其中解读句子。到目前为止,它一直运作良好。我最近从精灵表向我的可拖动元素添加了背景图像,但现在我的可拖动元素不再可拖动。有没有人对为什么会发生这种行为有任何建议?
这是我的 Vue 模板
<template>
<div :key="verse" class="center">
<h2 v-if="message !== ''">{{ message }}</h2>
<div id="scriptureBackground">
<draggable
v-model="words"
class="drag-list"
:list="words"
animation="200"
ghost-class="moving-card"
>
<div
v-for="(value,index) in words"
:key="index"
@mousedown="playPress"
class="drag-word"
:style="stoneWord"
>
{{ value }}
</div>
</draggable>
</div>
<p :verse="verse" slot="footer" class="verse">- {{ verse }}</p>
</div>
</template>
stoneWord 是一个计算的
stoneWord: function() {
return {
background: `url(${this.icons}) -2722px -60px`,"background-repeat": "no-repeat",width: "885px",height: "400px",zoom: `0.1`,"-moz-transform": `scale(0.1)`,display: "flex","justify-content": "center","align-items": "center","font-size": `20vw`,"margin": "10px",};
},
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。