mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-05-06 09:20:29 +08:00
🚨
This commit is contained in:
parent
9e57253528
commit
b27460fe90
@ -352,7 +352,7 @@ export class Files extends Model {
|
||||
selectElements.forEach((item: HTMLElement, index) => {
|
||||
ghostElement.append(item.cloneNode(true));
|
||||
item.style.opacity = "0.1";
|
||||
const itemNodeId = item.getAttribute("data-node-id") || ""
|
||||
const itemNodeId = item.getAttribute("data-node-id") || "";
|
||||
if (itemNodeId) {
|
||||
ids += itemNodeId;
|
||||
if (index < selectElements.length - 1) {
|
||||
|
@ -3,7 +3,7 @@ import {shell} from "electron";
|
||||
/// #endif
|
||||
import {confirmDialog} from "../dialog/confirmDialog";
|
||||
import {getSearch, isMobile, isValidAttrName} from "../util/functions";
|
||||
import {isLocalPath, movePathTo, moveToPath, pathPosix, setNotebookName} from "../util/pathName";
|
||||
import {isLocalPath, movePathTo, moveToPath, pathPosix} from "../util/pathName";
|
||||
import {MenuItem} from "./Menu";
|
||||
import {saveExport} from "../protyle/export";
|
||||
import {openByMobile, writeText} from "../protyle/util/compatibility";
|
||||
@ -319,7 +319,7 @@ const genAttr = (attrs: IObject, focusName = "bookmark") => {
|
||||
});
|
||||
btnsElement[1].addEventListener("click", () => {
|
||||
if (!isValidAttrName(inputElement.value)) {
|
||||
showMessage(window.siyuan.languages.attrName + " <b>" + inputElement.value + "</b> " + window.siyuan.languages.invalid)
|
||||
showMessage(window.siyuan.languages.attrName + " <b>" + inputElement.value + "</b> " + window.siyuan.languages.invalid);
|
||||
return false;
|
||||
}
|
||||
target.parentElement.insertAdjacentHTML("beforebegin", `<div class="b3-label b3-label--noborder">
|
||||
|
@ -264,25 +264,25 @@ export const renderAVAttribute = (element: HTMLElement, id: string) => {
|
||||
element.innerHTML = html;
|
||||
element.querySelectorAll(".b3-text-field--text").forEach((item: HTMLInputElement) => {
|
||||
item.addEventListener("change", () => {
|
||||
let value
|
||||
let value;
|
||||
if (item.parentElement.dataset.type === "url") {
|
||||
value = {
|
||||
url: {
|
||||
content: item.value
|
||||
}
|
||||
}
|
||||
};
|
||||
} else if (item.parentElement.dataset.type === "text") {
|
||||
value = {
|
||||
text: {
|
||||
content: item.value
|
||||
}
|
||||
}
|
||||
};
|
||||
} else if (item.parentElement.dataset.type === "number") {
|
||||
value = {
|
||||
number: {
|
||||
content: parseFloat(item.value)
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
fetchPost("/api/av/setAttributeViewBlockAttr", {
|
||||
avID: item.parentElement.dataset.avId,
|
||||
@ -290,8 +290,8 @@ export const renderAVAttribute = (element: HTMLElement, id: string) => {
|
||||
rowID: item.parentElement.dataset.blockId,
|
||||
cellID: id,
|
||||
value
|
||||
})
|
||||
})
|
||||
})
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user