meixioacomponent 0.2.42 → 0.2.43

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "meixioacomponent",
3
- "version": "0.2.42",
3
+ "version": "0.2.43",
4
4
  "private": false,
5
5
  "author": "YuRi",
6
6
  "main": "lib/meixioacomponent.umd.min.js",
@@ -5,6 +5,7 @@ const componentConfig = {
5
5
  store: null,
6
6
  router: null,
7
7
  dynamicId: 0,
8
+ uploadUrl: null,
8
9
  eventBus: new Vue(),
9
10
  selectStore: null,
10
11
 
@@ -12,6 +13,10 @@ const componentConfig = {
12
13
  componentConfig.dynamicId += 1;
13
14
  },
14
15
 
16
+ setUploadUrl: (url) => {
17
+ componentConfig.uploadUrl = url;
18
+ },
19
+
15
20
  initConfig: (_store, _router) => {
16
21
  // 注册element 组件
17
22
  useElementComponent();
@@ -1,11 +1,12 @@
1
1
  import axios from "axios";
2
2
  import { GetToken } from "../utils/utils.js";
3
+ import componentConfig from "./componentConfig.js";
3
4
 
4
5
  const ossInstance = (params, uploadProgressFn) => {
5
6
  // 创建 axios 实例
6
7
  const instance = axios.create({
7
8
  // API 请求的默认前缀
8
- baseURL: process.env.VUE_APP_UPLOAD_URL,
9
+ baseURL: componentConfig.uploadUrl,
9
10
  });
10
11
 
11
12
  // 异常拦截处理器