+
+
+ 背诵
+
+
+
+
+
背诵进度: {{ current + 1 }}/{{ total }}
+
+
+ 上一个
+ 下一个
+ 显示答案
+ 跳过
+ 停止背诵
+
+
+
{{ word.type }} {{ word.trans }}
-
-
上一个
-
下一个
-
显示答案
-
跳过
-
停止背诵
-
+
-
{{ word.type }} {{ word.trans }}
-
-
@@ -291,6 +300,8 @@ export default {
title: "Congratulations!",
type: "success"
})
+ localStorage.removeItem("lastrecite");
+ localStorage.removeItem("lastcurrent");
return;
}
nextTick(() => {
@@ -298,8 +309,8 @@ export default {
});
}
else ElMessage({
- type:"error",
- message:"您还未答过该词,跳过请使用ctrl+M",
+ type: "error",
+ message: "您还未答过该词,跳过请使用ctrl+M",
})
},
skip() {
@@ -313,13 +324,13 @@ export default {
return;
},
prev() {
- if(this.current>0){
+ if (this.current > 0) {
this.current--;
this.show();
}
else ElMessage({
- type:'error',
- message:"已经是第一个单词"
+ type: 'error',
+ message: "已经是第一个单词"
})
},
showAnswer() {
@@ -331,7 +342,10 @@ export default {
let e = document.getElementById("input");
e.value = "_".repeat(this.word.word.length);
e.setSelectionRange(0, 0);
- e.style.height = `${e.scrollHeight}px`;
+ e.style.height = "0";
+ setTimeout(() => {
+ e.style.height = `${e.scrollHeight}px`;
+ }, 200);
}
},
change() {
@@ -353,18 +367,23 @@ export default {
title: "Error",
message: "错误",
type: "error"
- }),
- o = "_".repeat(this.word.word.length);
+ });
+ o = "_".repeat(this.word.word.length);
n = 0;
+ e.style.height = "0";
+ setTimeout(() => {
+ e.style.height = `${e.scrollHeight}px`;
+ }, 200);
} else
n == -1 ? o = "_".repeat(this.word.word.length) : (o = t.substring(0, n),
o += "_".repeat(this.word.word.length - n));
e.value = o;
e.setSelectionRange(n, n);
- e.style.height = 0;
setTimeout(() => {
- e.style.height = `${e.scrollHeight}px`;
- }, 0);
+ if (parseInt(e.style.height) < e.scrollHeight) {
+ e.style.height = `${e.scrollHeight}px`;
+ }
+ },0);
e.focus();
},
audio_play() {
@@ -450,7 +469,7 @@ export default {
\ No newline at end of file
diff --git a/src/components/manage/Editor.vue b/src/components/manage/Editor.vue
index fafb9ca..0172896 100644
--- a/src/components/manage/Editor.vue
+++ b/src/components/manage/Editor.vue
@@ -1,9 +1,10 @@
-
-
{{ editing.name }} ({{ editing.id }})
-
-
+
+
+ {{ name }} ({{ id }})
+
+
@@ -170,10 +171,10 @@ export default {
},
created() {
- this.editing = this.$store.state.editing.set;
- this.editingClass = this.$store.state.editing.set_class_name;
- if(this.editing && this.editingClass){
- this.table = JSON.parse(localStorage.getItem(this.editing.id));
+ this.name = this.$route.query.name;
+ this.id = this.$route.query.id;
+ if(this.name && this.id){
+ this.table = JSON.parse(localStorage.getItem(this.id));
}
},
}
@@ -185,10 +186,7 @@ export default {
flex-direction: column;
overflow: scroll;
}
- .container{
- padding: 10px;
- height: calc(100% - 20px);
- }
+
.title{
font-size: 25px;
min-height: 50px;
@@ -200,9 +198,16 @@ export default {
font-size: 35px;
min-height: 60px;
}
+
+ .container{
+ padding: 10px;
+ height: 100%;
+ }
}
-
+#main{
+ height: calc(100% - 50px);
+}
#main-container {
height: 87%;
diff --git a/src/components/manage/NewSet.vue b/src/components/manage/NewSet.vue
index f1125eb..093ce98 100644
--- a/src/components/manage/NewSet.vue
+++ b/src/components/manage/NewSet.vue
@@ -1,11 +1,11 @@
+
+
+ 新建单词本
+
+
-
-
- 新建单词本
-
-
名称:
@@ -64,16 +64,19 @@ export default {
.colbox {
flex-direction: column;
}
+
.colbox * {
margin-top: 15px;
}
- .card{
+
+ .card {
box-shadow: none;
}
}
#main-container {
- height: 87%;
+ height: calc(100% - 80px);
+ width: calc(100% - 20px);
}
.colbox {
diff --git a/src/components/manage/SetList.vue b/src/components/manage/SetList.vue
index 7ffb9c2..efa92a8 100644
--- a/src/components/manage/SetList.vue
+++ b/src/components/manage/SetList.vue
@@ -1,18 +1,30 @@
-