支持设置背景图片,不再局限于面板模式,支持设置毛玻璃效果

This commit is contained in:
fofolee
2024-12-19 00:39:44 +08:00
parent be663fc4e3
commit 45780a2e0c
11 changed files with 1749 additions and 669 deletions

View File

@@ -15,7 +15,7 @@ import programmings from "./js/options/programs.js";
import defaultProfile from "./js/options/defaultProfile.js";
import Cron from "croner";
import QuickCommand from "components/quickcommandUI/QuickCommand";
import autoDetach from "./js/autoDetach.js";
// import autoDetach from "./js/autoDetach.js";
export default defineComponent({
components: { QuickCommand },
@@ -122,7 +122,7 @@ export default defineComponent({
this.enterData = enter;
// 自动分离目前还没有好的方案
// if (this.$root.profile.autoDetachFeatures?.includes(enter.code)) {
// autoDetach.autoDetach();
// autoDetach.autoDetach();
// }
this.$router.push(enter.code);
},
@@ -240,5 +240,16 @@ export default defineComponent({
this.utools.setStorage("st_v300Inited", true);
},
},
watch: {
// 监听 glassEffect 值变化
'profile.glassEffect': {
immediate: true,
handler(val) {
// 给 body 添加 glass-effect-menu 类和强度值
document.body.classList.toggle('glass-effect-menu', val > 0);
document.body.style.setProperty('--glass-effect-strength', val);
}
}
}
});
</script>