ol-base-components 1.2.3 → 1.2.4
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/main.js +3 -5
- package/src/package/index.js +6 -7
package/package.json
CHANGED
package/src/main.js
CHANGED
package/src/package/index.js
CHANGED
|
@@ -32,26 +32,25 @@ export const SwaggerHandler = async (Vue, swaggerUrl) => {
|
|
|
32
32
|
|
|
33
33
|
const components = [OlTable, OlSearch, Dialog];
|
|
34
34
|
|
|
35
|
-
const install = function (
|
|
35
|
+
const install = async function (
|
|
36
36
|
Vue,
|
|
37
37
|
options = {
|
|
38
38
|
swaggerUrl: "",
|
|
39
39
|
}
|
|
40
40
|
) {
|
|
41
|
-
if (options && options.swaggerUrl) {
|
|
42
|
-
// "http://220.179.249.140:20019/swagger/v1/swagger.json"
|
|
43
|
-
const client = new SwaggerClient(options.swaggerUrl);
|
|
44
|
-
Vue.prototype.$swagger = { specification: client.spec };
|
|
45
|
-
}
|
|
46
41
|
// 遍历所有组件
|
|
47
42
|
components.map((item) => {
|
|
48
43
|
Vue.component(`ol-${item.name}`, item);
|
|
49
44
|
});
|
|
50
45
|
|
|
46
|
+
if (options && options.swaggerUrl) {
|
|
47
|
+
// "http://220.179.249.140:20019/swagger/v1/swagger.json"
|
|
48
|
+
const client = await new SwaggerClient(options.swaggerUrl);
|
|
49
|
+
Vue.prototype.$swagger = { specification: client.spec };
|
|
50
|
+
}
|
|
51
51
|
consoleTooltip();
|
|
52
52
|
};
|
|
53
53
|
|
|
54
54
|
// 判断是否引入文件
|
|
55
55
|
export default install; //全局导入
|
|
56
56
|
export { OlTable, OlSearch, Dialog }; //按需导入
|
|
57
|
-
// export { Swagger };
|