You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

33 lines
696 B
JavaScript

1 year ago
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;