dragModal
- 说明
dragModal基于antd Modal开发,所有api和使用方法和antd Modal一致,仅额外添加拖拽功能
- 安装
npm install drag-modal
- 额外参数
saveDistance: 边界限定,限定浮框超出边界后,最少需保留的宽度,默认80
- 使用
import React from "react";import ReactDOM from "react-dom";import Modal from "../../src/index";import "antd/dist/antd.css";Componentstate =visible: false;{this;};{this;};{return<div ="App"><button = =>开启</button><Modal=="可拖拽浮框"=="关闭"="确定"==>试试拖动标题</Modal></div>;}const rootElement = document;ReactDOM;