[英]Unable to set background image width and height of component
我有一个组件,我正在通过一个插槽。 我也设置工作正常的背景图像但是当我尝试设置backgorund图像的大小时,它不起作用。 这是我尝试过的
我有一个可拖动的组件,我试图设置backgorund图像背景图像得到的设置,但大小不起作用。
<VueDragResize
v-for="(rect, index) in rects"
:key="index"
:w="rect.width"
:h="rect.height"
:x="rect.left"
:y="rect.top"
:parentW="listWidth"
:parentH="listHeight"
:axis="rect.axis"
:isActive="rect.active"
:minw="rect.minw"
:minh="rect.minh"
:isDraggable="rect.draggable"
:isResizable="rect.resizable"
:parentLimitation="rect.parentLim"
:snapToGrid="rect.snapToGrid"
:aspectRatio="rect.aspectRatio"
:z="rect.zIndex"
v-on:activated="activateEv(index)"
v-on:deactivated="deactivateEv(index)"
v-on:dragging="changePosition($event, index)"
v-on:resizing="changeSize($event, index)"
@click.native="getindex(index)"
>
<div
class="filler"
:style="{background:rect.color,backgroundsize: '30px' }"
>{{rect.text}}{{rect.recipientname}}</div>
</VueDragResize>
它应该是带资本S的backgroundSize
<div
class="filler"
:style="{background:rect.color,backgroundSize: '30px' }"
>{{rect.text}}{{rect.recipientname}}</div>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.