65 lines
1.8 KiB
JavaScript
65 lines
1.8 KiB
JavaScript
/*
|
|
* 自定义浏览框组件
|
|
* 弹框操作栏
|
|
* @Author: 黎永顺
|
|
* @Date: 2024/8/30
|
|
* @Wechat:
|
|
* @Email: 971387674@qq.com
|
|
* @description:
|
|
*/
|
|
import React, { Component } from "react";
|
|
import { WeaLocaleProvider } from "ecCom";
|
|
import { Button } from "antd";
|
|
|
|
const getLabel = WeaLocaleProvider.getLabel;
|
|
|
|
class CustomBrowserOperation extends Component {
|
|
render() {
|
|
const {
|
|
moveToLeft,
|
|
moveToRight,
|
|
leftArrowText,
|
|
rightArrowText,
|
|
leftActive,
|
|
rightActive,
|
|
className,
|
|
leftAllActive,
|
|
moveAllToLeft,
|
|
rightAllActive,
|
|
moveAllToRight
|
|
} = this.props;
|
|
|
|
const moveToLeftButton = (
|
|
<Button type="primary" size="small" disabled={!rightActive} onClick={moveToRight}>
|
|
{<span><i className="icon-coms-Browse-box-Add-to"/></span>}
|
|
</Button>
|
|
);
|
|
const moveToRightButton = (
|
|
<Button type="primary" size="small" disabled={!leftActive} onClick={moveToLeft}>
|
|
{<span><i className="icon-coms-Browse-box-delete"/></span>}
|
|
</Button>
|
|
);
|
|
|
|
const moveAllToLeftButton = (
|
|
<Button type="primary" size="small" disabled={!leftAllActive} onClick={moveAllToRight}>
|
|
{<span title={getLabel(111, "将当页数据全部添加到右侧已选列表")}><i className="icon-coms-right"/></span>}
|
|
</Button>
|
|
);
|
|
const moveAllToRightButton = (
|
|
<Button type="primary" size="small" disabled={!rightAllActive} onClick={moveAllToLeft}>
|
|
{<span title={getLabel(111, "全部删除")}><i className="icon-coms-Browse-box-Delete-all"/></span>}
|
|
</Button>
|
|
);
|
|
return (
|
|
<div className={className}>
|
|
{moveToLeftButton}
|
|
{moveToRightButton}
|
|
{moveAllToLeftButton}
|
|
{moveAllToRightButton}
|
|
</div>
|
|
);
|
|
}
|
|
}
|
|
|
|
export default CustomBrowserOperation;
|