Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/yaklang/yakit
Browse files Browse the repository at this point in the history
  • Loading branch information
v1ll4n committed Aug 5, 2022
2 parents fa9adbb + a8f48b3 commit 232cbbd
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 39 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
margin-right: 12px;
}

.ant-select-single .ant-select-selector .ant-select-selection-item {
visibility: hidden;
.private-domain {
.ant-select-single .ant-select-selector .ant-select-selection-item {
visibility: hidden;
}
}
70 changes: 33 additions & 37 deletions app/renderer/src/main/src/components/ConfigPrivateDomain/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -106,50 +106,46 @@ export const ConfigPrivateDomain: React.FC<ConfigPrivateDomainProps> = React.mem
})
})
const onInputKeyDown = useMemoizedFn((e) => {
if(e.key==="Backspace"&&searchValue.length===1){
setSearchValue('')
if (e.key === "Backspace" && searchValue.length === 1) {
setSearchValue("")
form.setFieldsValue({
BaseUrl: ''
BaseUrl: ""
})
}
})
return (
<Form {...layout} form={form} name='control-hooks' onFinish={onFinish}>
<Form.Item name='BaseUrl' label='私有域地址' rules={[{required: true, message: "该项为必填"}]}>
<Select
onInputKeyDown={onInputKeyDown}
placeholder='请输入你的私有域地址'
showArrow={false}
autoClearSearchValue={false}
showSearch
filterOption={false}
onSelect={onSelect}
onSearch={onSearch}
searchValue={searchValue}
>
{httpHistoryList.map((item) => (
<Option value={item} key={item}>
{item}
</Option>
))}
</Select>
</Form.Item>
<div className='private-domain'>
<Form {...layout} form={form} name='control-hooks' onFinish={onFinish}>
<Form.Item name='BaseUrl' label='私有域地址' rules={[{required: true, message: "该项为必填"}]}>
<Select
onInputKeyDown={onInputKeyDown}
placeholder='请输入你的私有域地址'
showArrow={false}
autoClearSearchValue={false}
showSearch
filterOption={false}
onSelect={onSelect}
onSearch={onSearch}
searchValue={searchValue}
>
{httpHistoryList.map((item) => (
<Option value={item} key={item}>
{item}
</Option>
))}
</Select>
</Form.Item>

{/* rules={[{required: true, message: "该项为必填"}]} */}
{/* <Form.Item name='Password' label='密码'>
{/* rules={[{required: true, message: "该项为必填"}]} */}
{/* <Form.Item name='Password' label='密码'>
<Input placeholder='请输入你的密码' allowClear />
</Form.Item> */}
<Form.Item {...tailLayout}>
<Button type='primary' htmlType='submit' className='btn-sure' loading={loading}>
确定
</Button>
</Form.Item>
</Form>
<Form.Item {...tailLayout}>
<Button type='primary' htmlType='submit' className='btn-sure' loading={loading}>
确定
</Button>
</Form.Item>
</Form>
</div>
)
})






0 comments on commit 232cbbd

Please sign in to comment.