Giter Club home page Giter Club logo

Comments (6)

listenzz avatar listenzz commented on June 7, 2024

热更新无法解决这个问题吗?

节日图片是通过什么方式下发?

from hybrid-navigation.

VictorYuan666 avatar VictorYuan666 commented on June 7, 2024

热更新可以但是我想通过接口去获取图片地址

from hybrid-navigation.

listenzz avatar listenzz commented on June 7, 2024

@VictorYuan666

this.props.garden.replaceTabIcon(index, icon, inactiveIcon)

提供这样的 api 能满足你的需求吗?

from hybrid-navigation.

VictorYuan666 avatar VictorYuan666 commented on June 7, 2024

可以的 这个icon可以是require的image也可以是url或是iconfont的name的吧?

from hybrid-navigation.

listenzz avatar listenzz commented on June 7, 2024

和在 tabItem 可配项中的 icon 一样,是一个包含 uri 的对象

from hybrid-navigation.

listenzz avatar listenzz commented on June 7, 2024

已添加 garden.replaceTabIcon(index, icon, inactiveIcon) 可以在 Options 这个 tab 的 最后一个条目 replace tab icon 体验

replaceTabIcon() {
    this.props.garden.replaceTabIcon(
      1,
      { uri: 'blue_solid', scale: PixelRatio.get() }
      // { uri: 'red_ring', scale: PixelRatio.get() }
    );
  }

uri 可以是 file:// 这样的格式,指向 icon 的本地缓存

建议先把 icon 缓存到本地,然后再调用此方法

from hybrid-navigation.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.