ol-base-components 2.1.1 → 2.1.2

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": "ol-base-components",
3
- "version": "2.1.1",
3
+ "version": "2.1.2",
4
4
  "private": false,
5
5
  "main": "src/package/index.js",
6
6
  "bin": {
package/src/api/runApi.js CHANGED
@@ -6,7 +6,8 @@ const Vue = require("vue"); // 引入 Vue
6
6
  // const swaggerUrl = "http://220.179.249.140:20019/swagger/v1/swagger.json";
7
7
 
8
8
  const swaggerUrl = Vue.prototype.$swaggerUrl || ""; // 使用 Vue.prototype 中的 url
9
- const modulesDir = Vue.prototype.$outputDir || path.join(__dirname, "./modules"); // 使用 Vue.prototype 中的 outputDir
9
+ const modulesDir =
10
+ Vue.prototype.$outputDir || path.join(__dirname, "./modules"); // 使用 Vue.prototype 中的 outputDir
10
11
 
11
12
  SwaggerClient(swaggerUrl)
12
13
  .then((client) => {
@@ -187,10 +187,12 @@ function hideLoading() {
187
187
  const install = async function (
188
188
  Vue,
189
189
  options = {
190
- url: "",
190
+ swaggerUrl: "",
191
+ outputDir:''
191
192
  }
192
193
  ) {
193
- if (options && options.url) Vue.prototype.$swaggerUrl = options.url;
194
+ if (options && options.swaggerUrl) Vue.prototype.$swaggerUrl = options.swaggerUrl;
195
+ if (options && options.outputDir) Vue.prototype.$outputDir = options.outputDir;
194
196
  components.map((item) => {
195
197
  Vue.component(`ol-${item.name}`, item);
196
198
  });