tianheng-ui 0.1.74 → 0.1.75

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.74",
4
+ "version": "0.1.75",
5
5
  "author": "shu lang <403732931@qq.com>",
6
6
  "license": "MIT",
7
7
  "private": false,
@@ -805,15 +805,25 @@ export default {
805
805
  },
806
806
  mounted() {
807
807
  bus.$on("fieldsInParamsActive", activeParams => {
808
- const data = this.fieldsData.inParams.filter(item => {
809
- return activeParams.includes(item.id);
810
- });
808
+ const data = [];
809
+ const initParams = list => {
810
+ list.map(item => {
811
+ if (activeParams.includes(item.id)) data.push(item);
812
+ if (item.children) initParams(item.children);
813
+ });
814
+ };
815
+ initParams(this.fieldsData.inParams);
811
816
  this.config.search.options = data;
812
817
  });
813
818
  bus.$on("fieldsOutParamsActive", activeParams => {
814
- const data = this.fieldsData.outParams.filter(item => {
815
- return activeParams.includes(item.id);
816
- });
819
+ const data = [];
820
+ const initParams = list => {
821
+ list.map(item => {
822
+ if (activeParams.includes(item.id)) data.push(item);
823
+ if (item.children) initParams(item.children);
824
+ });
825
+ };
826
+ initParams(this.fieldsData.outParams);
817
827
  this.config.table.options = data;
818
828
  });
819
829
  },