Classname Operation
操作相关classname工具函数 1 2 3 4 5 6 7 8 9 10 11 // 增加目标class function addClass(target = '', srcCls = '') { const clss = target.split(/\s+/) return [...clss.filter(cls => !clss.includes(cls)), srcCls] } function removeClass(target = '', srcCls = '') { const clss = target.split(/\s+/) return [...clss.filter(cls
阅读全文
100 字