🚨
This commit is contained in:
parent
e685629c02
commit
46282d22c4
7 changed files with 20 additions and 20 deletions
|
@ -921,7 +921,7 @@ export class Files extends Model {
|
|||
// 文件展开时,刷新
|
||||
liElement.nextElementSibling.remove();
|
||||
}
|
||||
const arrowElement = liElement.querySelector(".b3-list-item__arrow")
|
||||
const arrowElement = liElement.querySelector(".b3-list-item__arrow");
|
||||
arrowElement.classList.add("b3-list-item__arrow--open");
|
||||
arrowElement.parentElement.classList.remove("fn__hidden");
|
||||
liElement.insertAdjacentHTML("afterend", `<ul>${fileHTML}</ul>`);
|
||||
|
|
|
@ -4,7 +4,7 @@ import {upDownHint} from "../../../util/upDownHint";
|
|||
import {fetchPost} from "../../../util/fetch";
|
||||
import {escapeGreat, escapeHtml} from "../../../util/escape";
|
||||
import {transaction} from "../../wysiwyg/transaction";
|
||||
import {genCellValueByElement, updateCellsValue} from "./cell";
|
||||
import {updateCellsValue} from "./cell";
|
||||
import {updateAttrViewCellAnimation} from "./action";
|
||||
import {focusBlock} from "../../util/selection";
|
||||
import {setPosition} from "../../../util/setPosition";
|
||||
|
|
|
@ -51,7 +51,7 @@ export const avRender = (element: Element, protyle: IProtyle, cb?: () => void, v
|
|||
if (rowId) {
|
||||
selectRowIds.push(rowId);
|
||||
}
|
||||
})
|
||||
});
|
||||
let selectCellId = "";
|
||||
const selectCellElement = e.querySelector(".av__cell--select") as HTMLElement;
|
||||
if (selectCellElement) {
|
||||
|
@ -146,7 +146,7 @@ style="width: ${column.width || "200px"};">
|
|||
style="width: ${column.width || "200px"}">${getCalcValue(column) || '<svg><use xlink:href="#iconDown"></use></svg>' + window.siyuan.languages.calc}</div>`;
|
||||
}
|
||||
if (column.calc && column.calc.operator !== "") {
|
||||
hasCalc = true
|
||||
hasCalc = true;
|
||||
}
|
||||
|
||||
if (pinIndex === index) {
|
||||
|
|
|
@ -108,9 +108,9 @@ export const insertAttrViewBlockAnimation = (protyle: IProtyle, blockElement: El
|
|||
colHTML = '<div class="av__colsticky"><div class="av__firstcol av__colsticky"><svg><use xlink:href="#iconUncheck"></use></svg></div>';
|
||||
}
|
||||
previousElement.querySelectorAll(".av__cell").forEach((item: HTMLElement, index) => {
|
||||
let lineNumber = ""
|
||||
let lineNumber = "";
|
||||
if (getTypeByCellElement(item) === "lineNumber") {
|
||||
const lineNumberValue = item.querySelector(".av__celltext")?.getAttribute("data-value")
|
||||
const lineNumberValue = item.querySelector(".av__celltext")?.getAttribute("data-value");
|
||||
if (lineNumberValue) {
|
||||
lineNumber = (parseInt(lineNumberValue) + 1).toString();
|
||||
}
|
||||
|
@ -168,40 +168,40 @@ ${getTypeByCellElement(item) === "block" ? ' data-detached="true"' : ""}><span c
|
|||
});
|
||||
}
|
||||
// 当空或非空外,需要根据值进行判断
|
||||
let isRenderValue = true
|
||||
let isRenderValue = true;
|
||||
if (item.operator !== "Is empty" && item.operator !== "Is not empty") {
|
||||
switch (item.value.type) {
|
||||
case "select":
|
||||
case "mSelect":
|
||||
if (!item.value.mSelect || item.value.mSelect.length === 0) {
|
||||
isRenderValue = false
|
||||
isRenderValue = false;
|
||||
}
|
||||
break;
|
||||
case "block":
|
||||
if (!item.value.block || !item.value.block.content) {
|
||||
isRenderValue = false
|
||||
isRenderValue = false;
|
||||
}
|
||||
break;
|
||||
case "number":
|
||||
if (!item.value.number || !item.value.number.isNotEmpty) {
|
||||
isRenderValue = false
|
||||
isRenderValue = false;
|
||||
}
|
||||
break;
|
||||
case "date":
|
||||
case "created":
|
||||
case "updated":
|
||||
if (!item.value[item.value.type] || !item.value[item.value.type].isNotEmpty) {
|
||||
isRenderValue = false
|
||||
isRenderValue = false;
|
||||
}
|
||||
break;
|
||||
case "mAsset":
|
||||
if (!item.value.mAsset || item.value.mAsset.length === 0) {
|
||||
isRenderValue = false
|
||||
isRenderValue = false;
|
||||
}
|
||||
break;
|
||||
case "checkbox":
|
||||
if (!item.value.checkbox) {
|
||||
isRenderValue = false
|
||||
isRenderValue = false;
|
||||
}
|
||||
break;
|
||||
case "text":
|
||||
|
@ -209,7 +209,7 @@ ${getTypeByCellElement(item) === "block" ? ' data-detached="true"' : ""}><span c
|
|||
case "phone":
|
||||
case "email":
|
||||
if (!item.value[item.value.type] || !item.value[item.value.type].content) {
|
||||
isRenderValue = false
|
||||
isRenderValue = false;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -652,7 +652,7 @@ export class Toolbar {
|
|||
let previousIsCTK = false;
|
||||
if (currentPreviousSibling) {
|
||||
if (currentPreviousSibling.nodeType === 1) {
|
||||
const currentPreviousSiblingTypes = currentPreviousSibling.dataset.type.split(" ")
|
||||
const currentPreviousSiblingTypes = currentPreviousSibling.dataset.type.split(" ");
|
||||
if (currentPreviousSiblingTypes.includes("code") || currentPreviousSiblingTypes.includes("tag") || currentPreviousSiblingTypes.includes("kbd")) {
|
||||
previousIsCTK = true;
|
||||
}
|
||||
|
@ -664,7 +664,7 @@ export class Toolbar {
|
|||
let nextIsCTK = false;
|
||||
if (currentNextSibling) {
|
||||
if (currentNextSibling.nodeType === 1) {
|
||||
const currentNextSiblingTypes = currentNextSibling.dataset.type.split(" ")
|
||||
const currentNextSiblingTypes = currentNextSibling.dataset.type.split(" ");
|
||||
if (currentNextSiblingTypes.includes("code") || currentNextSiblingTypes.includes("tag") || currentNextSiblingTypes.includes("kbd")) {
|
||||
nextIsCTK = true;
|
||||
}
|
||||
|
|
|
@ -169,5 +169,5 @@ export const getPadding = (protyle: IProtyle) => {
|
|||
}
|
||||
return {
|
||||
left, right, bottom, top: 16
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
||||
|
|
|
@ -45,7 +45,7 @@ export const removeBlock = (protyle: IProtyle, blockElement: Element, range: Ran
|
|||
let listElement: Element;
|
||||
let topParentElement: Element;
|
||||
hideElements(["select"], protyle);
|
||||
let foldPreviousId: string
|
||||
let foldPreviousId: string;
|
||||
selectElements.find((item: HTMLElement) => {
|
||||
const topElement = getTopAloneElement(item);
|
||||
topParentElement = topElement.parentElement;
|
||||
|
@ -75,7 +75,7 @@ export const removeBlock = (protyle: IProtyle, blockElement: Element, range: Ran
|
|||
if (topElement.getAttribute("data-type") === "NodeHeading" && topElement.getAttribute("fold") === "1") {
|
||||
// https://github.com/siyuan-note/siyuan/issues/2188
|
||||
setFold(protyle, topElement, undefined, true);
|
||||
let previousID = topElement.previousElementSibling ? topElement.previousElementSibling.getAttribute("data-node-id") : ""
|
||||
let previousID = topElement.previousElementSibling ? topElement.previousElementSibling.getAttribute("data-node-id") : "";
|
||||
if (typeof foldPreviousId !== "undefined") {
|
||||
previousID = foldPreviousId;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue