save
This commit is contained in:
@@ -64,7 +64,7 @@ export function splitEnArticle(text: string, lang: string = 'en', keyboardMap: K
|
||||
// console.log('splitEnArticle length', text.length)
|
||||
|
||||
text.split('').map((v, i, arr) => {
|
||||
if (i > 2306) debugger
|
||||
// if (i > 2306) debugger
|
||||
switch (v) {
|
||||
case ' ':
|
||||
if (word.name) {
|
||||
|
||||
@@ -182,7 +182,7 @@ export const useBaseStore = defineStore('base', {
|
||||
let configStr = localStorage.getItem(SaveDictKey)
|
||||
if (configStr) {
|
||||
let obj: State = JSON.parse(configStr)
|
||||
this.setState(obj)
|
||||
// this.setState(obj)
|
||||
}
|
||||
|
||||
if ([
|
||||
@@ -197,7 +197,7 @@ export const useBaseStore = defineStore('base', {
|
||||
DictType.customDict,
|
||||
].includes(this.current.dictType)) {
|
||||
if (!this.currentDict.originWords.length) {
|
||||
let r = await fetch(`/public/${this.dict.url}`)
|
||||
let r = await fetch(`${this.currentDict.url}`)
|
||||
r.json().then(v => {
|
||||
this.currentDict.originWords = cloneDeep(v)
|
||||
this.currentDict.words = cloneDeep(v)
|
||||
@@ -212,7 +212,7 @@ export const useBaseStore = defineStore('base', {
|
||||
DictType.customArticle,
|
||||
].includes(this.current.dictType)) {
|
||||
if (!this.currentDict.articles.length) {
|
||||
let r = await fetch(`/public/${this.dict.url}`)
|
||||
let r = await fetch(`${this.currentDict.url}`)
|
||||
r.json().then(v => {
|
||||
this.currentDict.articles = cloneDeep(v)
|
||||
this.load = true
|
||||
|
||||
Reference in New Issue
Block a user