简体   繁体   English

无法设置组件的背景图像宽度和高度

[英]Unable to set background image width and height of component

I have a component that i am passing a slot to. 我有一个组件,我正在通过一个插槽。 I am also setting background image that works fine but when i try to set the size of backgorund image it don't work. 我也设置工作正常的背景图像但是当我尝试设置backgorund图像的大小时,它不起作用。 Here is what i have tried 这是我尝试过的

I have a draggable componengt that i am trying to set backgorund image background image get's set but the size don't work. 我有一个可拖动的组件,我试图设置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>

It should be backgroundSize with capital S 它应该是带资本S的backgroundSize

        <div
          class="filler"
          :style="{background:rect.color,backgroundSize: '30px' }"
        >{{rect.text}}{{rect.recipientname}}</div>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM