Skip to content

Commit c4855c8

Browse files
committed
补齐了密码组件新增参数文档
Signed-off-by: Sadam·Sadik <1903249375@qq.com>
1 parent 9e9eba6 commit c4855c8

File tree

2 files changed

+21
-23
lines changed

2 files changed

+21
-23
lines changed

docs/components.md

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,21 @@ from simplepro.components.fields import PasswordInputField
2222

2323
#### 参数
2424

25-
| 参数名 | 类型 | 必须 | 说明 | 默认值 |
26-
|-----------------|-------|-----|---------------|--------------------------------------------------------------------------|
27-
| min_length | `数字` | ☑️ | 最小长度 | 6 | |
28-
| placeholder | `字符串` | ☑️ | 占位内容 | |
29-
| clearable | `布尔值` | ☑️ | 是否显示一键晴空按钮 | `True` |
30-
| show_password | `布尔值` | ☑️ | 是否显示明文现实密码的按钮 | `False` |
31-
| show_word_limit | `布尔值` | ☑️ | 是否显示字符限制 | `False` |
32-
| disabled | `布尔值` | ☑️ | 禁用 | `False` |
33-
| readonly | `布尔值` | ☑️ | 只读 | `False` |
34-
| encrypt | `字符串` | ☑️ | 加密算法 | |
35-
| pattern | `字符串` | ☑️ | 随机生成的可选字符集 | "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_-$%&@+!" |
25+
| 参数名 | 类型 | 必须 | 说明 | 可选值 | 默认值 |
26+
|-----------------|-----------|-----|---------------------------------------------------------|-----------------------|--------------------------------------------------------------------------|
27+
| max_length | `number` | ✅️ | 原生属性,最大输入长度 | | | |
28+
| min_length | `number` | ☑️ | 原生属性,最小输入长度 | | 6 | |
29+
| placeholder | `string` | ☑️ | 输入框占位文本 | |
30+
| clearable | `boolean` | ☑️ | 是否可一键清空 | | `True` |
31+
| show_password | `boolean` | ☑️ | 是否显示`明文显示``隐藏密码`两种状态之间切换的按钮 | | `True` |
32+
| show_word_limit | `boolean` | ☑️ | 是否显示输入字数统计,只在 `type = "text"``type = "textarea"` 时有效 | | `False` |
33+
| disabled | `boolean` | ☑️ | 禁用 | | `False` |
34+
| readonly | `boolean` | ☑️ | 原生属性,是否只读 | | `False` |
35+
| size | `string` | ☑️ | 输入框尺寸,只在 `type!="textarea"` 时有效 | medium / small / mini | |
36+
| autofocus | `boolean` | ☑️ | 原生属性,自动获取焦点 | true, false | `False` |
37+
| style | `string` | ☑️ | 原生属性,样式 | | |
38+
| encrypt | `string` | ☑️ | 加密算法 | md5 |
39+
| pattern | `string` | ☑️ | 随机生成的可选字符集 | | "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_-$%&@+!" |
3640

3741
其他参数都继承`forms.CharField`.
3842

docs/index.md

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -148,26 +148,20 @@ pip install /path/to/your_project/dist/DjangoAsyncAdmin-6.5.4.tar.gz
148148
</tr>
149149

150150
<tr>
151-
<td rowspan="1">6.7.3</td>
152-
<td colspan="2">修复了密码组件(PasswordInputField)上存在的渲染异常.</td>
153-
</tr>
154-
155-
156-
<tr>
157-
<td rowspan="2">6.7.2</td>
158-
<td colspan="2">实现了Json编辑器(JsonTextField)和密码生成Input(PasswordInputField)等组件,并且同时初步调整了组件目录结构,提高了代码的可读性.</td>
151+
<td rowspan="2">6.9.0</td>
152+
<td colspan="2">实现了<a href="https://haoke98.github.io/DjangoAsyncAdmin/components.html#%E5%AF%86%E7%A0%81%E7%BB%84%E4%BB%B6">密码组件(PasswordInputField)</a>.</td>
159153
</tr>
160154
<tr>
161-
<td colspan="2"><img src="https://haoke98.github.io/DjangoAsyncAdmin/static/json_text_field.png"/></td>
155+
<td colspan="2"><img src="https://haoke98.github.io/DjangoAsyncAdmin/static/截屏2023-11-15%2016.20.58.png"/></td>
162156
</tr>
163157

164158

165159
<tr>
166-
<td rowspan="2">6.7.1</td>
167-
<td colspan="2">增加了拥有复制和自动生成密码的表单字段 PasswordFormField.</td>
160+
<td rowspan="2">6.8.0</td>
161+
<td colspan="2">实现了<a href="https://haoke98.github.io/DjangoAsyncAdmin/components.html#json%E7%BC%96%E8%BE%91%E5%99%A8">Json编辑器(JsonTextField)</a>.</td>
168162
</tr>
169163
<tr>
170-
<td colspan="2"><img src="https://haoke98.github.io/DjangoAsyncAdmin/static/截屏2023-11-15%2016.20.58.png"/></td>
164+
<td colspan="2"><img src="https://haoke98.github.io/DjangoAsyncAdmin/static/json_text_field.png"/></td>
171165
</tr>
172166

173167
<tr>

0 commit comments

Comments
 (0)