This commit is contained in:
kunfei
2023-07-25 21:35:32 +08:00
parent 29a5fe1406
commit 3d5fc133ec
12 changed files with 59 additions and 38 deletions
+1 -1
View File
@@ -62,7 +62,7 @@ const getCover = (coverUrl) => {
};
const subJustify = computed(() =>
props.isSearch ? "space-between" : "flex-start"
props.isSearch ? "space-between" : "flex-start",
);
</script>
@@ -59,7 +59,7 @@ const paragraphRef = ref();
const scrollToReadedLength = (length) => {
if (length === 0) return;
let paragraphIndex = chapterPos.value.findIndex(
(wordCount) => wordCount >= length
(wordCount) => wordCount >= length,
);
if (paragraphIndex === -1) return;
nextTick(() => {
@@ -81,14 +81,14 @@ onMounted(() => {
emit(
"readedLengthChange",
props.chapterIndex,
parseInt(target.dataset.chapterpos)
parseInt(target.dataset.chapterpos),
);
}
}
},
{
rootMargin: `0px 0px -${window.innerHeight - 24}px 0px`,
}
},
);
intersectionObserver.observe(titleRef.value);
paragraphRef.value.forEach((element) => {
@@ -105,8 +105,12 @@ onUnmounted(() => {
<style lang="scss" scoped>
.title {
margin-bottom: 57px;
font: 24px / 32px PingFangSC-Regular, HelveticaNeue-Light,
"Helvetica Neue Light", "Microsoft YaHei", sans-serif;
font:
24px / 32px PingFangSC-Regular,
HelveticaNeue-Light,
"Helvetica Neue Light",
"Microsoft YaHei",
sans-serif;
}
p {
+6 -2
View File
@@ -106,8 +106,12 @@ onUpdated(() => {
//width: 50%;
height: 40px;
cursor: pointer;
font: 16px / 40px PingFangSC-Regular, HelveticaNeue-Light,
"Helvetica Neue Light", "Microsoft YaHei", sans-serif;
font:
16px / 40px PingFangSC-Regular,
HelveticaNeue-Light,
"Helvetica Neue Light",
"Microsoft YaHei",
sans-serif;
}
}
+10 -3
View File
@@ -362,7 +362,10 @@ const uploadConfig = (config) => {
list-style: none outside none;
i {
font: 12px / 16px PingFangSC-Regular, "-apple-system", Simsun;
font:
12px / 16px PingFangSC-Regular,
"-apple-system",
Simsun;
display: inline-block;
min-width: 48px;
margin-right: 16px;
@@ -410,8 +413,12 @@ const uploadConfig = (config) => {
text-align: center;
vertical-align: middle;
display: inline-block;
font: 14px / 34px PingFangSC-Regular, HelveticaNeue-Light,
"Helvetica Neue Light", "Microsoft YaHei", sans-serif;
font:
14px / 34px PingFangSC-Regular,
HelveticaNeue-Light,
"Helvetica Neue Light",
"Microsoft YaHei",
sans-serif;
}
.font-item-input {
width: 168px;
+2 -2
View File
@@ -31,7 +31,7 @@ watch(
() => store.isDebuging,
() => {
if (store.isDebuging) startDebug();
}
},
);
const appendDebugMsg = (msg) => {
@@ -46,7 +46,7 @@ const startDebug = async () => {
store.currentSourceUrl,
searchKey.value || store.searchKey,
appendDebugMsg,
store.debugFinish
store.debugFinish,
);
};
+3 -3
View File
@@ -211,8 +211,8 @@ const buttons = ref(
{ name: "↶撤销操作", hotKeys: [], action: undo },
{ name: "↷重做操作", hotKeys: [], action: redo },
{ name: "⇏调试源", hotKeys: [], action: debug },
{ name: "✓保存源", hotKeys: [], action: saveSource }
)
{ name: "✓保存源", hotKeys: [], action: saveSource },
),
);
const hotkeysDialogVisible = ref(true);
@@ -250,7 +250,7 @@ watch(
buttons.value[recordKeyDownIndex.value].hotKeys = pressedKeys;
});
},
{ immediate: true }
{ immediate: true },
);
const recordKeyDown = (index) => {