Showing
3 changed files
with
36 additions
and
0 deletions
@@ -10,6 +10,8 @@ | @@ -10,6 +10,8 @@ | ||
10 | style="width: 150px" | 10 | style="width: 150px" |
11 | placeholder="请选择租户" | 11 | placeholder="请选择租户" |
12 | :options="selectOptions" | 12 | :options="selectOptions" |
13 | + show-search | ||
14 | + :filter-option="filterOption" | ||
13 | /> | 15 | /> |
14 | <Select | 16 | <Select |
15 | v-model:value="selectSysTenant" | 17 | v-model:value="selectSysTenant" |
@@ -19,6 +21,8 @@ | @@ -19,6 +21,8 @@ | ||
19 | v-if="selectTenantOptions.length > 0" | 21 | v-if="selectTenantOptions.length > 0" |
20 | placeholder="请选择租户" | 22 | placeholder="请选择租户" |
21 | :options="selectTenantOptions" | 23 | :options="selectTenantOptions" |
24 | + show-search | ||
25 | + :filter-option="filterTenantOption" | ||
22 | /> | 26 | /> |
23 | </div> | 27 | </div> |
24 | <Button | 28 | <Button |
@@ -119,6 +123,14 @@ | @@ -119,6 +123,14 @@ | ||
119 | 123 | ||
120 | const getToken = ref(''); | 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 | const onSelect = async (e) => { | 134 | const onSelect = async (e) => { |
123 | if (e) { | 135 | if (e) { |
124 | testDisabled.value = false; | 136 | testDisabled.value = false; |
@@ -10,6 +10,8 @@ | @@ -10,6 +10,8 @@ | ||
10 | style="width: 150px" | 10 | style="width: 150px" |
11 | placeholder="请选择租户" | 11 | placeholder="请选择租户" |
12 | :options="selectOptions" | 12 | :options="selectOptions" |
13 | + show-search | ||
14 | + :filter-option="filterOption" | ||
13 | /> | 15 | /> |
14 | <Select | 16 | <Select |
15 | v-model:value="selectSysTenant" | 17 | v-model:value="selectSysTenant" |
@@ -19,6 +21,8 @@ | @@ -19,6 +21,8 @@ | ||
19 | v-if="selectTenantOptions.length > 0" | 21 | v-if="selectTenantOptions.length > 0" |
20 | placeholder="请选择租户" | 22 | placeholder="请选择租户" |
21 | :options="selectTenantOptions" | 23 | :options="selectTenantOptions" |
24 | + show-search | ||
25 | + :filter-option="filterTenantOption" | ||
22 | /> | 26 | /> |
23 | </div> | 27 | </div> |
24 | <Button | 28 | <Button |
@@ -102,6 +106,14 @@ | @@ -102,6 +106,14 @@ | ||
102 | 106 | ||
103 | const getToken = ref(''); | 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 | const onSelect = async (e) => { | 117 | const onSelect = async (e) => { |
106 | if (e) { | 118 | if (e) { |
107 | testDisabled.value = false; | 119 | testDisabled.value = false; |
@@ -10,6 +10,8 @@ | @@ -10,6 +10,8 @@ | ||
10 | style="width: 150px" | 10 | style="width: 150px" |
11 | placeholder="请选择租户" | 11 | placeholder="请选择租户" |
12 | :options="selectOptions" | 12 | :options="selectOptions" |
13 | + show-search | ||
14 | + :filter-option="filterOption" | ||
13 | /> | 15 | /> |
14 | <Select | 16 | <Select |
15 | v-model:value="selectSysTenant" | 17 | v-model:value="selectSysTenant" |
@@ -19,6 +21,8 @@ | @@ -19,6 +21,8 @@ | ||
19 | v-if="selectTenantOptions.length > 0" | 21 | v-if="selectTenantOptions.length > 0" |
20 | placeholder="请选择租户" | 22 | placeholder="请选择租户" |
21 | :options="selectTenantOptions" | 23 | :options="selectTenantOptions" |
24 | + show-search | ||
25 | + :filter-option="filterTenantOption" | ||
22 | /> | 26 | /> |
23 | </div> | 27 | </div> |
24 | <Button | 28 | <Button |
@@ -106,6 +110,14 @@ | @@ -106,6 +110,14 @@ | ||
106 | 110 | ||
107 | const getToken = ref(''); | 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 | const onSelect = async (e) => { | 121 | const onSelect = async (e) => { |
110 | if (e) { | 122 | if (e) { |
111 | testDisabled.value = false; | 123 | testDisabled.value = false; |