asb_cloud_front/src/pages/Measure/columnsCommon.js

37 lines
663 B
JavaScript
Raw Normal View History

import { Input } from 'antd'
import { RegExpIsFloat } from '../../components/Table'
2021-08-30 16:40:56 +05:00
import '../../styles/measure.css'
2021-08-30 16:40:56 +05:00
export const v = (text) => (
<div className={'v-div'}>
<span className={'v-span'}>
{text}
</span>
</div>
)
2021-08-30 16:40:56 +05:00
export const numericColumnOptions = {
editable: true,
initialValue: 0,
width: '3rem',
2021-08-30 16:40:56 +05:00
formItemRules: [
{
required: true,
message: `Введите число`,
pattern: RegExpIsFloat,
},
],
};
export const textColumnOptions = {
editable: true,
input: <Input.TextArea/>,
width: '3rem',
formItemRules: [{
required: true,
message: `Введите текст`
}],
}