diff --git a/frontend/src/components/Node/NodeInstallation.vue b/frontend/src/components/Node/NodeInstallation.vue index df487434..320b0b7f 100644 --- a/frontend/src/components/Node/NodeInstallation.vue +++ b/frontend/src/components/Node/NodeInstallation.vue @@ -7,7 +7,7 @@ style="width: 240px" :placeholder="$t('Search Dependencies')" :fetchSuggestions="fetchAllDepList" - minlength="2" + :minlength="2" @select="onSearch" /> @@ -134,6 +134,13 @@ export default { }) this.loading = false this.depList = res.data.data.sort((a, b) => a.name > b.name ? 1 : -1) + this.depList.map(async dep => { + this.$set(dep, 'loading', true) + const res = await this.$request.get(`/system/deps/${this.activeLang.executable_name}/${dep.name}/json`) + dep.version = res.data.data.version + dep.description = res.data.data.description + this.$set(dep, 'loading', false) + }) }, async getInstalledDepList () { this.loading = true @@ -144,8 +151,7 @@ export default { this.installedDepList = res.data.data }, async fetchAllDepList (queryString, callback) { - const res = await this.$request.get('/system/deps', { - lang: this.activeLang.executable_name, + const res = await this.$request.get(`/system/deps/${this.activeLang.executable_name}`, { dep_name: queryString }) callback(res.data.data ? res.data.data.map(d => { @@ -229,7 +235,13 @@ export default {