优化依赖安装

This commit is contained in:
marvzhang
2020-01-03 11:01:57 +08:00
parent e42dc9c759
commit 944f3c4bf8
2 changed files with 10 additions and 5 deletions

View File

@@ -1,18 +1,24 @@
<template>
<div class="node-installation">
<el-form inline>
<el-form-item v-if="!isShowInstalled">
<el-form-item>
<el-autocomplete
v-model="depName"
style="width: 240px"
:placeholder="$t('Search Dependencies')"
:fetchSuggestions="fetchAllDepList"
:minlength="2"
:disabled="isShowInstalled"
@select="onSearch"
/>
</el-form-item>
<el-form-item>
<el-button icon="el-icon-search" type="success" @click="onSearch">
<el-button
icon="el-icon-search"
type="success"
:disabled="isShowInstalled"
@click="onSearch"
>
{{$t('Search')}}
</el-button>
</el-form-item>
@@ -37,7 +43,7 @@
width="180"
/>
<el-table-column
:label="$t('Latest Version')"
:label="!isShowInstalled ? $t('Latest Version') : $t('Version')"
prop="version"
width="100"
/>
@@ -135,11 +141,9 @@ 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 () {

View File

@@ -267,6 +267,7 @@ export default {
'Number of CPU': 'CPU数',
'Executables': '执行文件',
'Latest Version': '最新版本',
'Version': '版本',
// 弹出框
'Notification': '提示',