mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-23 01:50:12 +01:00
This commit is contained in:
parent
4aa55f7b27
commit
bc65438225
5 changed files with 11 additions and 66 deletions
|
|
@ -60,10 +60,6 @@
|
||||||
--b3-tooltips-second-color: #7d7c7a;
|
--b3-tooltips-second-color: #7d7c7a;
|
||||||
--b3-tooltips-shadow: 0 2px 8px rgba(0, 0, 0, .1);
|
--b3-tooltips-shadow: 0 2px 8px rgba(0, 0, 0, .1);
|
||||||
|
|
||||||
/* av */
|
|
||||||
--b3-av-hover: #e8e8e9;
|
|
||||||
--b3-av-background-hl: #e8eefc;
|
|
||||||
|
|
||||||
/* 为空提示 */
|
/* 为空提示 */
|
||||||
--b3-empty-color: var(--b3-theme-on-surface-light);
|
--b3-empty-color: var(--b3-theme-on-surface-light);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -59,10 +59,6 @@
|
||||||
--b3-tooltips-second-color: #7d7c7a;
|
--b3-tooltips-second-color: #7d7c7a;
|
||||||
--b3-tooltips-shadow: 0 2px 8px rgba(0, 0, 0, .3);
|
--b3-tooltips-shadow: 0 2px 8px rgba(0, 0, 0, .3);
|
||||||
|
|
||||||
/* av */
|
|
||||||
--b3-av-hover: #2a2a2a;
|
|
||||||
--b3-av-background-hl: #28324e;
|
|
||||||
|
|
||||||
/* 为空提示 */
|
/* 为空提示 */
|
||||||
--b3-empty-color: var(--b3-theme-on-surface);
|
--b3-empty-color: var(--b3-theme-on-surface);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -143,7 +143,7 @@
|
||||||
&--hl {
|
&--hl {
|
||||||
&:not(.av__row--header) .av__cell,
|
&:not(.av__row--header) .av__cell,
|
||||||
&:not(.av__row--header) .av__firstcol {
|
&:not(.av__row--header) .av__firstcol {
|
||||||
background-color: var(--b3-av-background-hl) !important;
|
background-color: var(--b3-theme-primary-lightest);
|
||||||
}
|
}
|
||||||
|
|
||||||
.av__firstcol svg {
|
.av__firstcol svg {
|
||||||
|
|
@ -177,10 +177,6 @@
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.av__colsticky {
|
|
||||||
background-color: var(--b3-parent-background); // 保证盯住时无计算结果的列不被覆盖
|
|
||||||
}
|
|
||||||
|
|
||||||
.av__calc {
|
.av__calc {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
@ -220,7 +216,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
background-color: var(--b3-av-hover);
|
background-color: var(--b3-list-hover);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -236,7 +232,7 @@
|
||||||
|
|
||||||
&:hover,
|
&:hover,
|
||||||
&:focus {
|
&:focus {
|
||||||
background-color: var(--b3-av-hover);
|
background-color: var(--b3-list-hover);
|
||||||
box-shadow: none;
|
box-shadow: none;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -302,13 +298,13 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
&--select {
|
&--select {
|
||||||
background-color: var(--b3-menu-background);
|
background-color: var(--b3-theme-primary-lightest);
|
||||||
box-shadow: 2px 2px 0 var(--b3-theme-primary-lighter) inset, -2px -2px 0 var(--b3-theme-primary-lighter) inset;
|
box-shadow: 2px 2px 0 var(--b3-theme-primary-lighter) inset, -2px -2px 0 var(--b3-theme-primary-lighter) inset;
|
||||||
border-radius: var(--b3-border-radius);
|
border-radius: var(--b3-border-radius);
|
||||||
}
|
}
|
||||||
|
|
||||||
&--active {
|
&--active {
|
||||||
background-color: var(--b3-menu-background);
|
background-color: var(--b3-theme-primary-lightest);
|
||||||
}
|
}
|
||||||
|
|
||||||
&--header {
|
&--header {
|
||||||
|
|
@ -319,7 +315,7 @@
|
||||||
border-right-color: transparent;
|
border-right-color: transparent;
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
background-color: var(--b3-av-hover);
|
background-color: var(--b3-list-hover);
|
||||||
}
|
}
|
||||||
|
|
||||||
.av__celltext {
|
.av__celltext {
|
||||||
|
|
@ -434,11 +430,7 @@
|
||||||
left: 0;
|
left: 0;
|
||||||
z-index: 2; // 需大于 av__widthdrag,否则横行滚动后,拖拽会悬浮于 stick 列上
|
z-index: 2; // 需大于 av__widthdrag,否则横行滚动后,拖拽会悬浮于 stick 列上
|
||||||
display: flex;
|
display: flex;
|
||||||
|
background-color: var(--b3-parent-background);
|
||||||
&.av__firstcol,
|
|
||||||
& > div:not(.av__cell--select):not(.av__cell--active):not(.av__calc--ashow) {
|
|
||||||
background-color: var(--b3-parent-background);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
&__widthdrag {
|
&__widthdrag {
|
||||||
|
|
@ -531,45 +523,6 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.protyle-wysiwyg--select {
|
|
||||||
.av__row--header,
|
|
||||||
.av__row--footer,
|
|
||||||
.av__row--footer .av__colsticky,
|
|
||||||
.av__row--select .av__cell,
|
|
||||||
.av__colsticky.av__firstcol,
|
|
||||||
.av__colsticky > div,
|
|
||||||
.av__cell--select,
|
|
||||||
.av__cell--active,
|
|
||||||
.av__counter {
|
|
||||||
background-color: var(--b3-av-background-hl) !important;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.protyle-wysiwyg--hl {
|
|
||||||
.av__row--header,
|
|
||||||
.av__row--footer,
|
|
||||||
.av__row--footer .av__colsticky,
|
|
||||||
.av__row--select .av__cell,
|
|
||||||
.av__colsticky.av__firstcol,
|
|
||||||
.av__colsticky > div,
|
|
||||||
.av__cell--select,
|
|
||||||
.av__cell--active,
|
|
||||||
.av__counter {
|
|
||||||
background-color: var(--b3-av-background-hl) !important;
|
|
||||||
transition: var(--b3-background-transition);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.dragover__top,
|
|
||||||
.dragover__bottom {
|
|
||||||
.av__colsticky {
|
|
||||||
&.av__firstcol,
|
|
||||||
& > div:not(.av__cell--select):not(.av__cell--active):not(.av__calc--ashow) {
|
|
||||||
background-color: transparent;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
img.av__cellassetimg {
|
img.av__cellassetimg {
|
||||||
max-height: calc(1.625em - 2px);
|
max-height: calc(1.625em - 2px);
|
||||||
border-radius: var(--b3-border-radius);
|
border-radius: var(--b3-border-radius);
|
||||||
|
|
|
||||||
|
|
@ -94,7 +94,7 @@ export const avRender = (element: Element, protyle: IProtyle, cb?: () => void, v
|
||||||
e.dataset.pageSize = data.pageSize.toString();
|
e.dataset.pageSize = data.pageSize.toString();
|
||||||
}
|
}
|
||||||
// header
|
// header
|
||||||
let tableHTML = '<div class="av__row av__row--header"><div class="av__firstcol av__colsticky"><svg><use xlink:href="#iconUncheck"></use></svg></div>';
|
let tableHTML = '<div class="av__row av__row--header"><div class="av__colsticky"><div class="av__firstcol"><svg><use xlink:href="#iconUncheck"></use></svg></div></div>';
|
||||||
let calcHTML = "";
|
let calcHTML = "";
|
||||||
let pinIndex = -1;
|
let pinIndex = -1;
|
||||||
let pinMaxIndex = -1;
|
let pinMaxIndex = -1;
|
||||||
|
|
@ -169,7 +169,7 @@ style="width: ${column.width || "200px"}">${getCalcValue(column) || '<svg><use x
|
||||||
if (pinIndex > -1) {
|
if (pinIndex > -1) {
|
||||||
tableHTML += '<div class="av__colsticky"><div class="av__firstcol"><svg><use xlink:href="#iconUncheck"></use></svg></div>';
|
tableHTML += '<div class="av__colsticky"><div class="av__firstcol"><svg><use xlink:href="#iconUncheck"></use></svg></div>';
|
||||||
} else {
|
} else {
|
||||||
tableHTML += '<div class="av__firstcol av__colsticky"><svg><use xlink:href="#iconUncheck"></use></svg></div>';
|
tableHTML += '<div class="av__colsticky"><div class="av__firstcol"><svg><use xlink:href="#iconUncheck"></use></svg></div></div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
row.cells.forEach((cell, index) => {
|
row.cells.forEach((cell, index) => {
|
||||||
|
|
|
||||||
|
|
@ -109,10 +109,10 @@ export const insertAttrViewBlockAnimation = (protyle: IProtyle, blockElement: El
|
||||||
if (blockElement.querySelector('.av__views [data-type="av-sort"]').classList.contains("block__icon--active")) {
|
if (blockElement.querySelector('.av__views [data-type="av-sort"]').classList.contains("block__icon--active")) {
|
||||||
previousElement = blockElement.querySelector(".av__row--util").previousElementSibling;
|
previousElement = blockElement.querySelector(".av__row--util").previousElementSibling;
|
||||||
}
|
}
|
||||||
let colHTML = '<div class="av__firstcol av__colsticky"><svg><use xlink:href="#iconUncheck"></use></svg></div>';
|
let colHTML = '<div class="av__colsticky"><div class="av__firstcol"><svg><use xlink:href="#iconUncheck"></use></svg></div></div>';
|
||||||
const pinIndex = previousElement.querySelectorAll(".av__colsticky .av__cell").length - 1;
|
const pinIndex = previousElement.querySelectorAll(".av__colsticky .av__cell").length - 1;
|
||||||
if (pinIndex > -1) {
|
if (pinIndex > -1) {
|
||||||
colHTML = '<div class="av__colsticky"><div class="av__firstcol av__colsticky"><svg><use xlink:href="#iconUncheck"></use></svg></div>';
|
colHTML = '<div class="av__colsticky"><div class="av__firstcol"><svg><use xlink:href="#iconUncheck"></use></svg></div>';
|
||||||
}
|
}
|
||||||
previousElement.querySelectorAll(".av__cell").forEach((item: HTMLElement, index) => {
|
previousElement.querySelectorAll(".av__cell").forEach((item: HTMLElement, index) => {
|
||||||
let lineNumber = "";
|
let lineNumber = "";
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue