Heim  >  Fragen und Antworten  >  Hauptteil

javascript - 自己封装的base库,怎么写一个插件接口?

base库写了一个插件function drag(){},base在原型中要封装一个什么方法,以及要怎么把drag()引到base的方法中

PHP中文网PHP中文网2750 Tage vor315

Antworte allen(2)Ich werde antworten

  • 天蓬老师

    天蓬老师2017-04-10 15:30:39

    建议参考jquery,这些成熟框架的源码

    Antwort
    0
  • ringa_lee

    ringa_lee2017-04-10 15:30:39

    在他的原型链上添加。

    Antwort
    0
  • StornierenAntwort