ol-base-components 1.0.0 → 1.0.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.0.0",
3
+ "version": "1.0.1",
4
4
  "private": false,
5
5
  "main": "src/package/index.js",
6
6
  "scripts": {
@@ -9,6 +9,8 @@
9
9
  "lint": "vue-cli-service lint"
10
10
  },
11
11
  "dependencies": {
12
+ "@swagger-api/apidom-json-pointer": "^1.0.0-beta.44",
13
+ "@swagger-api/apidom-reference": "^1.0.0-beta.44",
12
14
  "core-js": "^3.8.3",
13
15
  "element-ui": "^2.15.14",
14
16
  "eslint": "^8.57.1",
package/src/main.js CHANGED
@@ -4,28 +4,11 @@ import "element-ui/lib/theme-chalk/index.css";
4
4
  import App from "./App.vue";
5
5
 
6
6
  import olCom, { Swagger } from "@/package/index.js";
7
- // const swaggerInstance = new Swagger(
8
- // "http://220.179.249.140:20019/swagger/v1/swagger.json"
9
- // );
10
- // Vue.prototype.$api = swaggerInstance;
11
- // console.log(222, swaggerInstance);
12
7
 
13
- // async function fetchStockData() {
14
- // const stockApi = await swaggerInstance.getApi(
15
- // cccccccccccccccccccc
16
- // ); // 获取 API 函数
17
- // const res = await stockApi({
18
- // // 调用 API 函数并传递参数
19
- // Page: 1,
20
- // MaxResultCount: 30,
21
- // });
22
- // console.log(res); // 打印返回的结果
23
- // }
24
-
25
- // fetchStockData(); // 调用函数以获取数据
26
-
27
- Vue.use(olCom);
28
- Vue.config.productionTip = false;
8
+ Vue.use(olCom, {
9
+ swaggerUrl: "http://220.179.249.140:20019/swagger/v1/swagger.json",
10
+ });
11
+ // Vue.config.productionTip = false;
29
12
  Vue.use(ElementUI);
30
13
 
31
14
  setTimeout(() => {
@@ -1,7 +1,7 @@
1
1
  import OlTable from "./table";
2
2
  import OlSearch from "./formSearch";
3
3
  import Dialog from "./dialog";
4
- import Swagger from "@/utils/swagger";
4
+ import Swagger from "../utils/swagger";
5
5
 
6
6
  const consoleTooltip = () => {
7
7
  // 定义颜色和样式
@@ -32,9 +32,12 @@ const install = function (
32
32
  swaggerUrl: "",
33
33
  }
34
34
  ) {
35
- // "http://220.179.249.140:20019/swagger/v1/swagger.json"
36
- const swaggerInstance = new Swagger(option?.swaggerUrl);
37
- Vue.prototype.$swagger = swaggerInstance;
35
+ console.log(3333333333, option);
36
+ if (option.swaggerUrl) {
37
+ // "http://220.179.249.140:20019/swagger/v1/swagger.json"
38
+ const swaggerInstance = new Swagger(option.swaggerUrl);
39
+ Vue.prototype.$swagger = swaggerInstance;
40
+ }
38
41
  // 遍历所有组件
39
42
  components.map((item) => {
40
43
  Vue.component(`ol-${item.name}`, item);