动态修改主题色功能

This commit is contained in:
fofolee
2022-04-05 11:44:49 +08:00
parent b16087d270
commit 981027de53
7 changed files with 157 additions and 48 deletions

View File

@@ -1,10 +1,31 @@
import { boot } from 'quasar/wrappers'
import {
boot
} from 'quasar/wrappers'
import UTOOLS from "../js/utools.js";
import programmings from '../js/programs.js';
// 配置数据存取
let defaultProfile = {
commandCardStyle: "normal",
primaryColor: "#419488"
}
let userProfile = UTOOLS.getDB(
UTOOLS.DBPRE.CFG + "preferences"
);
Object.assign(defaultProfile, userProfile)
utools.onPluginOut(() => {
UTOOLS.putDB(
defaultProfile,
UTOOLS.DBPRE.CFG + "preferences"
);
});
// "async" is optional;
// more info on params: https://v2.quasar.dev/quasar-cli/boot-files
export default boot(async ({ app }) => {
export default boot(async({
app
}) => {
app.config.globalProperties.$utools = UTOOLS
app.config.globalProperties.$programmings = programmings
})
app.config.globalProperties.$profile = defaultProfile
})