You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

46 lines
1.1 KiB

import "antd/es/button/style";
import _Button from "antd/es/button";
import React from 'react';
import './Footer.less';
var Footer = function Footer(props) {
var prefixCls = props.prefixCls,
onClear = props.onClear,
onConfirm = props.onConfirm,
disabled = props.disabled; // TODO 国际化
var locale = {
clear: '清除',
confirm: '确认'
};
return /*#__PURE__*/React.createElement("div", {
className: "".concat(prefixCls, "-footer"),
onClick: function onClick(e) {
if (e.target.getAttribute('data-type') !== 'confirm') {
e.stopPropagation();
}
}
}, /*#__PURE__*/React.createElement(_Button, {
style: {
visibility: onClear ? 'visible' : 'hidden'
},
type: "link",
size: "small",
disabled: disabled,
onClick: function onClick(e) {
if (onClear) {
onClear(e);
}
e.stopPropagation();
}
}, locale.clear), /*#__PURE__*/React.createElement(_Button, {
"data-type": "confirm",
type: "primary",
size: "small",
onClick: onConfirm,
disabled: disabled
}, locale.confirm));
};
export default Footer;