File tree Expand file tree Collapse file tree 1 file changed +13
-11
lines changed
Expand file tree Collapse file tree 1 file changed +13
-11
lines changed Original file line number Diff line number Diff line change 3232 <tooltip-label :title =" $t('label.account')" :tooltip =" apiParams.addAccountToProject.account.description" />
3333 </template >
3434 <a-auto-complete
35- show-search
3635 v-model:value =" form.account"
3736 :placeholder =" apiParams.addAccountToProject.account.description"
38- v-focus =" true"
3937 :filterOption =" filterOption"
4038 :options =" accounts"
4139 >
@@ -278,21 +276,25 @@ export default {
278276 params .keyword = keyword
279277 }
280278 api (' listAccounts' , params).then (response => {
281- this .accounts = response .listaccountsresponse .account || []
282- if (this .accounts .length > 0 ) {
283- this .accounts = this .accounts .map (account => {
284- return {
285- value: account .name ,
286- ... account
287- }
288- })
289- }
279+ this .accounts = this .parseAccounts (response .listaccountsresponse .account )
290280 }).catch (error => {
291281 this .$notifyError (error)
292282 }).finally (() => {
293283 this .load .accounts = false
294284 })
295285 },
286+ parseAccounts (accounts ) {
287+ if (! accounts) {
288+ return []
289+ }
290+
291+ return accounts .map (account => {
292+ return {
293+ value: account .name ,
294+ icon: account .icon
295+ }
296+ })
297+ },
296298 fetchProjectRoles () {
297299 this .load .projectRoles = true
298300 api (' listProjectRoles' , {
You can’t perform that action at this time.
0 commit comments