2021-11-17 12:10:33 +05:00
|
|
|
import React from 'react'
|
|
|
|
import { Input } from 'antd'
|
|
|
|
import { RegExpIsFloat } from '../../components/Table'
|
2021-08-30 16:40:56 +05:00
|
|
|
|
2021-11-17 12:10:33 +05:00
|
|
|
const { TextArea } = Input
|
2021-08-30 16:40:56 +05:00
|
|
|
|
2021-11-17 12:10:33 +05:00
|
|
|
export const v = (text) => (
|
|
|
|
<div style={{
|
|
|
|
display: 'flex',
|
|
|
|
height: '180px',
|
|
|
|
justifyContent: 'center'
|
|
|
|
}}>
|
|
|
|
<span
|
|
|
|
style={{
|
|
|
|
whiteSpace: 'pre',
|
|
|
|
verticalAlign: 'center',
|
|
|
|
textAlign: 'center',
|
2021-09-03 09:26:43 +05:00
|
|
|
|
2021-11-17 12:10:33 +05:00
|
|
|
WebkitTransform: 'rotate(-90deg)',
|
|
|
|
MozTransform: 'rotate(-90deg)',
|
|
|
|
MsTransform: 'rotate(-90deg)',
|
|
|
|
OTransform: 'rotate(-90deg)',
|
|
|
|
transform: 'rotate(-90deg)',
|
|
|
|
}}>
|
|
|
|
{text}
|
|
|
|
</span>
|
|
|
|
</div>
|
|
|
|
)
|
2021-08-30 16:40:56 +05:00
|
|
|
|
|
|
|
export const numericColumnOptions = {
|
|
|
|
editable: true,
|
|
|
|
initialValue: 0,
|
2021-11-17 12:10:33 +05:00
|
|
|
width: '3rem',
|
2021-08-30 16:40:56 +05:00
|
|
|
formItemRules: [
|
|
|
|
{
|
|
|
|
required: true,
|
|
|
|
message: `Введите число`,
|
|
|
|
pattern: RegExpIsFloat,
|
|
|
|
},
|
|
|
|
],
|
|
|
|
};
|
|
|
|
|
|
|
|
export const textColumnOptions = {
|
2021-11-17 12:10:33 +05:00
|
|
|
editable: true,
|
|
|
|
input: <TextArea/>,
|
|
|
|
width: '3rem',
|
|
|
|
formItemRules: [{
|
|
|
|
required: true,
|
|
|
|
message: `Введите текст`
|
|
|
|
}],
|
|
|
|
}
|