vue-admin-core
Version:
A Component Library for Vue 3
19 lines (17 loc) • 480 B
JavaScript
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