tianheng-ui 0.1.12 → 0.1.15

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.
@@ -15,8 +15,9 @@ export const init = baseConfig => {
15
15
  config => {
16
16
  const info = sessionStorage.getItem("th_oauth_info");
17
17
  if (info) {
18
- const token = JSON.parse(info).token;
19
- config.headers["Authorization"] = token;
18
+ const oauthInfo = JSON.parse(info)
19
+ config.baseURL = oauthInfo.baseUrl
20
+ config.headers["Authorization"] = oauthInfo.token;
20
21
  }
21
22
  if (baseConfig.headers) {
22
23
  config.headers = Object.assign(config.headers, baseConfig.headers);
@@ -0,0 +1,23 @@
1
+ export const deepClone = (obj, clone) => {
2
+ //判断拷贝的要进行深拷贝的是数组还是对象,是数组的话进行数组拷贝,对象的话进行对象拷贝
3
+ const toString = Object.prototype.toString;
4
+ toString.call(obj) === "[object Array]"
5
+ ? (clone = clone || [])
6
+ : (clone = clone || {});
7
+ for (const i in obj) {
8
+ if (typeof obj[i] === "object" && obj[i] !== null) {
9
+ // 要考虑深复制问题了
10
+ if (Array.isArray(obj[i])) {
11
+ // 这是数组
12
+ clone[i] = [];
13
+ } else {
14
+ // 这是对象
15
+ clone[i] = {};
16
+ }
17
+ deepClone(obj[i], clone[i]);
18
+ } else {
19
+ clone[i] = obj[i];
20
+ }
21
+ }
22
+ return clone;
23
+ };
@@ -53,6 +53,21 @@
53
53
  border-radius: 50%;
54
54
  }
55
55
 
56
+ .th-flex_box {
57
+ display: flex;
58
+ height: 100%;
59
+ }
60
+ .th-flex_aside {
61
+ width: 250px;
62
+ height: 100%;
63
+ overflow-y: overlay;
64
+ }
65
+ .th-fiex_content {
66
+ flex: 1;
67
+ height: 100%;
68
+ overflow-y: overlay;
69
+ }
70
+
56
71
  [v-cloak] {
57
72
  display: none;
58
73
  }