e1ae2c6
1
2
3
4
5
6
7
8
9
10
11
12
// 获取所有元素 module.exports = function getAllElements(type) { return Array.from(document.querySelectorAll(`[data-type="${type}"]`)).map((el) => { const id = this._getElementId(el); return { id: id, type: type, element: el, }; }); };