Commit e6018051047ba3fac8c34b24fdf5bd8a609c544c

Authored by 刘汉宸
1 parent da1008b0

chore: 设置示例项目axios实例

Showing 2 changed files with 4 additions and 2 deletions   Show diff stats
examples/main.js
@@ -7,6 +7,7 @@ import ElementUI from 'element-ui'; @@ -7,6 +7,7 @@ import ElementUI from 'element-ui';
7 import Zee from '../packages'; 7 import Zee from '../packages';
8 import NProgress from 'nprogress'; 8 import NProgress from 'nprogress';
9 import CodeSnippet from '@/components/code-snippet'; 9 import CodeSnippet from '@/components/code-snippet';
  10 +import axios from 'axios';
10 import '@/styles/index.scss'; 11 import '@/styles/index.scss';
11 import '@/styles/highlight.scss'; 12 import '@/styles/highlight.scss';
12 import '@/assets/iconfont/iconfont.css'; 13 import '@/assets/iconfont/iconfont.css';
@@ -22,9 +23,10 @@ Vue.use(ElementUI); @@ -22,9 +23,10 @@ Vue.use(ElementUI);
22 Vue.use(Zee, { 23 Vue.use(Zee, {
23 alias: { list: 'result', total: 'totalCount' }, 24 alias: { list: 'result', total: 'totalCount' },
24 http: request, 25 http: request,
25 - size: 'mini', 26 + size: 'small',
26 }); 27 });
27 28
  29 +Vue.prototype.$axios = axios;
28 Vue.prototype.$http = request; 30 Vue.prototype.$http = request;
29 Vue.config.productionTip = false; 31 Vue.config.productionTip = false;
30 32
examples/utils/request.js
@@ -6,7 +6,7 @@ const request = axios.create({ @@ -6,7 +6,7 @@ const request = axios.create({
6 withCredentials: true, 6 withCredentials: true,
7 headers: { 7 headers: {
8 'Content-Type': 'application/json; charset=utf-8', 8 'Content-Type': 'application/json; charset=utf-8',
9 - Authorization: 'Bearer cd355920-ff83-445e-87e1-39d7ecfb8566', 9 + Authorization: 'Bearer 2a6238c6-5a87-4f3f-893b-14aef14b9539',
10 }, 10 },
11 }); 11 });
12 12