Commit 2d3bdcab authored by 皮倩雯's avatar 皮倩雯

fix: '产品配置'

parent c432831d
Pipeline #45154 passed with stages
in 7 minutes 13 seconds
......@@ -28,12 +28,17 @@ const EditForm = props => {
},
];
useEffect(() => {
console.log(productObj.ProductName);
console.log(productObj.IsUsed, 'productObj.IsUsed');
form.setFieldsValue({ ...productObj });
let aa = userProductsList.find(i => i.ProductName == productObj.ProductName);
console.log(aa);
if (!productObj.IsUsed) {
setBut(true);
form.setFieldsValue({ ...productObj });
} else {
setBut(false);
form.setFieldsValue({ ...aa });
}
}, [productObj]);
// 提交选择
......@@ -109,35 +114,42 @@ const EditForm = props => {
))}
</Select>
</Item>
<Item
label="访问路由"
name="RouteUrl"
rules={[
{
required: true,
message: '请输入访问路由,ip加端口号,示例//localhost:3001',
},
]}
>
{/* <Input addonBefore="//" placeholder="请输入访问路由" allowClear /> */}
<Input placeholder="请输入访问路由,ip加端口号,示例//localhost:3001" allowClear />
</Item>
{but ? (
<></>
) : (
<>
<Item
label="访问路由"
name="RouteUrl"
rules={[
{
required: true,
message: '请输入访问路由,ip加端口号,示例//localhost:3001',
},
]}
>
{/* <Input addonBefore="//" placeholder="请输入访问路由" allowClear /> */}
<Input placeholder="请输入访问路由,ip加端口号,示例//localhost:3001" allowClear />
</Item>
<Item
label="默认配置"
name="DefaultSetting"
rules={[
{
required: false,
message: '请输入默认配置',
},
]}
>
<TextArea
placeholder='请输入json对象,示例{"name":"张三","age":"18"}'
autoSize={{ minRows: 3, maxRows: 5 }}
/>
</Item>
</>
)}
<Item
label="默认配置"
name="DefaultSetting"
rules={[
{
required: false,
message: '请输入默认配置',
},
]}
>
<TextArea
placeholder='请输入json对象,示例{"name":"张三","age":"18"}'
autoSize={{ minRows: 3, maxRows: 5 }}
/>
</Item>
<div style={{ display: 'flex', marginLeft: '35%' }}>
<Item wrapperCol={{ span: 8, offset: 8 }} style={{ marginRight: '30px' }}>
<Button type="primary" htmlType="submit" disabled={but}>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment