
发表日期: 2021-05-10 14:34:53 浏览次数:147
固始400电话办理【固始网站公司】固始百度优化、固始域名注册、固始网店美工、固始微信公众号托管

固始县,河南省直管县,信阳市代管 [1] 。位于河南省东南端,豫皖两省交界处,南依大别山,北临淮河,总面积2946平方千米。截至2018年,固始县下辖3个街道、19个镇、11个乡 [2] ,常住人口109.65万人。
因历史上有四次大规模人口南迁,固始县成为中原地区向闽台一带移民的肇始地和集中地,有“唐人故里,闽台祖地”和“中原第一侨乡”之称 [3] 。唐初“开漳圣王”陈元光、唐末“闽王”王审知、民族英雄郑成功、靖海侯施琅、爱国华侨陈嘉庚等先贤名人的祖籍地均为固始。是河南省确定的五个加快发展的区域性中心城市和十个省直管体制改革试点县之一。 [4] 2019年5月9日,经河南省级专项评估检查,固始县达到脱贫摘帽标准,正式退出贫困县序列。 [5]
2018年,固始县地区生产总值(GDP)350.42亿元,其中,第一产业增加值73.89亿元,第二产业增加值109.43亿元,第三产业增加值167.10亿元,三次产业结构为:21.1:31.2:47.7。 [6]
antd 的table表格拖拽列,会导致触发排序问题,解决方案如下,相当于加一个点击的事件判断,如果是拖拽,则不触发。
import { Resizable } from 'react-resizable'class ResizeableTitle extends React.Component {
render() {
const { onResize, width, onClick, ...restProps } = this.props;
return (
<Resizable
width={width}
height={0}
onResizeStart={() => (this.resizing = true)}
onResizeStop={() => {
setTimeout(() => {
this.resizing = false;
});
}}
onResize={onResize}
>
<th
onClick={(...args) => {
if (!this.resizing && onClick) {
onClick(...args);
}
}}
{...restProps}
/>
</Resizable>
);
}}components = {
header: {
cell: ResizeableTitle
}
}import React from 'react'import listCSS from "./listTable.less"import 'antd/dist/antd.css'import zhCN from 'antd/lib/locale/zh_CN'import PropTypes from 'prop-types'import { Table,ConfigProvider } from 'antd'import { Resizable } from 'react-resizable'class ResizeableTitle extends React.Component {
render() {
const { onResize, width, onClick, ...restProps } = this.props;
return (
<Resizable
width={width}
height={0}
onResizeStart={() => (this.resizing = true)}
onResizeStop={() => {
setTimeout(() => {
this.resizing = false;
});
}}
onResize={onResize}
>
<th
onClick={(...args) => {
if (!this.resizing && onClick) {
onClick(...args);
}
}}
{...restProps}
/>
</Resizable>
);
}
}
class ResizeableTable extends React.PureComponent {
constructor(props) {
super(props);
this.state = {
columns: props.columns
};
}
components = {
header: {
cell: ResizeableTitle
}
}
calculateColumsWidthSum = (columns = [], firstColWidth = 0, lastColWidth = 0)=> {
const arrReducer = (accumulator, currentValue) => {
if (!currentValue || !currentValue.width) {
return accumulator
}
let width = currentValue.width
if (typeof width === 'string') {
if (width.endsWith('px')) {
width = parseFloat(width.split('px')[0])
} else {
return accumulator
}
} else if (typeof width === 'number') {
width = parseFloat(width)
} else {
return accumulator
}
return accumulator + width
}
return columns.reduce(arrReducer, 0) + firstColWidth + lastColWidth
}
componentDidMount() {
}
render() {
const {className,tableLayout,rowKey,components,scrollToFirstRowOnChange,locale,columns,lastColumnWidth,firstColumnWidth, ...restProps} = this.props
const _columns = this.state.columns.map((col, index) => ({
...col,
onHeaderCell: (column) => ({
width: column.width,
onResize: this.handleResize(index)
})
}))
let tableScrollWidth = this.calculateColumsWidthSum(_columns, firstColumnWidth, lastColumnWidth)
const _components = Object.assign({},components,this.components)
return <ConfigProvider locale={locale || zhCN}>
<div className={`${className} listBox`} style={{ marginTop: '15px' }}>
<style dangerouslySetInnerHTML={{ __html: {listCSS} }} />
<Table bordered tableLayout={tableLayout || 'fixed'} className="lat_list_tablestyle" columns={_columns} components={_components} rowKey={rowKey || 'lat_global_table'} scroll={{ x: tableScrollWidth }} {...restProps} scrollToFirstRowOnChange={scrollToFirstRowOnChange || true}/>
</div>
</ConfigProvider>
}
handleResize = (index) => (e, { size }) => {
e.stopImmediatePropagation();
this.setState(({ columns }) => {
const nextColumns = [...columns];
nextColumns[index] = {
...nextColumns[index],
width: size.width };
return { columns: nextColumns }
})
}}ResizeableTable.propTypes = {
sticky: PropTypes.object,
columns: PropTypes.array,
dataSource: PropTypes.array,
onChange:PropTypes.func,
firstColumnWidth:PropTypes.number,
lastColumnWidth:PropTypes.number,
scroll:PropTypes.object}ResizeableTable.defaultProps ={
sticky:{offsetHeader:56},
columns:[],
dataSource:[],
firstColumnWidth:65,
lastColumnWidth:150}export default ResizeableTable
服务热线
顶部
备案号: 苏ICP备11067224号
CopyRight © 2011 书生商友信息科技 All Right Reserved
24小时服务热线:400-111-6878 E-MAIL:1120768800@qq.com QQ:1120768800
网址: http://www.768800.com 网站建设:上往建站
关键词: 网站建设| 域名邮箱| 服务器空间| 网站推广| 上往建站| 网站制作| 网站设计| 域名注册| 网络营销| 网站维护|
企业邮箱| 虚拟主机| 网络建站| 网站服务| 网页设计| 网店美工设计| 网站定制| 企业建站| 网站设计制作| 网页制作公司|
400电话办理| 书生商友软件| 葬花网| 调温纤维| 海洋馆运营维护| 北京保安公司| 殡仪馆服务| 殡葬服务| 苏州殡葬一条龙| 朝阳殡葬| 苏州殡葬服务|
欢迎您免费咨询,请填写以下信息,我们收到后会尽快与您联系
服务热线:400-111-6878