41 lines
892 B
JavaScript
Raw Normal View History

2024-11-05 22:43:34 +08:00
"use strict";
define(function (require, exports, module) {
console.log(("import common"))
class Node {
#id;
#source;
#innerStyleList;
constructor(nodeId, start, end, source, type = "yxu_p") {
this.#id = nodeId;
this.#source = source;
this.type = type;
this.start = start;
this.end = end;
this.collpseChildren = false;
//样式数组 [{"k1":"v1","k2":"k2"},{}]
this.#innerStyleList = [];
}
getNodeId() {
return this.#id;
}
getInnerStyleList() {
return this.#innerStyleList;
}
updateInnerStyleList(styleList) {
this.#innerStyleList = styleList;
}
updateSource(source) {
this.source = source;
}
}
module.exports = Node;
})