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] ModalFrom在用一个阻止冒泡的的元素当触发元素时弹出弹窗后点击任意位置触发父元素冒泡行为 #8924

Open
zzzhangy opened this issue Dec 13, 2024 · 0 comments

Comments

@zzzhangy
Copy link

提问前先看看:

https://github.com/ryanhanwu/How-To-Ask-Questions-The-Smart-Way/blob/main/README-zh_CN.md

🐛 bug 描述

<div
  className="discount-coupon"
  onClick={() => {
    nav(`/coupon/detail/${id}`)
  }}
>
  <ModalForm
    title="绑定商户"
    width={540}
    trigger={<img onClick={(e) => e.stopPropagation()} className="edit-icon" src={EditIcon} alt="" />}
    {...{
      labelCol: {
        xs: { span: 24 },
        sm: { span: 6 },
      },
      wrapperCol: {
        xs: { span: 24 },
        sm: { span: 18 },
      },
    }}
    submitter={{
      searchConfig: {
        submitText: '确认',
        resetText: '取消',
      },
    }}
    layout="horizontal"
    initialValues={{}}
    onFinish={async (values) => {
      console.log(values)
      const { merchant_ids } = values
      const params = {
        coupon_campaign_id: id,
        merchant_ids,
      }
      // const res = await bindMerchant(params)
      // if (typeof res === 'undefined') return
      if(props.getData) props.getData()
      return true
    }}
  >
    <ProFormSelect fieldProps={{ mode: 'multiple', optionFilterProp: 'label', options: [] }} rules={[{ required: true }]} width="md" name="merchant_ids" label="商家名称" placeholder="请选择商家名称" />
  </ModalForm>
</div>

📷 复现步骤

🏞 期望结果

弹窗也可以阻止冒泡

💻 复现代码

© 版本信息

  • ProComponents 版本: ^2.7.19
  • umi 版本
  • 浏览器环境 google
  • 开发环境 windows10

🚑 其他信息

@zzzhangy zzzhangy changed the title 🐛[BUG] ModalFrom在用一个阻止冒泡的的元素当触发元素时弹出弹窗后点击任意位置触发冒泡行为 🐛[BUG] ModalFrom在用一个阻止冒泡的的元素当触发元素时弹出弹窗后点击任意位置触发父元素冒泡行为 Dec 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant