mirror of https://gitee.com/answerdev/answer.git
refactor: Add default type to some form inputs
This commit is contained in:
parent
61a60499ae
commit
a96f73a95e
|
@ -201,6 +201,7 @@ const useTagModal = (props: IProps = {}) => {
|
||||||
<Form.Group controlId="displayName" className="mb-3">
|
<Form.Group controlId="displayName" className="mb-3">
|
||||||
<Form.Label>{t('form.fields.display_name.label')}</Form.Label>
|
<Form.Label>{t('form.fields.display_name.label')}</Form.Label>
|
||||||
<Form.Control
|
<Form.Control
|
||||||
|
type="text"
|
||||||
value={formData.displayName.value}
|
value={formData.displayName.value}
|
||||||
onChange={handleDisplayNameChange}
|
onChange={handleDisplayNameChange}
|
||||||
isInvalid={formData.displayName.isInvalid}
|
isInvalid={formData.displayName.isInvalid}
|
||||||
|
@ -212,6 +213,7 @@ const useTagModal = (props: IProps = {}) => {
|
||||||
<Form.Group controlId="slugName" className="mb-3">
|
<Form.Group controlId="slugName" className="mb-3">
|
||||||
<Form.Label>{t('form.fields.slug_name.label')}</Form.Label>
|
<Form.Label>{t('form.fields.slug_name.label')}</Form.Label>
|
||||||
<Form.Control
|
<Form.Control
|
||||||
|
type="text"
|
||||||
value={formData.slugName.value}
|
value={formData.slugName.value}
|
||||||
onChange={handleSlugNameChange}
|
onChange={handleSlugNameChange}
|
||||||
isInvalid={formData.slugName.isInvalid}
|
isInvalid={formData.slugName.isInvalid}
|
||||||
|
|
|
@ -347,6 +347,7 @@ const Ask = () => {
|
||||||
<Form.Group controlId="title" className="mb-3">
|
<Form.Group controlId="title" className="mb-3">
|
||||||
<Form.Label>{t('form.fields.title.label')}</Form.Label>
|
<Form.Label>{t('form.fields.title.label')}</Form.Label>
|
||||||
<Form.Control
|
<Form.Control
|
||||||
|
type="text"
|
||||||
value={formData.title.value}
|
value={formData.title.value}
|
||||||
isInvalid={formData.title.isInvalid}
|
isInvalid={formData.title.isInvalid}
|
||||||
onChange={handleTitleChange}
|
onChange={handleTitleChange}
|
||||||
|
|
|
@ -147,6 +147,7 @@ const Index = () => {
|
||||||
<Form.Group controlId="display_name" className="mb-3">
|
<Form.Group controlId="display_name" className="mb-3">
|
||||||
<Form.Label>{t('form.fields.display_name.label')}</Form.Label>
|
<Form.Label>{t('form.fields.display_name.label')}</Form.Label>
|
||||||
<Form.Control
|
<Form.Control
|
||||||
|
type="text"
|
||||||
value={formData.displayName.value}
|
value={formData.displayName.value}
|
||||||
isInvalid={formData.displayName.isInvalid}
|
isInvalid={formData.displayName.isInvalid}
|
||||||
disabled={role_id !== 2 && role_id !== 3}
|
disabled={role_id !== 2 && role_id !== 3}
|
||||||
|
@ -160,6 +161,7 @@ const Index = () => {
|
||||||
<Form.Group controlId="slug_name" className="mb-3">
|
<Form.Group controlId="slug_name" className="mb-3">
|
||||||
<Form.Label>{t('form.fields.slug_name.label')}</Form.Label>
|
<Form.Label>{t('form.fields.slug_name.label')}</Form.Label>
|
||||||
<Form.Control
|
<Form.Control
|
||||||
|
type="text"
|
||||||
value={formData.slugName.value}
|
value={formData.slugName.value}
|
||||||
isInvalid={formData.slugName.isInvalid}
|
isInvalid={formData.slugName.isInvalid}
|
||||||
disabled={role_id !== 2 && role_id !== 3}
|
disabled={role_id !== 2 && role_id !== 3}
|
||||||
|
|
Loading…
Reference in New Issue