first commit
This commit is contained in:
11
20250916/ppt/js/utils.js
Normal file
11
20250916/ppt/js/utils.js
Normal file
@@ -0,0 +1,11 @@
|
||||
/** 简单工具 */
|
||||
export function el(selector, root = document) {
|
||||
return root.querySelector(selector);
|
||||
}
|
||||
export function els(selector, root = document) {
|
||||
return Array.from(root.querySelectorAll(selector));
|
||||
}
|
||||
|
||||
export function safeAssign(target, src) {
|
||||
return Object.assign({}, target, src);
|
||||
}
|
||||
Reference in New Issue
Block a user