tianheng-ui 0.0.102 → 0.0.104

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.
@@ -24,8 +24,6 @@ export const init = baseConfig => {
24
24
  return config;
25
25
  },
26
26
  error => {
27
- // Do something with request error
28
- console.log(error); // for debug
29
27
  Promise.reject(error);
30
28
  }
31
29
  );
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "tianheng-ui",
3
3
  "description": "A Vue.js project",
4
- "version": "0.0.102",
4
+ "version": "0.0.104",
5
5
  "author": "shu lang <403732931@qq.com>",
6
6
  "license": "MIT",
7
7
  "private": false,
@@ -89,9 +89,11 @@ export default {
89
89
  },
90
90
  methods: {
91
91
  initConfig() {
92
- if (Object.keys(this.config).length) {
93
- this.$refs.configRef.tableConfig = this.config;
94
- }
92
+ if (!this.config || Object.keys(this.config).length === 0) return;
93
+
94
+ console.log("initConfig =>", this.config, this.fields);
95
+
96
+ this.$refs.configRef.tableConfig = this.config;
95
97
 
96
98
  const searchFields = [];
97
99
  const searchFieldsIndexs = [];
@@ -100,7 +102,7 @@ export default {
100
102
  for (const item of searchOptions) {
101
103
  for (let i = 0; i < this.fields.length; i++) {
102
104
  const element = this.fields[i];
103
- if (element.prop === item.prop) {
105
+ if (element.alias === item.prop) {
104
106
  searchFields.push(item);
105
107
  searchFieldsIndexs.push(i);
106
108
  }
@@ -123,7 +125,7 @@ export default {
123
125
  for (const item of tableOptions) {
124
126
  for (let i = 0; i < this.fields.length; i++) {
125
127
  const element = this.fields[i];
126
- if (element.prop === item.prop) {
128
+ if (element.alias === item.prop) {
127
129
  tableFields.push(item);
128
130
  tableFieldsIndexs.push(i);
129
131
  }
@@ -425,7 +425,7 @@ const tableConfig = {
425
425
  }
426
426
  }
427
427
  }
428
- };
428
+ };
429
429
 
430
430
  export const tableItemConfig = key => {
431
431
  const config = tableConfig[key] || null;
@@ -71,7 +71,7 @@
71
71
  v-for="item in fields"
72
72
  :key="item.prop"
73
73
  :label="item.label"
74
- :value="item.prop"
74
+ :value="item.alias"
75
75
  >
76
76
  </el-option>
77
77
  </el-select>