application config添加location更新

This commit is contained in:
lxy 2024-09-04 11:37:02 +08:00
parent b4097fbcf1
commit e6b59eb2a1
2 changed files with 153 additions and 16 deletions

View File

@ -111,6 +111,74 @@ export default function Web(props: {
</Form>
</Col>
<Col flex="auto">
<Divider orientation="left" className={Styles.title}>
location
</Divider>
<Form
colon={true}
labelAlign="left"
layout="vertical"
style={{ marginTop: 10 }}
>
<Form.Item label="协议">
<>
<Select
style={{ width: '100%' }}
placeholder="请选择协议"
value={config?.location?.protocol}
onChange={(value: 'http' | 'https') => {
setValue(`location.protocol`, value);
}}
options={
[
{
label: 'http',
value: 'http',
},
{
label: 'https',
value: 'https',
},
] as Array<{
label: string;
value: 'http' | 'https';
}>
}
/>
</>
</Form.Item>
<Form.Item
label="主机"
>
<>
<Input
placeholder="请输入主机"
type="text"
value={config?.location?.host}
onChange={(e) =>
setValue(`location.host`, e.target.value)
}
/>
</>
</Form.Item>
<Form.Item
label="端口"
>
<>
<Input
placeholder="请输入端口"
type="text"
value={config?.location?.port}
onChange={(e) =>
setValue(`location.port`, e.target.value || '')
}
/>
</>
</Form.Item>
</Form>
</Col>
{/* <Col flex="auto">
<Divider orientation="left" className={Styles.title}>
-

View File

@ -113,6 +113,75 @@ export default function WechatPublic(props: {
)}
</Form>
</Col>
<Col flex="auto">
<Divider orientation="left" className={Styles.title}>
location
</Divider>
<Form
colon={true}
labelAlign="left"
layout="vertical"
style={{ marginTop: 10 }}
>
<Form.Item label="协议">
<>
<Select
style={{ width: '100%' }}
placeholder="请选择协议"
value={config?.location?.protocol}
onChange={(value: 'http' | 'https') => {
setValue(`location.protocol`, value);
}}
options={
[
{
label: 'http',
value: 'http',
},
{
label: 'https',
value: 'https',
},
] as Array<{
label: string;
value: 'http' | 'https';
}>
}
/>
</>
</Form.Item>
<Form.Item
label="主机"
>
<>
<Input
placeholder="请输入主机"
type="text"
value={config?.location?.host}
onChange={(e) =>
setValue(`location.host`, e.target.value)
}
/>
</>
</Form.Item>
<Form.Item
label="端口"
>
<>
<Input
placeholder="请输入端口"
type="text"
value={config?.location?.port}
onChange={(e) =>
setValue(`location.port`, e.target.value || '')
}
/>
</>
</Form.Item>
</Form>
</Col>
{/* <Col flex="auto">
<Divider orientation="left" className={Styles.title}>
-