web-component-gallery 0.1.25 → 0.1.26

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": "web-component-gallery",
3
- "version": "0.1.25",
3
+ "version": "0.1.26",
4
4
  "description": "vue-library-ui组件库",
5
5
  "main": "dist/index.umd.js",
6
6
  "files": [
@@ -209,6 +209,9 @@ export default {
209
209
  // 获取实时路况信息
210
210
  }
211
211
 
212
+ /** 判断点及面之间的关系(例:点是否再面中 */
213
+ // function
214
+
212
215
  /** 轨迹动画 */
213
216
  /**
214
217
  *
@@ -1,14 +1,16 @@
1
1
  import notification from 'ant-design-vue/es/notification'
2
2
 
3
+ /* 抛出401错误码 用于处理不同项目下处理方式 */
4
+ export function errorMessage(status, { msg }, callBack = () => {}) {
5
+ /* 200为正常状态码 捕捉到直接返回 */
6
+ if(status === 200) return
7
+ if(status === 401) return callBack()
8
+ notification.error({
9
+ message: '请求失败!',
10
+ description: msg || '服务器请求失败'
11
+ })
12
+ }
13
+
3
14
  export default {
4
- /* 抛出401错误码 用于处理不同项目下处理方式 */
5
- errorMessage(status, { msg }, callBack = () => {}) {
6
- /* 200为正常状态码 捕捉到直接返回 */
7
- if(status === 200) return
8
- if(status === 401) return callBack()
9
- notification.error({
10
- message: '请求失败!',
11
- description: msg || '服务器请求失败'
12
- })
13
- }
15
+ errorMessage
14
16
  }