色婷婷狠狠18禁久久YY,CHINESE性内射高清国产,国产女人18毛片水真多1,国产AV在线观看

typescript怎么導入jquery

錢斌斌2年前9瀏覽0評論

typescript怎么導入jquery?

使用 typescript 寫 jQuery 插件

/// <reference path="jquery/jquery.d.ts" />

export class Carousel {

constructor(

public element: JQuery,

options?: CarouselOptions

) {

this.options = $.extend({}, CarouselDefaultOptions, options)

}

public options: CarouselOptions;

}

export interface CarouselOptions {

range?: number,

itemTag?: string,

boxTag?: string,

animationTime?: any,

animationMode?: string

}

/**

* 默認設置

*/

class CarouselDefaultOptions implements CarouselOptions {

itemTag: string = 'li';

boxTag: string = '.box';

animationTime: any = '1s';

animationMode: string = 'slow';

}