【问题标题】:Button attribute backgroundSize, backgroudRepeat, backgroundSize don't work按钮属性 backgroundSize、backgroudRepeat、backgroundSize 不起作用
【发布时间】:2019-07-23 15:24:09
【问题描述】:

我使用 nativescript-vue。 可以帮助我。 Button 属性:backgroundSizebackgroudRepeatbackgroundSize不起作用

<Button
backgroundRepeat="no-repeat" 
backgroundSize="contain"
backgroundPosition="center" 
 />

reproduce bug playground

但如果你通过类或样式属性设置它们,那么它就可以工作。

谢谢

【问题讨论】:

  • 它似乎有效,您期望的输出是什么?之间,使用Image 组件可能适合您正在加载的图像类型。

标签: nativescript nativescript-vue


【解决方案1】:

backgroundSize、backgroudRepeat 和 backgroundSize 不是按钮属性。如果检查Button 类,则只有background、backgroundColor 和backgroundImage 可用作属性。

您只能使用 CSS 设置它们。

【讨论】:

    猜你喜欢
    • 2023-03-19
    • 2012-02-20
    • 2014-11-09
    • 1970-01-01
    • 2019-09-05
    • 2014-03-05
    • 1970-01-01
    • 1970-01-01
    • 2011-04-06
    相关资源
    最近更新 更多