Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: 表格行编辑渲染Antd Select组件,编辑时无法选择下拉项 #5225

Closed
5 tasks done
mengyix opened this issue Dec 24, 2024 · 4 comments
Closed
5 tasks done

Comments

@mengyix
Copy link

mengyix commented Dec 24, 2024

Version

Vben Admin V5

Describe the bug?

Bug: 表格行编辑渲染Antd Select组件,编辑时无法选择下拉项

Reproduction

Bug: 表格行编辑渲染Antd Select组件,编辑时无法选择下拉项

QQ20241224-114836.mp4

System Info

System:
    OS: Windows 11 10.0.22631
    CPU: (22) x64 Intel(R) Core(TM) Ultra 9 185H
    Memory: 6.38 GB / 31.61 GB
  Binaries:
    Node: 20.18.0 - D:\env\nvm\nodejs\node.EXE
    npm: 10.8.2 - D:\env\nvm\nodejs\npm.CMD
    pnpm: 9.12.3 - ~\node_modules\.bin\pnpm.CMD
  Browsers:
    Edge: Chromium (128.0.2739.79)
    Internet Explorer: 11.0.22621.3527

Relevant log output

No response

Validations

@zwtvip
Copy link

zwtvip commented Dec 24, 2024

@mengyix 加这个属性getPopupContainer

@mengyix
Copy link
Author

mengyix commented Dec 24, 2024

@zwtvip 在哪里加这个属性呢,我是用的是插槽式的。

{
field: 'dataType',
title: '类型',
slots: {
edit: 'edit_dataType',
},
editRender: {},
}

<template #edit_dataType="{ row }">
<a-select v-model:value="row.dataType" :options="dataTypeOption" placeholder="请选择类型" show-search
@change="dataTypeChangeHandler(row)" />

@zwtvip
Copy link

zwtvip commented Dec 24, 2024

@mengyix a-select 加 去看下 ant select的api 文档

@mengyix
Copy link
Author

mengyix commented Dec 24, 2024

@zwtvip 感谢,修改后如下可以解决
<a-select class="w-full" v-model:value="row.dataType"
:getPopupContainer="(triggerNode: any) => triggerNode.parentNode" :options="dataTypeOption"
placeholder="请选择类型" show-search @change="dataTypeChangeHandler(row)" />

@mengyix mengyix closed this as completed Dec 24, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Jan 8, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants