@gonsin/gview 1.0.2-alpha.0 → 1.0.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.
Files changed (2) hide show
  1. package/README.md +66 -13
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,26 +1,79 @@
1
- # gview
1
+ <!--
2
+ * @Author: lrm lrm@gonsin.cn
3
+ * @Date: 2022-10-25 15:17:48
4
+ * @LastEditors: lrm lrm@gonsin.cn
5
+ * @LastEditTime: 2022-12-05 09:21:02
6
+ * @FilePath: \client\README.md
7
+ * @Description:
8
+ *
9
+ * Copyright (c) 2022 by lrm lrm@gonsin.cn, All Rights Reserved.
10
+ -->
11
+ # GView
2
12
 
3
- ## Project setup
4
- ```
13
+ ## 安装依赖
14
+
15
+ ```sh
5
16
  npm install
6
17
  ```
7
18
 
8
- ### Compiles and hot-reloads for development
9
- ```
19
+ ## 项目测试
20
+
21
+ ```sh
10
22
  npm run serve
11
23
  ```
12
24
 
13
- ### Compiles and minifies for production
14
- ```
25
+
26
+ ## 项目打包
27
+
28
+ ```sh
15
29
  npm run build
16
30
  ```
17
31
 
18
- ### Run your tests
19
- ```
20
- npm run test
21
- ```
32
+ ## 项目发布
22
33
 
23
- ### Lints and fixes files
34
+ ```sh
35
+ npm publish
24
36
  ```
25
- npm run lint
37
+
38
+ ## 使用方法:
39
+
40
+ 详细参考 `example` 项目。
41
+
42
+ `main.js` 配置:
43
+
44
+ ```js
45
+ // 引入 GView 标签
46
+ import GView from "@gonsin/gview";
47
+ Vue.use(GView);
48
+
49
+ new Vue({
50
+ router,
51
+ store: GView.store, // 引入 GView 的 store
52
+ render: (h) => h(App),
53
+ }).$mount("#app");
54
+
26
55
  ```
56
+
57
+ 根据开发修改接口的地址:
58
+
59
+ ```js
60
+ proxy: {
61
+ "/api": {
62
+ target: "http://192.168.2.192:8088",
63
+ changeOrigin: true,
64
+ disableHostCheck: false, // 新增该配置项
65
+ },
66
+ "/restapi": {
67
+ target: "http://192.168.2.192:8088",
68
+ changeOrigin: true,
69
+ disableHostCheck: false, // 新增该配置项
70
+ },
71
+ // 配置websocket开发时代理
72
+ "/gview/websocket": {
73
+ target: "ws://192.168.2.192:8088",
74
+ changeOrigin: true,
75
+ disableHostCheck: false, // 新增该配置项
76
+ },
77
+ },
78
+
79
+ ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gonsin/gview",
3
- "version": "1.0.2-alpha.0",
3
+ "version": "1.0.2",
4
4
  "main": "dist/index.js",
5
5
  "files": [
6
6
  "dist"