@gonsin/gview 1.0.2-alpha.0 → 1.1.0

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/README.md CHANGED
@@ -1,26 +1,66 @@
1
- # gview
2
-
3
- ## Project setup
4
- ```
5
- npm install
6
- ```
7
-
8
- ### Compiles and hot-reloads for development
9
- ```
10
- npm run serve
11
- ```
12
-
13
- ### Compiles and minifies for production
14
- ```
15
- npm run build
16
- ```
17
-
18
- ### Run your tests
19
- ```
20
- npm run test
21
- ```
22
-
23
- ### Lints and fixes files
24
- ```
25
- npm run lint
26
- ```
1
+ # GView
2
+
3
+ ## 安装依赖
4
+
5
+ ```sh
6
+ npm install
7
+ ```
8
+
9
+ ## 项目测试
10
+
11
+ ```sh
12
+ npm run serve
13
+ ```
14
+
15
+ ## 项目打包
16
+
17
+ ```sh
18
+ npm run build
19
+ ```
20
+
21
+ ## 项目发布
22
+
23
+ ```sh
24
+ npm publish
25
+ ```
26
+
27
+ ## 使用方法:
28
+
29
+ 详细参考 `example` 项目。
30
+
31
+ `main.js` 配置:
32
+
33
+ ```js
34
+ // 引入 GView 标签
35
+ import GView from "@gonsin/gview";
36
+ Vue.use(GView, { store });
37
+
38
+ new Vue({
39
+ router,
40
+ render: (h) => h(App),
41
+ }).$mount("#app");
42
+ ```
43
+
44
+ 根据开发修改接口的地址:
45
+
46
+ ```js
47
+ proxy: {
48
+ "/api": {
49
+ target: "http://192.168.2.192:8088",
50
+ changeOrigin: true,
51
+ disableHostCheck: false, // 新增该配置项
52
+ },
53
+ "/restapi": {
54
+ target: "http://192.168.2.192:8088",
55
+ changeOrigin: true,
56
+ disableHostCheck: false, // 新增该配置项
57
+ },
58
+ // 配置websocket开发时代理
59
+ "/gview/websocket": {
60
+ target: "ws://192.168.2.192:8088",
61
+ changeOrigin: true,
62
+ disableHostCheck: false, // 新增该配置项
63
+ },
64
+ },
65
+
66
+ ```