mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-17 15:10:12 +01:00
This commit is contained in:
parent
23c6d5d17b
commit
5acd3aae08
4 changed files with 26 additions and 10 deletions
|
|
@ -29,14 +29,16 @@ export const avRender = (element: Element) => {
|
|||
const data = response.data.av;
|
||||
// header
|
||||
let tableHTML = '<div class="av__row av__row--header"><div class="av__firstcol"><svg style="height: 42px"><use xlink:href="#iconUncheck"></use></svg></div>';
|
||||
let index = 0
|
||||
data.columns.forEach((column: IAVColumn) => {
|
||||
if (column.hidden) {
|
||||
return;
|
||||
}
|
||||
tableHTML += `<div class="av__cell" data-id="${column.id}" data-dtype="${column.type}" data-wrap="${column.wrap}" style="width: ${column.width || 200}px;">
|
||||
tableHTML += `<div class="av__cell" data-index="${index}" data-id="${column.id}" data-dtype="${column.type}" data-wrap="${column.wrap}" style="width: ${column.width || 200}px;">
|
||||
<svg><use xlink:href="#${column.icon || getIconByType(column.type)}"></use></svg>
|
||||
<span>${column.name}</span>
|
||||
</div>`;
|
||||
index++;
|
||||
});
|
||||
tableHTML += `<div class="block__icons">
|
||||
<div class="block__icon block__icon--show" data-type="av-header-add"><svg><use xlink:href="#iconAdd"></use></svg></div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue