ailuoku6

react native 能动态设置样式吗?

  •  
  •   ailuoku6 · Dec 24, 2018 · 4955 views
    This topic created in 2887 days ago, the information mentioned may be changed or developed.

    初学 react native,感觉好像样式什么的都是写死的,真的不能动态改变吗?

    5 replies  •  2018-12-24 18:37:39 +08:00
    IamJ
    IamJ
    Dec 24, 2018 via iPhone
    1
    可以,有行内样式
    geshansuiyue
    geshansuiyue
    Dec 24, 2018
    2
    可以的
    ailuoku6
    ailuoku6
    OP
    Dec 24, 2018
    3
    @IamJ 老哥能给个例子吗?感谢
    IamJ
    IamJ
    Dec 24, 2018 via iPhone
    4
    render 那里不是要返回模板吗,在模板的元素的 style 属性里写动态样式
    IamJ
    IamJ
    Dec 24, 2018 via iPhone
    5
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   1148 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 38ms · UTC 23:28 · PVG 07:28 · LAX 15:28 · JFK 18:28
    ♥ Do have faith in what you're doing.