>
const ORIGINAL_THEME= "#409EFF";
exportdefault{
name:"colorPicker",
data() {return{
chalk:"",
theme: ORIGINAL_THEME,
predefineColors: ["#409EFF","#ff4500","#ff8c00","#ffd700","#90ee90","#00ced1","#1e90ff","#c71585"]
};
},
mounted() {if(this.CheckIsColor(localStorage.getItem("colorPicker"))) {this.theme=localStorage.getItem("colorPicker");
}
},
watch: {
theme(val, oldVal) {if(typeofval!== "string")return;
localStorage.setItem("colorPicker", val);
const themeCluster= this.getThemeCluster(val.replace("#",""));
const originalCluster= this.getThemeCluster(oldVal.replace("#",""));