From 8b54060132df52462ffb5d2a1a9242efc24ffd40 Mon Sep 17 00:00:00 2001 From: zenggang Date: Mon, 25 Apr 2022 09:11:13 +0000 Subject: [PATCH 1/4] * Fix bug#15658,15644 --- module/api/js/common.js | 20 ++++++++++++++++++-- module/api/view/index.html.php | 2 +- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/module/api/js/common.js b/module/api/js/common.js index f03ba54592..14cbbefac5 100644 --- a/module/api/js/common.js +++ b/module/api/js/common.js @@ -200,6 +200,14 @@ try { } } }, + current: + { + type: Array + }, + ckey: + { + type: Number + } }, watch: { value: { @@ -209,6 +217,14 @@ try { deep: true, } }, + computed: + { + typeOptionsFilter: function() + { + if(this.current[this.ckey + 1] && this.current[this.ckey + 1].parentKey && this.current[this.ckey + 1].parentKey == this.current[this.ckey].key) return typeOptions.slice(0, 2); + return typeOptions; + } + }, methods: { add() { this.$emit('add', this.value) @@ -229,7 +245,7 @@ try { @@ -435,7 +451,7 @@ try { diff --git a/module/api/view/index.html.php b/module/api/view/index.html.php index c628dac373..ab1e501ca2 100644 --- a/module/api/view/index.html.php +++ b/module/api/view/index.html.php @@ -31,7 +31,7 @@ echo "