GithubHelp home page GithubHelp logo

wxh16144 / easy-antd-modal Goto Github PK

View Code? Open in Web Editor NEW
46.0 46.0 3.0 473 KB

二次开发,简化了 Ant Design Modal 的使用方式

Home Page: https://wxh16144.github.io/easy-antd-modal/

License: MIT License

JavaScript 2.10% TypeScript 97.59% Shell 0.31%
ant-design antd modal

easy-antd-modal's Introduction

Hi there 👋

typing...

前端工程师,2019 毕业参加工作,现居成都。正积极参与开源,通常活跃在 Ant DesignUmiJS 等社区。

  • 👨‍💻 主要使用 React、Vue、TypeScript、antdElectron 相关技术进行日常开发工作。
  • ✍️ 正在学习 RustWebAssembly。维护自己的 Blog
  • 🤩 喜欢 探索 Github 上有趣项目,可以看看我整理的 Stars
  • 💬 WeChat: XHUwMDU3XHUwMDc4XHUwMDY4XHUwMDMxXHUwMDM2XHUwMDMxXHUwMDM0XHUwMDM0
  • 🔑 GPG Key: Download 5A27 0E75 EB40 E512 7F6F  9D70 4E03 5332 466F 0370
  • 🌟 You can type npx wxh16144 in the terminal to learn more.

My GitHub stars My GitHub show Total code time

Languages and Tools Wxh16144's Dotfiles

GitHub Stats Top Langs
GitHub stats Top Langs

easy-antd-modal's People

Contributors

semantic-release-bot avatar wxh16144 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

easy-antd-modal's Issues

[BUG] 通过 actionRef 调用开关时应该强制执行

不确定是不是 break change

import { Button } from 'antd';
import { Drawer } from 'easy-antd-modal';

function Content({ enhancedAction }: any) {
  return (
    <>
      <h1>I ❤️ antd</h1>
      <Button onClick={() => enhancedAction?.close()}>Close</Button>
    </>
  );
}

export default () => (
  <Drawer open trigger={<Button type="primary">Open Drawer</Button>}>
    <Content />
  </Drawer>
);

上述代码,我点击 <Content /> 中的 close 按钮不会讲抽屉关闭,因为我下面 Drawer 使用了受控形式,所以 actions Ref 没啥作用了。 希望可加上

[BUG] Modal 的 content 应该阻断 EasyAntdModalContext 上下文

🐛 bug 描述

📷 复现步骤

模态框内容中如果有基础使用导致 触发器和内容的 props 有问题

🏞 期望结果

正常打开模态框中的模态框

💻 复现代码

import React from "react";
import { Button } from "antd";
import Modal, { EasyAntdModalProvider } from "easy-antd-modal";

const BasicDemo = () => (
  <Modal trigger={<Button type="primary">Open Modal 01</Button>}>
    I ❤️ antd
  </Modal>
)

export default () => (
  <EasyAntdModalProvider triggerProps="children" contentProps="content">
    <Modal
      content={
        <>
          I ❤️ antd11
          <br />
          <BasicDemo />
        </>
      }
    >
      <Button type="primary">Open Modal 02</Button>
    </Modal>
  </EasyAntdModalProvider>
);

© 版本信息

  • easy-antd-modal 版本: [e.g. 1.3.0]
  • 浏览器环境
  • 开发环境 [e.g. mac OS]

🚑 其他信息

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.