feat 添加模块
This commit is contained in:
@@ -21,7 +21,8 @@ export default defineManifestConfig({
|
|||||||
screenOrientation: ['landscape-primary'],
|
screenOrientation: ['landscape-primary'],
|
||||||
/* 模块配置 */
|
/* 模块配置 */
|
||||||
modules: {
|
modules: {
|
||||||
SQLite: {},
|
Bluetooth: {}, // 蓝牙
|
||||||
|
SQLite: {}, // 数据库
|
||||||
},
|
},
|
||||||
/* 应用发布信息 */
|
/* 应用发布信息 */
|
||||||
distribute: {
|
distribute: {
|
||||||
|
|||||||
12
src/App.vue
12
src/App.vue
@@ -1,5 +1,15 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
onLaunch(() => {})
|
import { initTables } from '@/service'
|
||||||
|
|
||||||
|
onLaunch(async () => {
|
||||||
|
try {
|
||||||
|
await initTables()
|
||||||
|
console.log('数据库初始化完成')
|
||||||
|
}
|
||||||
|
catch (err) {
|
||||||
|
console.error('数据库初始化失败:', err)
|
||||||
|
}
|
||||||
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
|
|||||||
1
src/auto-imports.d.ts
vendored
1
src/auto-imports.d.ts
vendored
@@ -385,7 +385,6 @@ declare module 'vue' {
|
|||||||
readonly getSystemInfo: UnwrapRef<typeof import('./utils/device')['getSystemInfo']>
|
readonly getSystemInfo: UnwrapRef<typeof import('./utils/device')['getSystemInfo']>
|
||||||
readonly h: UnwrapRef<typeof import('vue')['h']>
|
readonly h: UnwrapRef<typeof import('vue')['h']>
|
||||||
readonly ignorableWatch: UnwrapRef<typeof import('@vueuse/core')['ignorableWatch']>
|
readonly ignorableWatch: UnwrapRef<typeof import('@vueuse/core')['ignorableWatch']>
|
||||||
readonly initTables: UnwrapRef<typeof import('./utils/sqlite')['initTables']>
|
|
||||||
readonly inject: UnwrapRef<typeof import('vue')['inject']>
|
readonly inject: UnwrapRef<typeof import('vue')['inject']>
|
||||||
readonly injectLocal: UnwrapRef<typeof import('@vueuse/core')['injectLocal']>
|
readonly injectLocal: UnwrapRef<typeof import('@vueuse/core')['injectLocal']>
|
||||||
readonly isDefined: UnwrapRef<typeof import('@vueuse/core')['isDefined']>
|
readonly isDefined: UnwrapRef<typeof import('@vueuse/core')['isDefined']>
|
||||||
|
|||||||
Reference in New Issue
Block a user