refactor(tenant-toggle): 更新antdv-next类型导入和下拉样式配置
更新Select组件类型导入为antdv-next的SelectProps,并调整下拉菜单样式配置格式以匹配最新API
This commit is contained in:
parent
e4ab0bc359
commit
cc2f96b691
@ -1,4 +1,5 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
|
import type { SelectProps } from 'antdv-next';
|
||||||
import type { MessageType } from 'antdv-next/dist/message/interface';
|
import type { MessageType } from 'antdv-next/dist/message/interface';
|
||||||
|
|
||||||
import type { TenantOption } from '#/api';
|
import type { TenantOption } from '#/api';
|
||||||
@ -72,7 +73,10 @@ const loading = ref(false);
|
|||||||
* @param tenantId tenantId
|
* @param tenantId tenantId
|
||||||
* @param option 当前option
|
* @param option 当前option
|
||||||
*/
|
*/
|
||||||
const onSelected: SelectHandler = async (tenantId: string, option: any) => {
|
const onSelected: SelectProps['onSelect'] = async (
|
||||||
|
tenantId: string,
|
||||||
|
option: any,
|
||||||
|
) => {
|
||||||
if (unref(lastSelected) === tenantId) {
|
if (unref(lastSelected) === tenantId) {
|
||||||
// createMessage.info('选择一致');
|
// createMessage.info('选择一致');
|
||||||
return;
|
return;
|
||||||
@ -139,7 +143,9 @@ function filterOption(input: string, option: TenantOption) {
|
|||||||
:filter-option="filterOption"
|
:filter-option="filterOption"
|
||||||
:options="tenantList"
|
:options="tenantList"
|
||||||
:placeholder="$t('component.tenantToggle.placeholder')"
|
:placeholder="$t('component.tenantToggle.placeholder')"
|
||||||
:dropdown-style="{ position: 'fixed', zIndex: 1024 }"
|
:styles="{
|
||||||
|
root: { position: 'fixed', zIndex: 1024 },
|
||||||
|
}"
|
||||||
allow-clear
|
allow-clear
|
||||||
class="w-60"
|
class="w-60"
|
||||||
show-search
|
show-search
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user