save
This commit is contained in:
1
src/pages/test/data.json
Normal file
1
src/pages/test/data.json
Normal file
File diff suppressed because one or more lines are too long
@@ -3,6 +3,8 @@
|
||||
import {splitEnArticle} from "@/hooks/article.ts";
|
||||
import BaseButton from "@/components/BaseButton.vue";
|
||||
import {useSettingStore} from "@/stores/setting.ts";
|
||||
import localforage from "localforage";
|
||||
import {SAVE_DICT_KEY} from "@/utils/const.ts";
|
||||
|
||||
let data = {
|
||||
"title": "A cold welcome",
|
||||
@@ -28,12 +30,15 @@ let data = {
|
||||
// }
|
||||
splitEnArticle(data.text)
|
||||
const settingStore = useSettingStore()
|
||||
async function test(){
|
||||
let configStr: string = await localforage.getItem(SAVE_DICT_KEY.key)
|
||||
console.log(configStr)
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="page">
|
||||
test
|
||||
<BaseButton @click="settingStore.load = !settingStore.load">test</BaseButton>
|
||||
<BaseButton @click="test">test</BaseButton>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -4,7 +4,7 @@ import Practice from "@/pages/pc/practice/index.vue";
|
||||
import Dict from '@/pages/pc/dict/index.vue'
|
||||
import Mobile from '@/pages/mobile/index.vue'
|
||||
import MobilePractice from '@/pages/mobile/practice/index.vue'
|
||||
import Test from "@/pages/test.vue";
|
||||
import Test from "@/pages/test/test.vue";
|
||||
|
||||
const routes: RouteRecordRaw[] = [
|
||||
{path: '/pc/practice', component: Practice},
|
||||
|
||||
Reference in New Issue
Block a user