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 +1 -1
- package/src/api/runApi.js +2 -1
- package/src/package/index.js +4 -2
package/package.json
CHANGED
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 =
|
|
9
|
+
const modulesDir =
|
|
10
|
+
Vue.prototype.$outputDir || path.join(__dirname, "./modules"); // 使用 Vue.prototype 中的 outputDir
|
|
10
11
|
|
|
11
12
|
SwaggerClient(swaggerUrl)
|
|
12
13
|
.then((client) => {
|
package/src/package/index.js
CHANGED
|
@@ -187,10 +187,12 @@ function hideLoading() {
|
|
|
187
187
|
const install = async function (
|
|
188
188
|
Vue,
|
|
189
189
|
options = {
|
|
190
|
-
|
|
190
|
+
swaggerUrl: "",
|
|
191
|
+
outputDir:''
|
|
191
192
|
}
|
|
192
193
|
) {
|
|
193
|
-
if (options && options.
|
|
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
|
});
|