drush vset preprocess_css 0 --yes
drush vset preprocess_js 0 --yes
| <VirtualHost *:80> | |
| Protocols h2 h2c http/1.1 | |
| ServerName vuejs.project-url.com | |
| ServerAdmin webmaster@vuejs.project-url.com | |
| DocumentRoot /var/www/html/projec-root-directory/dist/ | |
| <Directory "/var/www/html/projec-root-directory/dist/"> | |
| AllowOverride All | |
| Options FollowSymLinks Multiviews Indexes | |
| Require all granted |
| const actions = ()=>{ | |
| const functionA = ()=>{/*do sth*/} | |
| const functionB = ()=>{/*do sth*/} | |
| const functionC = ()=>{/*send log*/} | |
| return new Map([ | |
| [/^guest_[1-4]$/,functionA], | |
| [/^guest_5$/,functionB], | |
| [/^guest_.*$/,functionC], | |
| //... | |
| ]) |
| const actions = ()=>{ | |
| const functionA = ()=>{/*do sth*/} | |
| const functionB = ()=>{/*do sth*/} | |
| return new Map([ | |
| [/^guest_[1-4]$/,functionA], | |
| [/^guest_5$/,functionB], | |
| //... | |
| ]) | |
| } |
| const actions = ()=>{ | |
| const functionA = ()=>{/*do sth*/} | |
| const functionB = ()=>{/*do sth*/} | |
| return new Map([ | |
| [{identity:'guest',status:1},functionA], | |
| [{identity:'guest',status:2},functionA], | |
| [{identity:'guest',status:3},functionA], | |
| [{identity:'guest',status:4},functionA], | |
| [{identity:'guest',status:5},functionB], | |
| //... |
| const actions = new Map([ | |
| [{identity:'guest',status:1},()=>{/*do sth*/}], | |
| [{identity:'guest',status:2},()=>{/*do sth*/}], | |
| //... | |
| ]) | |
| const onButtonClick = (identity,status)=>{ | |
| let action = [...actions].filter(([key,value])=>(key.identity == identity && key.status == status)) | |
| action.forEach(([key,value])=>value.call(this)) | |
| } |
| const actions = new Map([ | |
| ['guest_1', ()=>{/*do sth*/}], | |
| ['guest_2', ()=>{/*do sth*/}], | |
| ['guest_3', ()=>{/*do sth*/}], | |
| ['guest_4', ()=>{/*do sth*/}], | |
| ['guest_5', ()=>{/*do sth*/}], | |
| ['master_1', ()=>{/*do sth*/}], | |
| ['master_2', ()=>{/*do sth*/}], | |
| ['master_3', ()=>{/*do sth*/}], | |
| ['master_4', ()=>{/*do sth*/}], |
| const actions = new Map([ | |
| [1, ['processing','IndexPage']], | |
| [2, ['fail','FailPage']], | |
| [3, ['fail','FailPage']], | |
| [4, ['success','SuccessPage']], | |
| [5, ['cancel','CancelPage']], | |
| ['default', ['other','Index']] | |
| ]) | |
| const onButtonClick = (status)=>{ |
| // "class" declaration | |
| function Car(make, model) { | |
| this.make = make; | |
| this.model = model; | |
| } | |
| // the start method | |
| Car.prototype.start = function() { | |
| console.log('vroom'); | |
| } |
| class Car { | |
| constructor(make, model) { | |
| this.make = make; | |
| this.model = model; | |
| } | |
| start() { | |
| console.log('vroom'); | |
| } | |