[英]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.