mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-23 18:10:12 +01:00
🎨编辑器动态加载块数由定值改为可配置 https://github.com/siyuan-note/siyuan/issues/6415
This commit is contained in:
parent
41d0fa9257
commit
7aad51499b
2 changed files with 6 additions and 6 deletions
|
|
@ -179,7 +179,7 @@ export const editor = {
|
||||||
<div class="b3-label__text">${window.siyuan.languages.dynamicLoadBlocksTip}</div>
|
<div class="b3-label__text">${window.siyuan.languages.dynamicLoadBlocksTip}</div>
|
||||||
</div>
|
</div>
|
||||||
<span class="fn__space"></span>
|
<span class="fn__space"></span>
|
||||||
<input class="b3-text-field fn__flex-center fn__size200" id="dynamicLoadBlocks" type="number" min="128" max="1024" value="${window.siyuan.config.editor.dynamicLoadBlocks}"/>
|
<input class="b3-text-field fn__flex-center fn__size200" id="dynamicLoadBlocks" type="number" min="48" max="1024" value="${window.siyuan.config.editor.dynamicLoadBlocks}"/>
|
||||||
</label>
|
</label>
|
||||||
<label class="fn__flex b3-label">
|
<label class="fn__flex b3-label">
|
||||||
<div class="fn__flex-1">
|
<div class="fn__flex-1">
|
||||||
|
|
@ -262,9 +262,9 @@ export const editor = {
|
||||||
|
|
||||||
const setEditor = () => {
|
const setEditor = () => {
|
||||||
let dynamicLoadBlocks = parseInt((editor.element.querySelector("#dynamicLoadBlocks") as HTMLInputElement).value);
|
let dynamicLoadBlocks = parseInt((editor.element.querySelector("#dynamicLoadBlocks") as HTMLInputElement).value);
|
||||||
if (128 > dynamicLoadBlocks) {
|
if (48 > dynamicLoadBlocks) {
|
||||||
dynamicLoadBlocks = 128;
|
dynamicLoadBlocks = 48;
|
||||||
(editor.element.querySelector("#dynamicLoadBlocks") as HTMLInputElement).value = "128";
|
(editor.element.querySelector("#dynamicLoadBlocks") as HTMLInputElement).value = "48";
|
||||||
}
|
}
|
||||||
if (1024 < dynamicLoadBlocks) {
|
if (1024 < dynamicLoadBlocks) {
|
||||||
dynamicLoadBlocks = 1024;
|
dynamicLoadBlocks = 1024;
|
||||||
|
|
|
||||||
|
|
@ -257,8 +257,8 @@ func InitConf() {
|
||||||
if 1 > Conf.Editor.HistoryRetentionDays {
|
if 1 > Conf.Editor.HistoryRetentionDays {
|
||||||
Conf.Editor.HistoryRetentionDays = 7
|
Conf.Editor.HistoryRetentionDays = 7
|
||||||
}
|
}
|
||||||
if 128 > Conf.Editor.DynamicLoadBlocks {
|
if 48 > Conf.Editor.DynamicLoadBlocks {
|
||||||
Conf.Editor.DynamicLoadBlocks = 128
|
Conf.Editor.DynamicLoadBlocks = 48
|
||||||
}
|
}
|
||||||
if 1024 < Conf.Editor.DynamicLoadBlocks {
|
if 1024 < Conf.Editor.DynamicLoadBlocks {
|
||||||
Conf.Editor.DynamicLoadBlocks = 1024
|
Conf.Editor.DynamicLoadBlocks = 1024
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue