{{ article.title }}
+- {{ article.text }} -
+{{ article.titleTranslate }}
+- {{ article.textCustomTranslate }} -
+diff --git a/src/assets/css/style.scss b/src/assets/css/style.scss index ab0d1f09..2fbf14dc 100644 --- a/src/assets/css/style.scss +++ b/src/assets/css/style.scss @@ -38,6 +38,9 @@ --color-input-bg: white; --color-input-icon: #d3d4d7; + + --font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen, Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif; + --word-font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono, Courier New, monospace; } html.dark { @@ -123,6 +126,14 @@ html.dark { transition: background var(--anim-time), color var(--anim-time), border var(--anim-time); } +.word-font-family { + font-family: var(--word-font-family); + //font-family: source-serif-pro, Georgia, Cambria, "Times New Roman", Times, serif; //medium + //font-family: Optimistic Text,-apple-system,ui-sans-serif,system-ui,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji; // react + //font-family: Google Sans Text,Noto Sans,Noto Sans JP,Noto Sans KR,Noto Naskh Arabic,Noto Sans Thai,Noto Sans Hebrew,Noto Sans Bengali,sans-serif; //android-dev + line-height: 30rem; +} + html, body { font-size: 1px; padding: 0; @@ -131,11 +142,15 @@ html, body { height: 100%; color: $font-color; //color: var(--color-font-1); - font-family: $font-family; + //font-family: var(--font-family); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; } +.en-word { + font-family: var(--word-font-family); +} + #app { width: 100%; height: 100%; @@ -294,7 +309,7 @@ footer { padding: 0 var(--space); } -.list-item-wrapper{ +.list-item-wrapper { padding-bottom: 15rem; } @@ -316,7 +331,7 @@ footer { display: flex; gap: 10rem; - .title-wrapper{ + .title-wrapper { display: flex; flex-direction: column; gap: 3rem; @@ -360,7 +375,6 @@ footer { display: flex; align-items: center; gap: 8rem; - font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono, Courier New, monospace; color: var(--color-font-1); .word { @@ -387,7 +401,7 @@ footer { } .common-title { - height: 40rem; + min-height: 40rem; font-size: 18rem; color: var(--color-font-1); display: flex; diff --git a/src/components/Empty.vue b/src/components/Empty.vue index 3572d439..f63b6ef9 100644 --- a/src/components/Empty.vue +++ b/src/components/Empty.vue @@ -30,6 +30,10 @@ defineEmits<{ font-size: 12rem; gap: 20rem; + span { + font-family: var(--font-family); + } + img { margin-top: -50rem; width: 120rem; diff --git a/src/pages/dict/components/ArticleDetail.vue b/src/pages/dict/components/ArticleDetail.vue index 36d5be8f..761cca3d 100644 --- a/src/pages/dict/components/ArticleDetail.vue +++ b/src/pages/dict/components/ArticleDetail.vue @@ -9,9 +9,10 @@ import {$ref} from "vue/macros"; import VirtualWordList2 from "@/components/list/VirtualWordList2.vue"; import {cloneDeep} from "lodash-es"; import {Article, DefaultArticle, TranslateType} from "@/types.ts"; +import {emitter, EventKey} from "@/utils/eventBus.ts"; const runtimeStore = useRuntimeStore() -let chapterIndex = $ref(0) +let chapterIndex = $ref(-1) let article: Article = $ref(cloneDeep(DefaultArticle)) function handleCheckedChange(val) { @@ -19,6 +20,19 @@ function handleCheckedChange(val) { article = val.data } +function delArticle(index: number) { + runtimeStore.editDict.articles.splice(index, 1) + + if (runtimeStore.editDict.articles.length) { + if (chapterIndex === index) { + article = runtimeStore.editDict.articles[index] + } + } else { + article = cloneDeep(DefaultArticle) + } + + ElMessage.success('删除成功!') +} @@ -30,14 +44,12 @@ function handleCheckedChange(val) { 章节管理
-{{ article.title }}
+- {{ article.text }} -
+{{ article.titleTranslate }}
+- {{ article.textCustomTranslate }} -
+