Skip to content

关于4.0的一些BUG #6420

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

Closed
1 task
zhou5631 opened this issue Apr 4, 2023 · 12 comments
Closed
1 task

关于4.0的一些BUG #6420

zhou5631 opened this issue Apr 4, 2023 · 12 comments
Labels

Comments

@zhou5631
Copy link

zhou5631 commented Apr 4, 2023

  • I have searched the issues of this repository and believe that this is not a duplicate.

Version

4.0.0-alpha.3

Environment

4.0.0-alpha.3

Reproduction link

https://next.antdv.com/components/modal-cn

Steps to reproduce

1、input-group-compact下,auto-complete组件样式没生效

2、Modal.info弹出窗,确定按钮是英文“OK”

3、貌似所有组件getPopupContainer都没生效,更严重的是在弹窗使用时,antd官方组件使用了,getPopupContainer.value!但getPopupContainer本身就是undefined,导致致命的奔溃。如:Tabs组件、日期组件

What is expected?

希望修复

What is actually happening?

1、我在代码中采用了来打补丁(希望官方能从底层解决)

.ant-input-group.ant-input-group-compact {

.ant-select-selection-search-input{
border-radius: 0;
border-inline-end-width: 1px;
border-start-end-radius: 6px;
border-end-end-radius: 6px;
}
}

2、我手动加入了okText="确定"(希望能从语言配置中读取)

3、致命的奔溃,在弹窗中无法使用了getPopupContainer.value的组件

@zhou5631
Copy link
Author

zhou5631 commented Apr 4, 2023

可否加句判断:
getPopupContainer && getPopupContainer.value || document.body

@zhou5631
Copy link
Author

zhou5631 commented Apr 4, 2023

关于getPopupContainer 。我在外面包一层ConfigProvider已解决
`const DialogRender = h(isDrawer ? Drawer : Modal, dialogProps, {
default: () => [componentRender]
});

  return h(ConfigProvider, {locale: locale}, {
    default: () => [DialogRender]
  })`

@mark980828
Copy link

mark980828 commented Apr 4, 2023

alpha你都敢用吗

@zhou5631
Copy link
Author

zhou5631 commented Apr 4, 2023

alpha你都敢用吗

应该快发布成正式了

@mark980828
Copy link

alpha你都敢用吗

应该快发布成正式了

alpha后面几个版本 beta后面几个版本 rc后面几个版本 加上作者还得维护3.x ,4.x stable 估计还得等3个月都不一定

@zhou5631
Copy link
Author

zhou5631 commented Apr 4, 2023

alpha你都敢用吗

应该快发布成正式了

alpha后面几个版本 beta后面几个版本 rc后面几个版本 加上作者还得维护3.x ,4.x stable 估计还得等3个月都不一定

项目不急,可以等3个月,目前没发现什么重大BUG,正常使用没什么问题

@selicens
Copy link
Member

selicens commented Apr 5, 2023

可以看下源码,提提pr

@tangjinzhou
Copy link
Member

alpha你都敢用吗

应该快发布成正式了

alpha后面几个版本 beta后面几个版本 rc后面几个版本 加上作者还得维护3.x ,4.x stable 估计还得等3个月都不一定

这个大版本不会那么久,改动并不大,基本都是面上的问题,细节改动比较小

@tangjinzhou
Copy link
Member

看官网auto complete 没问题啊
image

@zhou5631
Copy link
Author

zhou5631 commented Apr 8, 2023

看官网auto complete 没问题啊 image

<template>
  <a-auto-complete
    class="tlw-auto-complete"
    @search="onSearch"
    @change="onChange"
    @select="onSelect"
    :placeholder="placeholder || '请输入'"
    :size="size"
    :dropdown-match-select-width="false"
    :dropdown-style="{ width: '260px' }"
    v-model:value="searchValue"
    :options="options"
  >
    <template #option="item">
      <template v-if="item.options">
        <div class="filter">
          <template v-if="searchValue">
            <a-icon type="filter"/>
            筛选结果
            <a style="float: right" @click="onSelect(searchValue)">{{ item.total }}条</a>
          </template>
          <template v-else>
            <a-icon type="history"/>
            搜索历史
            <a style="float: right" @click="clearIndexedDB">清空</a>
          </template>
        </div>
      </template>
      <template v-else>
        <div v-html="formatHighlight(item.label)"></div>
      </template>
    </template>
    <a-input @keyup.enter="onEnter">
      <template #suffix>
        <slot v-if="$slots.suffix" name="suffix"/>
        <template v-else>
          <a-icon type="search" @click="onSelect(searchValue)"/>
        </template>
      </template>
    </a-input>
  </a-auto-complete>
</template>

使用了<template #option="item">会有问题

@tangjinzhou
Copy link
Member

不同问题分开提 issue,并提供可复现问题的完整示例
这个先关了

Copy link

github-actions bot commented Apr 8, 2024

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 8, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants