更改动态导航栏

This commit is contained in:
wwz
2025-02-08 09:16:43 +08:00
parent 20b5539a82
commit 5add1f1282
33 changed files with 21325 additions and 72 deletions

40
main.js
View File

@@ -1,15 +1,5 @@
import App from './App'
import uviewPlus from '@/uni_modules/uview-plus'
//写个方法,配置一下持久化插件
const createPersistUni = () => {
return createPersistedState({
storage: {
getItem: uni.getStorageSync,
setItem: uni.setStorageSync
}
})
}
// #ifndef VUE3
import Vue from 'vue'
import './uni.promisify.adaptor'
@@ -22,27 +12,23 @@ app.$mount()
// #endif
// #ifdef VUE3
import { createSSRApp } from "vue";
import * as Pinia from "pinia";
import { createUnistorage } from "pinia-plugin-unistorage";
// 写个方法,配置一下持久化插件
const createPersistUni = () => {
return createPersistedState({
storage: {
getItem: uni.getStorageSync,
setItem: uni.setStorageSync
}
})
}
import {
createSSRApp
} from "vue";
import * as Pinia from 'pinia';
import { createUnistorage } from './uni_modules/pinia-plugin-unistorage'
export function createApp() {
const store = Pinia.createPinia()
// 使用持久化插件
store.use(createPersistUni());
// 状态管理
const app = createSSRApp(App)
// 状态管理
const store = Pinia.createPinia()
// 持久化
store.use(createUnistorage())
app.use(store)
app.use(uviewPlus)
return {
app,
Pinia
}
Pinia,
};
}
// #endif