tianheng-ui 0.1.47 → 0.1.48

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,7 +1,7 @@
1
1
  {
2
2
  "name": "tianheng-ui",
3
3
  "description": "A Vue.js project",
4
- "version": "0.1.47",
4
+ "version": "0.1.48",
5
5
  "author": "shu lang <403732931@qq.com>",
6
6
  "license": "MIT",
7
7
  "private": false,
@@ -198,6 +198,7 @@
198
198
  style="width:100%"
199
199
  clearable
200
200
  placeholder="请选择"
201
+ filterable
201
202
  no-data-text="暂无接口,请前往【数据源模块】创建"
202
203
  >
203
204
  <el-option
@@ -577,16 +578,13 @@ export default {
577
578
  },
578
579
  handleFieldsApiChange(apiId, isFields) {
579
580
  if (isFields) this.fieldsData = { inParams: [], outParams: [] };
581
+ if (!this.apiOptions.length || !apiId) return;
580
582
 
581
- if (!this.apiOptions.length || !this.config.fields.api || !apiId) {
582
- return;
583
- }
584
583
  const api = this.apiOptions.filter(item => {
585
584
  return item.id === apiId;
586
585
  })[0];
587
-
588
586
  if (!api) {
589
- this.$message.warning("未知的接口名,请检查配置信息");
587
+ this.$message.warning("未知的接口,请检查配置信息");
590
588
  return;
591
589
  }
592
590
 
@@ -102,6 +102,7 @@
102
102
  placeholder="请选择"
103
103
  no-data-text="暂无接口,请前往【接口模块】创建"
104
104
  filterable
105
+ @change="handleResetTableFields"
105
106
  >
106
107
  <el-option
107
108
  v-for="item in apiOptions"
@@ -782,21 +783,22 @@ export default {
782
783
  },
783
784
  mounted() {},
784
785
  methods: {
786
+ handleResetTableFields() {
787
+ this.config.search.options = [];
788
+ this.config.table.options = [];
789
+ },
785
790
  handleActionConfig(data) {
786
791
  this.dialog = { show: true, data };
787
792
  },
788
793
  handleFieldsApiChange(apiId, isFields) {
789
- if (isFields) {
790
- // this.config.search.options = [];
791
- // this.config.table.options = [];
792
- this.fieldsData = { inParams: [], outParams: [] };
793
- }
794
- if (!apiId) return;
794
+ if (isFields) this.fieldsData = { inParams: [], outParams: [] };
795
+ if (!this.apiOptions.length || !apiId) return;
796
+
795
797
  const api = this.apiOptions.filter(item => {
796
798
  return item.id === apiId;
797
799
  })[0];
798
800
  if (!api) {
799
- this.$message.warning("未知的接口名,请检查配置信息");
801
+ this.$message.warning("未知的接口,请检查配置信息");
800
802
  return;
801
803
  }
802
804
 
@@ -47,7 +47,7 @@
47
47
  >
48
48
  <div
49
49
  v-for="item in config.search.options"
50
- :key="item.pAlias"
50
+ :key="item.id"
51
51
  class="table-item"
52
52
  >
53
53
  <div class="table-item-custom drag">
@@ -135,7 +135,7 @@
135
135
  >
136
136
  <div
137
137
  v-for="item in config.table.options"
138
- :key="item.pAlias"
138
+ :key="item.id"
139
139
  class="table-item"
140
140
  >
141
141
  <div class="table-item-custom drag">