正常直接console dom节点
代码改成
javascript
var parser = new DOMParser();
var docDom = parser.parseFromString(testHtml, 'text/html');
console.log(docDom)
let htmlHeader = ref< HTMLElement | null>(null)
let htmlBoby = ref< HTMLElement | null>(null)
htmlHeader.value = docDom.head
htmlBoby.value = docDom.body
// console.log([htmlHeader.value])
console.log([htmlBoby.value])