flat: 暂存
This commit is contained in:
@@ -7,7 +7,7 @@ import {
|
|||||||
ProFormSelect,
|
ProFormSelect,
|
||||||
ProFormText,
|
ProFormText,
|
||||||
} from '@ant-design/pro-components';
|
} from '@ant-design/pro-components';
|
||||||
import { Form,Input } from 'antd';
|
import { Form, Input } from 'antd';
|
||||||
import { DictValueEnumObj } from '@/components/DictTag';
|
import { DictValueEnumObj } from '@/components/DictTag';
|
||||||
|
|
||||||
export type ListFormProps = {
|
export type ListFormProps = {
|
||||||
@@ -51,12 +51,18 @@ const listEdit: React.FC<ListFormProps> = (props) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const handleFinish = async (values: Record<string, any>) => {
|
const handleFinish = async (values: Record<string, any>) => {
|
||||||
// console.log(colorHex, values.backgroudColor);
|
console.log(colorHex, values);
|
||||||
if (typeof colorHex === 'string') {
|
if (typeof colorHex === 'string') {
|
||||||
values.backgroudColor = colorHex;
|
values.backgroudColor = colorHex;
|
||||||
} else {
|
} else {
|
||||||
values.backgroudColor = values.backgroudColor.toHexString();
|
values.backgroudColor = values.backgroudColor.toHexString();
|
||||||
}
|
}
|
||||||
|
if (!values.companyNature) {
|
||||||
|
values['companyNature'] = '';
|
||||||
|
}
|
||||||
|
if (!values.targ) {
|
||||||
|
values['targ'] = '';
|
||||||
|
}
|
||||||
props.onSubmit(values as API.ApplicationProducts.Product);
|
props.onSubmit(values as API.ApplicationProducts.Product);
|
||||||
};
|
};
|
||||||
return (
|
return (
|
||||||
@@ -121,10 +127,7 @@ const listEdit: React.FC<ListFormProps> = (props) => {
|
|||||||
width="md"
|
width="md"
|
||||||
/>
|
/>
|
||||||
</ProForm.Group>
|
</ProForm.Group>
|
||||||
<ProForm.Item
|
<ProForm.Item name="description" label="精选描述">
|
||||||
name="description"
|
|
||||||
label="精选描述"
|
|
||||||
>
|
|
||||||
<Input.TextArea
|
<Input.TextArea
|
||||||
placeholder="请输入卡片精选描述(最多200字)"
|
placeholder="请输入卡片精选描述(最多200字)"
|
||||||
maxLength={200}
|
maxLength={200}
|
||||||
|
|||||||
Reference in New Issue
Block a user