Просмотр исходного кода

feat(speaking): persist grade in store, add updateGrade action

jimmylee 2 недель назад
Родитель
Сommit
9a76f3d46a
1 измененных файлов с 6 добавлено и 0 удалено
  1. 6 0
      src/store/speaking.ts

+ 6 - 0
src/store/speaking.ts

@@ -9,6 +9,7 @@ import type {
 
 
 const DEFAULT_CONFIG: TopicDiscussionConfig = {
 const DEFAULT_CONFIG: TopicDiscussionConfig = {
   topic: 'How I get to school',
   topic: 'How I get to school',
+  grade: 'grade5-1',
   selectedRole: 'tom',
   selectedRole: 'tom',
   learningGoals: {
   learningGoals: {
     vocabulary: ['on foot', 'by bus', 'by bike', 'by car', 'by underground', 'bus stop', 'near', 'far from'],
     vocabulary: ['on foot', 'by bus', 'by bike', 'by car', 'by underground', 'bus stop', 'near', 'far from'],
@@ -81,6 +82,11 @@ export const useSpeakingStore = defineStore('speaking', {
       this.config.topic = topic
       this.config.topic = topic
     },
     },
 
 
+    // 年级
+    updateGrade(grade: string) {
+      this.config.grade = grade
+    },
+
     // 学习目标 - 词汇
     // 学习目标 - 词汇
     addVocabulary(word: string) {
     addVocabulary(word: string) {
       this.config.learningGoals.vocabulary.push(word)
       this.config.learningGoals.vocabulary.push(word)