feat(deps): 添加tauri打包(遗留pnpm build:file打包好的文件跨域无法访问) #94
This commit is contained in:
5
src/components.d.ts
vendored
5
src/components.d.ts
vendored
@@ -1,8 +1,11 @@
|
||||
/* eslint-disable */
|
||||
// @ts-nocheck
|
||||
// biome-ignore lint: disable
|
||||
// oxlint-disable
|
||||
// ------
|
||||
// Generated by unplugin-vue-components
|
||||
// Read more: https://github.com/vuejs/core/pull/3399
|
||||
// biome-ignore lint: disable
|
||||
|
||||
export {}
|
||||
|
||||
/* prettier-ignore */
|
||||
|
||||
@@ -113,6 +113,10 @@ export const configRoutes = {
|
||||
],
|
||||
}
|
||||
const routes = [
|
||||
{
|
||||
path: '/',
|
||||
redirect: '/log-lottery',
|
||||
},
|
||||
{
|
||||
path: '/log-lottery',
|
||||
component: Layout,
|
||||
@@ -135,7 +139,7 @@ const routes = [
|
||||
const envMode = import.meta.env.MODE
|
||||
const router = createRouter({
|
||||
// 读取环境变量
|
||||
history: envMode === 'file' ? createWebHashHistory() : createWebHistory(),
|
||||
history: (envMode === 'file' || import.meta.env.TAURI_PLATFORM) ? createWebHashHistory() : createWebHistory(),
|
||||
routes,
|
||||
})
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import type { IPersonConfig, IPrizeConfig } from '@/types/storeType'
|
||||
import dayjs from 'dayjs'
|
||||
import { defineStore } from 'pinia'
|
||||
import { v4 as uuidv4 } from 'uuid'
|
||||
import { computed, ref, toRaw, watch } from 'vue'
|
||||
import { IndexDb } from '@/utils/dexie'
|
||||
import { defaultPersonList } from './data'
|
||||
@@ -150,7 +151,10 @@ export const usePersonConfig = defineStore('person', () => {
|
||||
personDb.deleteAll('alreadyPersonList')
|
||||
}
|
||||
function setDefaultPersonList() {
|
||||
personConfig.value.allPersonList = defaultPersonList
|
||||
personConfig.value.allPersonList = defaultPersonList.map((item: any) => {
|
||||
item.uuid = uuidv4()
|
||||
return item
|
||||
})
|
||||
personConfig.value.alreadyPersonList = []
|
||||
personDb.setAllData('allPersonList', defaultPersonList)
|
||||
personDb.deleteAll('alreadyPersonList')
|
||||
|
||||
Reference in New Issue
Block a user