asb_cloud_front/src/pages/Measure/columnsCommon.js

31 lines
578 B
JavaScript
Raw Normal View History

2021-08-30 16:40:56 +05:00
import {RegExpIsFloat} from '../../components/Table'
import {Input} from 'antd'
const {TextArea} = Input
export const v = (text) => <div
style={{
writingMode:'vertical-rl',
textOrientation: 'mixed',
verticalAlign: 'top',
}}>
{text}
</div>
export const numericColumnOptions = {
editable: true,
initialValue: 0,
width:'5em',
formItemRules: [
{
required: true,
message: `Введите число`,
pattern: RegExpIsFloat,
},
],
};
export const textColumnOptions = {
editable:true,
input:<TextArea/>,
width:'20em'}