mirror of
https://github.com/gedoor/legado.git
synced 2024-07-06 23:47:49 +08:00
web阅读增加翻页速度的设置项
This commit is contained in:
parent
8349fda250
commit
c1facb5f72
@ -138,6 +138,21 @@
|
||||
>
|
||||
</div>
|
||||
</li>
|
||||
<li class="paragraph-spacing">
|
||||
<i>翻页速度</i>
|
||||
<div class="resize">
|
||||
<div class="resize">
|
||||
<span class="less" @click="lessJumpDuration">
|
||||
<em class="iconfont"></em>
|
||||
</span>
|
||||
<b></b> <span class="lang">{{ jumpDuration }}</span
|
||||
><b></b>
|
||||
<span class="more" @click="moreJumpDuration"
|
||||
><em class="iconfont"></em></span
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li class="infinite-loading">
|
||||
<i>无限加载</i>
|
||||
<span
|
||||
@ -304,6 +319,18 @@ const lessReadWidth = () => {
|
||||
if (config.value.readWidth > 640) config.value.readWidth -= 160;
|
||||
saveConfig(config.value);
|
||||
};
|
||||
const jumpDuration = computed(() => {
|
||||
return store.config.jumpDuration;
|
||||
});
|
||||
const moreJumpDuration = () => {
|
||||
store.config.jumpDuration += 100;
|
||||
saveConfig(config.value);
|
||||
};
|
||||
const lessJumpDuration = () => {
|
||||
if (store.config.jumpDuration === 0) return;
|
||||
store.config.jumpDuration -= 100;
|
||||
saveConfig(config.value);
|
||||
};
|
||||
const infiniteLoading = computed(() => {
|
||||
return store.config.infiniteLoading;
|
||||
});
|
||||
|
@ -22,6 +22,7 @@ export const useBookStore = defineStore("book", {
|
||||
readWidth: 800,
|
||||
infiniteLoading: false,
|
||||
customFontName: "",
|
||||
jumpDuration: 1000,
|
||||
spacing: {
|
||||
paragraph: 1,
|
||||
line: 0.8,
|
||||
|
@ -425,7 +425,9 @@ const handleKeyPress = (event) => {
|
||||
type: "warn",
|
||||
});
|
||||
} else {
|
||||
jump(0 - document.documentElement.clientHeight + 100);
|
||||
jump(0 - document.documentElement.clientHeight + 100, {
|
||||
duration: store.config.jumpDuration,
|
||||
});
|
||||
}
|
||||
break;
|
||||
case "ArrowDown":
|
||||
@ -441,7 +443,9 @@ const handleKeyPress = (event) => {
|
||||
type: "warn",
|
||||
});
|
||||
} else {
|
||||
jump(document.documentElement.clientHeight - 100);
|
||||
jump(document.documentElement.clientHeight - 100, {
|
||||
duration: store.config.jumpDuration,
|
||||
});
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user