UNPKG

vue-admin-core

Version:
19 lines (17 loc) 480 B
function parseHtml(elem) { const value = elem.getAttribute("data-value") || ""; const label = elem.getAttribute("data-label") || ""; return { type: "variable", value, label: label || elem.innerHTML, children: [{ text: "" }] // void node 必须有一个空白 text }; } const parseHtmlConf = { selector: "span[data-w-e-type='variable']", parseElemHtml: parseHtml }; export { parseHtmlConf as default }; //# sourceMappingURL=parse-elem-html.mjs.map