ph-utils 0.12.6 → 0.12.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/dom.d.ts CHANGED
@@ -33,6 +33,15 @@ export declare function create(tag: string, option?: {
33
33
  outerHTML?: string;
34
34
  [index: string]: any;
35
35
  }, ctx?: DocumentContext): HTMLElement;
36
+ /** 创建节点 */
37
+ export declare function $$(tag: string, option?: {
38
+ class?: FormatClassParam;
39
+ style?: FormatStyleParam;
40
+ textContent?: string;
41
+ innerHTML?: string;
42
+ outerHTML?: string;
43
+ [index: string]: any;
44
+ }, ctx?: DocumentContext): HTMLElement;
36
45
  /**
37
46
  * 根据选择器获取匹配的第一个 DOM 元素。
38
47
  * @param selector - 选择器字符串或直接的 HTMLElement。
package/lib/dom.js CHANGED
@@ -67,6 +67,10 @@ export function create(tag, option = {}, ctx) {
67
67
  }
68
68
  return $el;
69
69
  }
70
+ /** 创建节点 */
71
+ export function $$(tag, option = {}, ctx) {
72
+ return create(tag, option, ctx);
73
+ }
70
74
  /**
71
75
  * 根据选择器获取匹配的第一个 DOM 元素。
72
76
  * @param selector - 选择器字符串或直接的 HTMLElement。
package/package.json CHANGED
@@ -68,7 +68,7 @@
68
68
  },
69
69
  "./*": "./lib/*"
70
70
  },
71
- "version": "0.12.6",
71
+ "version": "0.12.7",
72
72
  "type": "module",
73
73
  "repository": {
74
74
  "type": "git",