ol-base-components 1.1.0 → 1.2.1

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": "1.1.0",
3
+ "version": "1.2.1",
4
4
  "private": false,
5
5
  "main": "src/package/index.js",
6
6
  "scripts": {
package/src/main.js CHANGED
@@ -3,10 +3,10 @@ import ElementUI from "element-ui";
3
3
  import "element-ui/lib/theme-chalk/index.css";
4
4
  import App from "./App.vue";
5
5
 
6
- import olCom, { Swagger, SwaggerHandler } from "@/package/index.js";
6
+ // import olCom, { SwaggerHandler } from "@/package/index.js";
7
7
 
8
- Vue.use(olCom);
9
- SwaggerHandler(Vue)
8
+ // Vue.use(olCom);
9
+ // SwaggerHandler(Vue)
10
10
  // Vue.config.productionTip = false;
11
11
  Vue.use(ElementUI);
12
12
 
@@ -1,9 +1,6 @@
1
1
  import OlTable from "./table";
2
2
  import OlSearch from "./formSearch";
3
3
  import Dialog from "./dialog";
4
- // import Swagger from "../utils/swagger";
5
- import ElementUI from "element-ui";
6
- import "element-ui/lib/theme-chalk/index.css";
7
4
  import SwaggerClient from "swagger-client";
8
5
 
9
6
  const consoleTooltip = () => {
@@ -43,12 +40,11 @@ const install = function (
43
40
  swaggerUrl: "",
44
41
  }
45
42
  ) {
46
- if (option && option.swaggerUrl) {
43
+ if (options && options.swaggerUrl) {
47
44
  // "http://220.179.249.140:20019/swagger/v1/swagger.json"
48
- const swaggerInstance = new Swagger(option.swaggerUrl);
45
+ const swaggerInstance = new SwaggerClient(options.swaggerUrl);
49
46
  Vue.prototype.$swagger = swaggerInstance;
50
47
  }
51
- Vue.use(ElementUI);
52
48
  // 遍历所有组件
53
49
  components.map((item) => {
54
50
  Vue.component(`ol-${item.name}`, item);
File without changes
@@ -1,21 +0,0 @@
1
- // index.js
2
- import SwaggerClient from "swagger-client";
3
- // 创建一个新的列数组
4
- class Swagger {
5
- constructor(swaggerUrl, options = {}) {
6
- this.swaggerUrl = swaggerUrl;
7
- this.options = options;
8
- // this.apis = {};
9
- this.specification = {}; // swagger规范
10
- this.init();
11
- }
12
-
13
- async init() {
14
- const client = await SwaggerClient({
15
- url: this.swaggerUrl,
16
- });
17
- this.specification = client.spec;
18
- }
19
- }
20
-
21
- export default Swagger;