qcloud
V2EX  ›  问与答

toastr 的 toastr.options 自定义设置应该写在哪里?

  •  
  •   qcloud · Nov 20, 2016 · 1916 views
    This topic created in 3556 days ago, the information mentioned may be changed or developed.

    http://codeseven.github.io/toastr/demo.html

    需要一些自定义的样式,但是不知道在哪里调用这个设置,是调用一个文件吗?还是直接在源代码中写?

    3 replies    2016-11-21 16:53:08 +08:00
    stiekel
        1
    stiekel  
       Nov 21, 2016   ❤️ 1
    先在项目里引用 toastr 的主文件,然后调接使用 toastr.option 就行了。
    qcloud
        2
    qcloud  
    OP
       Nov 21, 2016
    @stiekel 然后调接使用 toastr.option 就行了,这个 toastr.option 是需要写在每个 toastr 后面吗?
    stiekel
        3
    stiekel  
       Nov 21, 2016   ❤️ 1
    @qcloud 不用,全局有效。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5439 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 01:24 · PVG 09:24 · LAX 18:24 · JFK 21:24
    ♥ Do have faith in what you're doing.