diff --git a/components.d.ts b/components.d.ts
index d2445a09..845f90ad 100644
--- a/components.d.ts
+++ b/components.d.ts
@@ -10,11 +10,11 @@ declare module 'vue' {
Add: typeof import('./src/components/toolbar/Add.vue')['default']
ArticleList2: typeof import('./src/components/list/ArticleList2.vue')['default']
ArticleList3: typeof import('./src/components/list/ArticleList3.vue')['default']
- ArticleListFQ: typeof import('./src/components/article/ArticleList-FQ.vue')['default']
+ ArticleList4: typeof import('./src/components/list2/ArticleList4.vue')['default']
Backgorund: typeof import('./src/components/Backgorund.vue')['default']
BaseButton: typeof import('./src/components/BaseButton.vue')['default']
BaseIcon: typeof import('./src/components/BaseIcon.vue')['default']
- BaseList: typeof import('./src/components/list/BaseList.vue')['default']
+ BaseList: typeof import('./src/components/list2/BaseList.vue')['default']
ChapterList: typeof import('./src/components/list/ChapterList.vue')['default']
ChapterName: typeof import('./src/components/toolbar/ChapterName.vue')['default']
Close: typeof import('./src/components/icon/Close.vue')['default']
@@ -28,7 +28,6 @@ declare module 'vue' {
EditAbleText: typeof import('./src/components/EditAbleText.vue')['default']
EditArticle: typeof import('./src/components/article/EditArticle.vue')['default']
EditBatchArticleModal: typeof import('./src/components/article/EditBatchArticleModal.vue')['default']
- EditBatchArticleModalFQ: typeof import('./src/components/article/EditBatchArticleModal-FQ.vue')['default']
EditSingleArticleModal: typeof import('./src/components/article/EditSingleArticleModal.vue')['default']
ElButton: typeof import('element-plus/es')['ElButton']
ElCheckbox: typeof import('element-plus/es')['ElCheckbox']
diff --git a/src/components/Input.vue b/src/components/Input.vue
index 701cdcfd..e10eb59e 100644
--- a/src/components/Input.vue
+++ b/src/components/Input.vue
@@ -39,7 +39,8 @@ useWindowClick((e: PointerEvent) => {
.base-input {
border: 1px solid var(--color-second-bg);
- border-radius: 4rem;
+ border-radius: 6rem;
+ overflow: hidden;
padding: 3rem 5rem;
transition: all .3s;
display: flex;
diff --git a/src/components/article/EditArticle.vue b/src/components/article/EditArticle.vue
index 08872d6a..96275485 100644
--- a/src/components/article/EditArticle.vue
+++ b/src/components/article/EditArticle.vue
@@ -107,7 +107,7 @@ function onPaste(event: ClipboardEvent) {
() => {
appendTranslate(paste)
renewSections()
- },
+ },null,
{
confirmButtonText: '需要',
cancelButtonText: '关闭',
diff --git a/src/components/list2/ArticleList4.vue b/src/components/list2/ArticleList4.vue
new file mode 100644
index 00000000..07032863
--- /dev/null
+++ b/src/components/list2/ArticleList4.vue
@@ -0,0 +1,133 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
{{ `${index + 1}. ${item.title}` }}
+
+
+
{{ ` ${item.titleTranslate}` }}
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/components/list/BaseList.vue b/src/components/list2/BaseList.vue
similarity index 64%
rename from src/components/list/BaseList.vue
rename to src/components/list2/BaseList.vue
index 62c0886a..29168f16 100644
--- a/src/components/list/BaseList.vue
+++ b/src/components/list2/BaseList.vue
@@ -6,20 +6,26 @@ import {usePlayWordAudio} from "@/hooks/sound.ts";
import {watch} from 'vue'
const props = withDefaults(defineProps<{
- list: Word[],
+ list?: any[],
activeIndex?: number,
+ activeId?: string,
isActive?: boolean
showTranslate?: boolean
showWord?: boolean
}>(), {
+ list: [],
activeIndex: -1,
+ activeId: '',
isActive: false,
showTranslate: true,
showWord: true
})
const emit = defineEmits<{
- click: [val: { word: Word, index: number }],
+ click: [val: {
+ item: any,
+ index: number
+ }],
}>()
const settingStore = useSettingStore()
@@ -30,18 +36,18 @@ function scrollViewToCenter(index: number) {
listRef.scrollToIndex(index)
// listRef.children[index]?.scrollIntoView({block: 'center', behavior: 'smooth'})
}
-
-watch(() => props.activeIndex, (n: any) => {
- if (settingStore.showPanel) {
- scrollViewToCenter(n)
- }
-})
-
-watch(() => props.isActive, (n: boolean) => {
- setTimeout(() => {
- if (n) scrollViewToCenter(props.activeIndex)
- }, 300)
-})
+//
+// watch(() => props.activeIndex, (n: any) => {
+// if (settingStore.showPanel) {
+// scrollViewToCenter(n)
+// }
+// })
+//
+// watch(() => props.isActive, (n: boolean) => {
+// setTimeout(() => {
+// if (n) scrollViewToCenter(props.activeIndex)
+// }, 300)
+// })
// watch(() => props.list, () => {
// listRef.scrollTo(0, 0)
@@ -61,6 +67,12 @@ function scrollToItem(index: number) {
listRef.scrollToItem(index)
}
+function itemIsActive(item: any, index: number) {
+ return props.activeId ?
+ props.activeId === item.id
+ : props.activeIndex === index
+}
+
defineExpose({scrollToBottom, scrollToItem})
@@ -83,24 +95,17 @@ defineExpose({scrollToBottom, scrollToItem})
>
-
+
-
- {{ item.name }}
- {{ item.usphone }}
-
-
-
+
-
+
@@ -113,7 +118,7 @@ defineExpose({scrollToBottom, scrollToItem})
@import "@/assets/css/variable";
.scroller {
- height: 100%;
+ flex: 1;
padding: 0 var(--space);
}
diff --git a/src/pages/practice/practice-article/index.vue b/src/pages/practice/practice-article/index.vue
index ef36b0b7..fda5ab36 100644
--- a/src/pages/practice/practice-article/index.vue
+++ b/src/pages/practice/practice-article/index.vue
@@ -20,6 +20,7 @@ import {useSettingStore} from "@/stores/setting.ts";
import ArticleList2 from "@/components/list/ArticleList2.vue";
import BaseIcon from "@/components/BaseIcon.vue";
import {useArticleOptions} from "@/hooks/dict.ts";
+import ArticleList4 from "@/components/list2/ArticleList4.vue";
const store = useBaseStore()
const practiceStore = usePracticeStore()
@@ -109,7 +110,7 @@ function getCurrentPractice() {
renewSectionTexts(tempArticle)
tempArticle.useTranslateType = TranslateType.none
setArticle(tempArticle)
- },
+ }, null,
{
confirmButtonText: '去编辑',
cancelButtonText: '不需要翻译',
@@ -128,7 +129,7 @@ function getCurrentPractice() {
renewSectionTexts(tempArticle)
tempArticle.useTranslateType = TranslateType.none
setArticle(tempArticle)
- },
+ }, null,
{
confirmButtonText: '去编辑',
cancelButtonText: '不需要翻译',
@@ -274,7 +275,29 @@ const {
{{ store.currentDict.articles.length }}篇文章
+
+
+
+
+
+
+
+