Skip to content

Commit

Permalink
改进添加字段按钮 的样式
Browse files Browse the repository at this point in the history
  • Loading branch information
TCOTC committed Nov 24, 2024
1 parent f5b8f4c commit 94d1898
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 2 deletions.
23 changes: 23 additions & 0 deletions app/src/assets/scss/business/_custom.scss
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,29 @@
}
}

.block__icons--addcolumn {
padding: 0 8px;

.b3-button[data-type="addColumn"] {
margin: 0 0 0 16px;
color: var(--b3-theme-on-surface);
background-color: rgba(0,0,0,0);

&:hover,
&:focus {
background-color: var(--b3-list-hover);
box-shadow: none;
}

svg {
padding: 4px;
}
}
span {
padding-right: 4px;
}
}

.b3-text-field--text {
transition: var(--b3-transition);
min-height: 34px;
Expand Down
4 changes: 2 additions & 2 deletions app/src/protyle/render/av/blockAttr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -192,10 +192,10 @@ data-options="${item.key?.options ? escapeAttr(JSON.stringify(item.key.options))
class="fn__flex-1 fn__flex${["url", "text", "number", "email", "phone"].includes(item.values[0].type) ? "" : ["block", "created", "updated"].includes(item.values[0].type) ? " custom-attr__avvalue--readonly" : " custom-attr__avvalue"}">${genAVValueHTML(item.values[0])}</div>
</div>`;
});
innerHTML += `<div class="fn__hr"></div>
innerHTML += `<div class="fn__hr block__icons--addcolumn"></div>
<div class="fn__flex">
<div class="fn__space"></div><div class="fn__space"></div>
<button data-type="addColumn" class="b3-button b3-button--outline"><svg><use xlink:href="#iconAdd"></use></svg>${window.siyuan.languages.newCol}</button>
<button data-type="addColumn" class="b3-button"><svg><use xlink:href="#iconAdd"></use></svg><span>${window.siyuan.languages.newCol}</span></button>
</div><div class="fn__hr--b"></div>`;
html += `<div data-av-id="${table.avID}" data-node-id="${id}" data-type="NodeAttributeView">${innerHTML}</div>`;

Expand Down

0 comments on commit 94d1898

Please sign in to comment.