Showing
3 changed files
with
36 additions
and
0 deletions
... | ... | @@ -10,6 +10,8 @@ |
10 | 10 | style="width: 150px" |
11 | 11 | placeholder="请选择租户" |
12 | 12 | :options="selectOptions" |
13 | + show-search | |
14 | + :filter-option="filterOption" | |
13 | 15 | /> |
14 | 16 | <Select |
15 | 17 | v-model:value="selectSysTenant" |
... | ... | @@ -19,6 +21,8 @@ |
19 | 21 | v-if="selectTenantOptions.length > 0" |
20 | 22 | placeholder="请选择租户" |
21 | 23 | :options="selectTenantOptions" |
24 | + show-search | |
25 | + :filter-option="filterTenantOption" | |
22 | 26 | /> |
23 | 27 | </div> |
24 | 28 | <Button |
... | ... | @@ -119,6 +123,14 @@ |
119 | 123 | |
120 | 124 | const getToken = ref(''); |
121 | 125 | |
126 | + const filterOption = (input: string, option: any) => { | |
127 | + return option.label.includes(input); | |
128 | + }; | |
129 | + | |
130 | + const filterTenantOption = (input: string, option: any) => { | |
131 | + return option.label.includes(input); | |
132 | + }; | |
133 | + | |
122 | 134 | const onSelect = async (e) => { |
123 | 135 | if (e) { |
124 | 136 | testDisabled.value = false; | ... | ... |
... | ... | @@ -10,6 +10,8 @@ |
10 | 10 | style="width: 150px" |
11 | 11 | placeholder="请选择租户" |
12 | 12 | :options="selectOptions" |
13 | + show-search | |
14 | + :filter-option="filterOption" | |
13 | 15 | /> |
14 | 16 | <Select |
15 | 17 | v-model:value="selectSysTenant" |
... | ... | @@ -19,6 +21,8 @@ |
19 | 21 | v-if="selectTenantOptions.length > 0" |
20 | 22 | placeholder="请选择租户" |
21 | 23 | :options="selectTenantOptions" |
24 | + show-search | |
25 | + :filter-option="filterTenantOption" | |
22 | 26 | /> |
23 | 27 | </div> |
24 | 28 | <Button |
... | ... | @@ -102,6 +106,14 @@ |
102 | 106 | |
103 | 107 | const getToken = ref(''); |
104 | 108 | |
109 | + const filterOption = (input: string, option: any) => { | |
110 | + return option.label.includes(input); | |
111 | + }; | |
112 | + | |
113 | + const filterTenantOption = (input: string, option: any) => { | |
114 | + return option.label.includes(input); | |
115 | + }; | |
116 | + | |
105 | 117 | const onSelect = async (e) => { |
106 | 118 | if (e) { |
107 | 119 | testDisabled.value = false; | ... | ... |
... | ... | @@ -10,6 +10,8 @@ |
10 | 10 | style="width: 150px" |
11 | 11 | placeholder="请选择租户" |
12 | 12 | :options="selectOptions" |
13 | + show-search | |
14 | + :filter-option="filterOption" | |
13 | 15 | /> |
14 | 16 | <Select |
15 | 17 | v-model:value="selectSysTenant" |
... | ... | @@ -19,6 +21,8 @@ |
19 | 21 | v-if="selectTenantOptions.length > 0" |
20 | 22 | placeholder="请选择租户" |
21 | 23 | :options="selectTenantOptions" |
24 | + show-search | |
25 | + :filter-option="filterTenantOption" | |
22 | 26 | /> |
23 | 27 | </div> |
24 | 28 | <Button |
... | ... | @@ -106,6 +110,14 @@ |
106 | 110 | |
107 | 111 | const getToken = ref(''); |
108 | 112 | |
113 | + const filterOption = (input: string, option: any) => { | |
114 | + return option.label.includes(input); | |
115 | + }; | |
116 | + | |
117 | + const filterTenantOption = (input: string, option: any) => { | |
118 | + return option.label.includes(input); | |
119 | + }; | |
120 | + | |
109 | 121 | const onSelect = async (e) => { |
110 | 122 | if (e) { |
111 | 123 | testDisabled.value = false; | ... | ... |