filesbox/web/dist/design/designstatic/newJS/common/js/globalStore.js

2 lines
321 B
JavaScript
Raw Normal View History

2024-07-26 06:10:54 +00:00
(function(o){class r{constructor(){this.state={courseData:{}}}setState(t,e){for(let s in t)this.state[s]=t[s];e&&e()}getStore(){return this.state}clone(t,e){return Object.assign(t,e)}setCourse(t,e){const{courseData:s={}}=this.state,i=this.clone(s,t);this.setState({courseData:i},e)}}const n=new r;o.allStore=n})(window);