chore: use mockjs in production environment
							parent
							
								
									63f8635538
								
							
						
					
					
						commit
						504c06f648
					
				
							
								
								
									
										12
									
								
								src/main.js
								
								
								
								
							
							
						
						
									
										12
									
								
								src/main.js
								
								
								
								
							|  | @ -22,12 +22,16 @@ import * as filters from './filters' // global filters | ||||||
| 
 | 
 | ||||||
| /** | /** | ||||||
|  * If you don't want to use mock-server |  * If you don't want to use mock-server | ||||||
|  * you want to use mockjs for request interception |  * you want to use MockJs for mock api | ||||||
|  * you can execute: |  * you can execute: mockXHR() | ||||||
|  * |  * | ||||||
|  * import { mockXHR } from '../mock' |  * Currently MockJs will be used in the production environment, | ||||||
|  * mockXHR() |  * please remove it before going online! ! ! | ||||||
|  */ |  */ | ||||||
|  | import { mockXHR } from '../mock' | ||||||
|  | if (process.env.NODE_ENV === 'production') { | ||||||
|  |   mockXHR() | ||||||
|  | } | ||||||
| 
 | 
 | ||||||
| Vue.use(Element, { | Vue.use(Element, { | ||||||
|   size: Cookies.get('size') || 'medium', // set element-ui default size
 |   size: Cookies.get('size') || 'medium', // set element-ui default size
 | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	 Pan
						Pan