输出改进

This commit is contained in:
codeboss 2024-05-27 19:53:36 +08:00
parent f0ed01bff6
commit 303cd26f19
1 changed files with 12 additions and 2 deletions

View File

@ -191,9 +191,19 @@ int main(int argc, char* argv[]) {
dom_fragment.appendChild(dom_fragment_title); dom_fragment.appendChild(dom_fragment_title);
body.appendChild(dom_fragment); body.appendChild(dom_fragment);
auto table_cube = doc_inst.createElement(u8"table");
dom_fragment.appendChild(table_cube);
int row_ctrl = 0;
QDomElement elm_row;
for (auto& inst_frag : tool.fragment_defines) { for (auto& inst_frag : tool.fragment_defines) {
auto dom_fragment_ref = doc_inst.createElement("p"); if(row_ctrl++ % 4 == 0){
dom_fragment.appendChild(dom_fragment_ref); elm_row = doc_inst.createElement(u8"tr");
table_cube.appendChild(elm_row);
}
auto dom_fragment_ref = doc_inst.createElement("td");
elm_row.appendChild(dom_fragment_ref);
auto frag_href = doc_inst.createElement("a"); auto frag_href = doc_inst.createElement("a");
frag_href.setAttribute(u8"href", u8"file:///" + inst_frag->pageRefers()); frag_href.setAttribute(u8"href", u8"file:///" + inst_frag->pageRefers());