gy-webcode2 1.0.1 → 1.0.3

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.
@@ -2,12 +2,12 @@
2
2
  <div class="breadcrumb">
3
3
  <div class="row1" v-show="$store.state.breadcrumbShow">
4
4
  <div class="title ">
5
- <span class="">{{headerName}}</span>
5
+ <span class="">{{$route.meta.headerMenuName}}</span>
6
6
  <span class="iconBox">
7
7
  <i class="el-icon-arrow-right"></i>
8
8
  </span>
9
9
  <span @click="menuClick" :class="{myHover:breadcrumb_list.length,s1:breadcrumb_list.length == 0}" >
10
- {{$store.state.menu.menuActive.name}}
10
+ {{$route.meta.name}}
11
11
  </span>
12
12
  <template v-for="item,index in breadcrumb_list">
13
13
  <span class="iconBox">
@@ -32,7 +32,7 @@
32
32
  {{breadcrumb_list[breadcrumb_list.length -1].name}}
33
33
  </template>
34
34
  <template v-else>
35
- {{$store.state.menu.menuActive.name}}
35
+ {{$route.meta.name}}
36
36
  </template>
37
37
  </span>
38
38
  </div>
@@ -57,21 +57,6 @@ export default {
57
57
  },
58
58
  },
59
59
  computed:{
60
- activePath() {
61
- return this.$store.state.menu.activePath
62
- },
63
- headerName() {
64
- const list = this.$store.state.menu.data[0] || [];
65
- let isFind = list.list.find((item2,index2) => {
66
- if(index2 == this.activePath && item2.ismy == 1){
67
- return true;
68
- }
69
- })
70
- if(isFind){
71
- return isFind.name
72
- }
73
- return ''
74
- },
75
60
  names(){
76
61
  return this.name ? this.name.split(',') : []
77
62
  },
@@ -72,7 +72,6 @@
72
72
  // value:"lv"
73
73
  // },
74
74
  ],
75
- themeActive:'default',
76
75
 
77
76
  themeColorList:[
78
77
  {
@@ -124,8 +123,6 @@
124
123
  color:"#722ed1"
125
124
  },
126
125
  ],
127
- themeColorActrive:"lan",
128
-
129
126
  }
130
127
  },
131
128
  computed:{
@@ -139,9 +136,11 @@
139
136
  methods:{
140
137
  changeTheme(value){
141
138
  this.$store.state.themeName = value;
139
+ window.document.body.setAttribute('data-theme', value)
142
140
  },
143
141
  changeThemeColor(value){
144
142
  this.$store.state.themeColor = value;
143
+ window.document.body.setAttribute('data-theme-color', value)
145
144
  }
146
145
  }
147
146
  }
package/extend/axios.js CHANGED
@@ -154,7 +154,17 @@ http.interceptors.response.use(
154
154
  return response.data;
155
155
  },
156
156
  function (error) {
157
- return "";
157
+ if (error.response) {
158
+ return error.response.data;
159
+ }
160
+ else {
161
+ }
162
+ console.log(error);
163
+ // 对响应错误做点什么
164
+ return Promise.reject({
165
+ status: 9999,
166
+ message: "服务器连接失败"
167
+ });
158
168
  // 对响应错误做点什么
159
169
  // return Promise.reject(error);
160
170
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gy-webcode2",
3
- "version": "1.0.1",
3
+ "version": "1.0.3",
4
4
  "description": "gy前端公共代码",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/updateLog.txt CHANGED
@@ -0,0 +1 @@
1
+ 222