@ecoding/components.antd.layout
Advanced tools
@@ -15,4 +15,6 @@ import React from 'react'; | ||
| htmlType?: "button" | "submit" | "reset"; | ||
| fixedLeft?: number; | ||
| fixedRight?: number; | ||
| } | ||
| declare const FixedButtonArea: React.FC<IProps>; | ||
| export default FixedButtonArea; |
| import React, { useCallback, useState } from 'react'; | ||
| import { Space, Button } from 'antd'; | ||
| const FixedButtonArea = ({ className, addonAfter, addonBefore, okType, onCancel, cancelText, onOkAfter, onOk, okText, hiddenCancel, htmlType }) => { | ||
| const FixedButtonArea = ({ className, addonAfter, addonBefore, okType, onCancel, cancelText, onOkAfter, onOk, okText, hiddenCancel, htmlType, fixedRight, fixedLeft }) => { | ||
| const [loading, setLoading] = useState(false); | ||
@@ -26,5 +26,6 @@ const cancel = useCallback(() => { | ||
| position: 'fixed', | ||
| bottom: '10px', | ||
| right: '60px', | ||
| left: '250px' | ||
| bottom: 0, | ||
| right: fixedRight, | ||
| left: fixedLeft, | ||
| backgroundColor: "#fff" | ||
| }; | ||
@@ -44,4 +45,6 @@ return (React.createElement("div", { className: className, style: { height: '48px' } }, | ||
| hiddenCancel: true, | ||
| htmlType: "button" | ||
| htmlType: "button", | ||
| fixedLeft: 250, | ||
| fixedRight: 0 | ||
| }; | ||
| export default FixedButtonArea; |
+2
-2
| { | ||
| "name": "@ecoding/components.antd.layout", | ||
| "version": "0.0.21", | ||
| "version": "0.0.22", | ||
| "author": "cxc", | ||
@@ -26,3 +26,3 @@ "homepage": "", | ||
| }, | ||
| "gitHead": "9fa1f267c06a73beb6f72657433e4af22048b259" | ||
| "gitHead": "fc4b19803c5c0f4abe0b9b0517b90e5e89e326eb" | ||
| } |
12106
1.21%307
1.66%