UNPKG
@mdui/jq
Version:
latest (3.0.3)
3.0.3
3.0.2
3.0.1
3.0.0
拥有和 jQuery 相似 API 的轻量级 JavaScript 工具库
github.com/zdhxiong/mdui
zdhxiong/mdui
@mdui/jq
/
methods
/
extend.js
10 lines
(9 loc)
•
296 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
import
{ $ }
from
'../$.js'
;
import
{ eachObject }
from
'../shared/helper.js'
; $.fn.
extend
=
function
(
obj
) {
eachObject
(obj,
(
prop, value
) =>
{
// 在 JQ 对象上扩展方法时,需要自己添加 typescript 的类型定义
$.fn[prop] = value; });
return
this
; };