mirror of
https://github.com/earthjasonlin/zzz-signal-search-export.git
synced 2025-04-21 16:00:17 +08:00
feat: using built-in gachaType
This commit is contained in:
@ -79,6 +79,7 @@ import GachaDetail from './components/GachaDetail.vue'
|
||||
import Setting from './components/Setting.vue'
|
||||
import gachaDetail from './gachaDetail'
|
||||
import { version } from '../../package.json'
|
||||
import gachaType from '../gachaType.json'
|
||||
|
||||
const state = reactive({
|
||||
status: 'init',
|
||||
@ -158,11 +159,19 @@ const detail = computed(() => {
|
||||
})
|
||||
|
||||
const typeMap = computed(() => {
|
||||
const data = state.dataMap.get(state.current)
|
||||
return data.typeMap
|
||||
const gachaTypeMap = new Map(gachaType)
|
||||
const type = gachaTypeMap.get(state.config.lang)
|
||||
const result = new Map()
|
||||
if (type) {
|
||||
for (let { key, name } of type) {
|
||||
result.set(key, name)
|
||||
}
|
||||
}
|
||||
return result
|
||||
})
|
||||
|
||||
const fetchData = async (url) => {
|
||||
state.log = ''
|
||||
state.status = 'loading'
|
||||
const data = await ipcRenderer.invoke('FETCH_DATA', url)
|
||||
if (data) {
|
||||
|
Reference in New Issue
Block a user