1
0
mirror of https://github.com/ialley-workshop-open/uni-halo.git synced 2026-06-11 12:49:30 +08:00

v1.0.0-beta 源码正式开源

This commit is contained in:
小莫唐尼
2022-12-06 15:08:29 +08:00
commit 636ae7b169
461 changed files with 116817 additions and 0 deletions
+32
View File
@@ -0,0 +1,32 @@
const theme = {
getTheme(){
return {
color:uni.$tm.vx.state().tmVuetify.color,
black:uni.$tm.vx.state().tmVuetify.black
}
},
setBlack(arg){
let p = arg;
if(typeof arg !=='undefined'){
uni.$tm.vx.commit("setTmVuetifyBlack",arg)
}else{
p = !uni.$tm.vx.state().tmVuetify.black;
uni.$tm.vx.commit("setTmVuetifyBlack",!uni.$tm.vx.state().tmVuetify.black)
}
uni.setStorageSync('setTmVuetifyBlack',p)
},
setTheme(arg){
let p = arg||"primary";
uni.$tm.vx.commit("setTmVuetifyColor",p)
uni.setStorageSync('setTmVuetifyColor',p)
},
clear(){
uni.$tm.vx.commit("setTmVuetifyColor",'')
uni.removeStorageSync('setTmVuetifyColor')
}
}
export default theme;