@gonsin/gview 1.1.4 → 1.1.5

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
@@ -108,7 +108,7 @@ const routes = [
108
108
 
109
109
  > 与 GView 路由组件相关的路由路径 `path` 必须设置为 `/view`;登录页面的路由路径必须设置为 `/login`;根据需求设置重定向以及路由守卫。具体参考 `example/src/router/index.js`。
110
110
 
111
- 4. `GView` 组件的具体用法:
111
+ 4. GView 组件的具体用法:
112
112
 
113
113
  ```html
114
114
  <template>
@@ -118,13 +118,27 @@ const routes = [
118
118
 
119
119
  > `:config` 传入用户登录信息以及登录权限菜单;另外可后续传入更多自定义配置。 具体参考 `example/src/views/HomeView.vue`。
120
120
 
121
- 5. 另外 GView 提供了已经封装好的 axios 工具,可以直接引入使用:
121
+ 5. 另外 GView 提供了已经封装好的 axios 工具以及规范的存储常量名称,可以直接引入使用:
122
122
 
123
123
  ```js
124
124
  // 引入提供的axios封装工具
125
125
  import { http } from "@gonsin/gview";
126
+
127
+ // 以用户登录接口为例,使用 http.post 方法发送 POST 请求:
128
+ export const loginApi = (params) => {
129
+ return http.post(loginApiUrl.loginUrl, qs.stringify(params));
130
+ };
131
+ ```
132
+
133
+ ```js
134
+ import { config } from "@gonsin/gview";
135
+
136
+ // 存入 sessionStorage 最好使用 config 给出的相关常量:
137
+ sessionStorage.setItem(config.LOCAL_USER, JSON.stringify(res.data));
126
138
  ```
127
139
 
140
+ > 更多用法参考 `example/src/store/modules/user.js` 。
141
+
128
142
  ## 版本更新日志
129
143
 
130
144
  ### 1.1.0 `2022-12-12`
@@ -149,17 +163,30 @@ import { http } from "@gonsin/gview";
149
163
  - fix(f934526): `GTable` 完善表格视图的分页功能
150
164
  - fix(9c90248): 完善路由守卫
151
165
 
152
- ### 1.14 `2022-12-16`
166
+ ### 1.1.4 `2022-12-16`
153
167
 
154
168
  - fix(82e545e): 将登录后初始化用户信息及菜单等逻辑转入 GView 包内进行:
155
-
156
169
  - 涉及 `example` 用法的更新,使用 GView 组件时传入用户登录后的信息、菜单即可
157
170
  - 更加方便之后传入更多自定义的配置到 GView 中
158
-
159
171
  - fix(8a3d5d9): 处理重复路由跳转报错
160
172
  - feat(5373d6b): `GForm` 完善表单隐藏项目类型
161
173
  - feat(b532d8e): `Auth` 完善传入的 token 以及在每个请求头中添加 token 字段
162
174
  - fix(f1067bd): 修复刷新后回到首页问题
163
175
  - fix(e25aa5a): 修改样式以及规范样式类命名
164
176
  - fix(275d821): 解决打包时的变量丢失问题
165
- - fix(3387471) 调整用户登录相关的逻辑
177
+ - fix(3387471): 调整用户登录相关的逻辑
178
+
179
+ ### 1.1.5 `2022-12-17`
180
+
181
+ - `GForm`:
182
+ - fix(dfadcc4): 修复部分表单类型的 showIf 不起作用的问题
183
+ - fix(76738e9): 调整上传组件的 placeholder
184
+ - fix(08c540f): 修复表单 key 重复报错及空白问题
185
+ - fix(e60277d): `GView` 解决请求访问 view 数据为空报错的问题
186
+ - fix(f085ea7): `GDialog` 完善对话框表单请求数据
187
+ - feat(a46a7a3): `GHeader` 完善头部搜索过滤数据功能
188
+ - fix(5c39de4): `GForm` 修改表单选择下拉数据携带查询参数
189
+ - feat(d931ff0): `GForm` 完善表单动态 disableIf 功能
190
+ - fix(f0dbd8a): 修复过滤菜单时可能报错导致页面空白问题
191
+ - feat(6aef710): 新增系统设置面板相关功能
192
+ - fix(c49137f): 修改获取用户菜单的接口路径