web: 修复快捷键设置bug和esc键逻辑; 修复超大章节列表造成的卡顿

bug: 第一点击目录时没有跳转到合适位置
This commit is contained in:
Xwite
2023-05-10 12:41:55 +08:00
parent 7bd45c46fb
commit 23018b702d
5 changed files with 64 additions and 84 deletions
@@ -44,9 +44,8 @@ const calculateWordCount = (paragraph) => {
return paragraph.replaceAll(imgPattern, imagePlaceHolder).length;
};
const wordCounts = computed(() => {
return Array.from(props.contents, content => calculateWordCount(content));
return Array.from(props.contents, (content) => calculateWordCount(content));
});
</script>
<style lang="scss" scoped>