feat(deps): 添加tauri打包(遗留pnpm build:file打包好的文件跨域无法访问) #94

This commit is contained in:
log1997
2025-12-09 17:52:56 +08:00
parent 2f0e3ac05b
commit f5152da190
30 changed files with 5714 additions and 659 deletions

5
src/components.d.ts vendored
View File

@@ -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 */

View File

@@ -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,
})

View File

@@ -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')