let upload_var = {
"_upload_sw":0,
}; // 1 为开启可以上传文件 0为关闭不能上传文件
Object.defineProperty(upload_var,'upload_sw', {
configurable:true,
set:function(newVal){
this._upload_sw = newVal;
if(newVal == 1){
let submit_button = getIDD("submit_button")
submit_button.className="upload_button"
console.log('set:'+this._type)
}else if(newVal == 0){
let submit_button = getIDD("submit_button")
submit_button.className="not_submit_button"
}
},
get:function(){
return this._upload_sw
}
})
Comments | NOTHING