|
29 | 29 |
|
30 | 30 | <div class="form__item"> |
31 | 31 | <p class="form__label">{{ $t('label.accounttype') }}</p> |
32 | | - <a-select v-model="selectedAccountType" defaultValue="account" autoFocus> |
| 32 | + <a-select |
| 33 | + v-model="selectedAccountType" |
| 34 | + defaultValue="account" |
| 35 | + autoFocus |
| 36 | + showSearch |
| 37 | + optionFilterProp="children" |
| 38 | + :filterOption="(input, option) => { |
| 39 | + return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0 |
| 40 | + }" > |
33 | 41 | <a-select-option :value="$t('label.account')">{{ $t('label.account') }}</a-select-option> |
34 | 42 | <a-select-option :value="$t('label.project')">{{ $t('label.project') }}</a-select-option> |
35 | 43 | </a-select> |
36 | 44 | </div> |
37 | 45 |
|
38 | 46 | <div class="form__item"> |
39 | 47 | <p class="form__label"><span class="required">*</span>{{ $t('label.domain') }}</p> |
40 | | - <a-select @change="changeDomain" v-model="selectedDomain" :defaultValue="selectedDomain"> |
| 48 | + <a-select |
| 49 | + @change="changeDomain" |
| 50 | + v-model="selectedDomain" |
| 51 | + :defaultValue="selectedDomain" |
| 52 | + showSearch |
| 53 | + optionFilterProp="children" |
| 54 | + :filterOption="(input, option) => { |
| 55 | + return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0 |
| 56 | + }" > |
41 | 57 | <a-select-option v-for="domain in domains" :key="domain.name" :value="domain.id"> |
42 | 58 | {{ domain.path || domain.name || domain.description }} |
43 | 59 | </a-select-option> |
|
47 | 63 | <template v-if="selectedAccountType === 'Account'"> |
48 | 64 | <div class="form__item"> |
49 | 65 | <p class="form__label"><span class="required">*</span>{{ $t('label.account') }}</p> |
50 | | - <a-select @change="changeAccount" v-model="selectedAccount"> |
| 66 | + <a-select |
| 67 | + @change="changeAccount" |
| 68 | + v-model="selectedAccount" |
| 69 | + showSearch |
| 70 | + optionFilterProp="children" |
| 71 | + :filterOption="(input, option) => { |
| 72 | + return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0 |
| 73 | + }" > |
51 | 74 | <a-select-option v-for="account in accounts" :key="account.name" :value="account.name"> |
52 | 75 | {{ account.name }} |
53 | 76 | </a-select-option> |
|
59 | 82 | <template v-else> |
60 | 83 | <div class="form__item"> |
61 | 84 | <p class="form__label"><span class="required">*</span>{{ $t('label.project') }}</p> |
62 | | - <a-select @change="changeProject" v-model="selectedProject"> |
| 85 | + <a-select |
| 86 | + @change="changeProject" |
| 87 | + v-model="selectedProject" |
| 88 | + showSearch |
| 89 | + optionFilterProp="children" |
| 90 | + :filterOption="(input, option) => { |
| 91 | + return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0 |
| 92 | + }" > |
63 | 93 | <a-select-option v-for="project in projects" :key="project.id" :value="project.id"> |
64 | 94 | {{ project.name }} |
65 | 95 | </a-select-option> |
|
70 | 100 |
|
71 | 101 | <div class="form__item"> |
72 | 102 | <p class="form__label">{{ $t('label.network') }}</p> |
73 | | - <a-select v-model="selectedNetwork"> |
| 103 | + <a-select |
| 104 | + v-model="selectedNetwork" |
| 105 | + showSearch |
| 106 | + optionFilterProp="children" |
| 107 | + :filterOption="(input, option) => { |
| 108 | + return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0 |
| 109 | + }" > |
74 | 110 | <a-select-option v-for="network in networks" :key="network.id" :value="network.id"> |
75 | 111 | {{ network.name ? network.name : '-' }} |
76 | 112 | </a-select-option> |
|
0 commit comments