You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
536 B
Plaintext
22 lines
536 B
Plaintext
/**
|
|
* @description 获取子元素的 JSON 格式数据
|
|
* @author wangfupeng
|
|
*/
|
|
import { DomElement } from '../utils/dom-core';
|
|
declare type AttrType = {
|
|
name: string;
|
|
value: string;
|
|
};
|
|
export declare type NodeType = {
|
|
tag: string;
|
|
attrs: AttrType[];
|
|
children: NodeListType;
|
|
};
|
|
export declare type NodeListType = Array<string | NodeType>;
|
|
/**
|
|
* 获取子元素的 JSON 格式数据
|
|
* @param $elem DOM 节点
|
|
*/
|
|
declare function getChildrenJSON($elem: DomElement): NodeListType;
|
|
export default getChildrenJSON;
|