@flatbiz/antd
Version:
42 lines (37 loc) • 1.4 kB
JavaScript
/*! @flatjs/forge MIT @flatbiz/antd */
import { b as _objectSpread2 } from './_rollupPluginBabelHelpers-BYm17lo8.js';
import { Select, Pagination } from 'antd';
import 'react';
import { jsx } from 'react/jsx-runtime';
/**
* 由于 antd 5.3.x 分页Pagination组件,存在点击分页选择框框时,一直朝下
* issues:https://github.com/ant-design/ant-design/issues/36866
* 为了兼容,在 Pagination 中添加了 selectComponentClass 属性,后期antd 官方优化了bug,可取消 配置selectComponentClass
* @param props
* @returns
*/
var SmallSelect = function SmallSelect(props) {
return /*#__PURE__*/jsx(Select, _objectSpread2(_objectSpread2({
size: "small"
}, props), {}, {
placement: "topLeft"
}));
};
SmallSelect.Option = Select.Option;
Select.Option;
var MiddleSelect = function MiddleSelect(props) {
return /*#__PURE__*/jsx(Select, _objectSpread2(_objectSpread2({
size: "middle"
}, props), {}, {
placement: "topLeft"
}));
};
MiddleSelect.Option = Select.Option;
var PaginationWrapper = function PaginationWrapper(props) {
var selectComponentClass = props.size === 'small' ? SmallSelect : MiddleSelect;
return /*#__PURE__*/jsx(Pagination, _objectSpread2(_objectSpread2({}, props), {}, {
selectComponentClass: selectComponentClass
}));
};
export { PaginationWrapper as P };
//# sourceMappingURL=pagination-BNbiyV-n.js.map