ailuoku6

react native 能动态设置样式吗?

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

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

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