Skip to content

Commit

Permalink
chore: update
Browse files Browse the repository at this point in the history
  • Loading branch information
kovsu committed Aug 18, 2023
1 parent 9c9dc61 commit fb86197
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 23 deletions.
13 changes: 2 additions & 11 deletions components/input/demo/password-input.vue
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,7 @@ Input type of password.
:visibility-toggle="false"
/>
<a-space>
<a-input-password
v-model:value="value4"
placeholder="input password"
:visible="visible"
@update:visible="onVisibleChange"
/>
<a-input-password v-model:value="value4" placeholder="input password" :visible="visible" />
</a-space>
</a-space>
</template>
Expand All @@ -47,9 +42,5 @@ const value2 = ref<string>('');
const value3 = ref<string>('');
const value4 = ref<string>('');
const visible = ref<boolean>(false);
const onVisibleChange = (_visible: boolean) => {
visible.value = _visible;
console.log(_visible);
};
const visible = ref<boolean>(true);
</script>
11 changes: 5 additions & 6 deletions components/input/index.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,8 @@ Supports all props of `Input`.

#### Input.Password (Added in 1.14.0)

| Property | Description | Type | Default |
| --- | --- | --- | --- |
| visible | password visibility | boolean | false |
| update:visible(v-on) | visible change callback function | - | - |
| iconRender | Custom toggle button | slot | - |
| visibilityToggle | Whether show toggle button or control password visible | boolean | true |
| Property | Description | Type | Default |
| ---------------- | ------------------------------------------------------ | ------- | ------- |
| visible(v-model) | password visibility | boolean | false |
| iconRender | Custom toggle button | slot | - |
| visibilityToggle | Whether show toggle button or control password visible | boolean | true |
11 changes: 5 additions & 6 deletions components/input/index.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,8 @@ coverDark: https://mdn.alipayobjects.com/huamei_7uahnr/afts/img/A*sBqqTatJ-AkAAA

#### Input.Password (1.14.0 中新增)

| 参数 | 说明 | 类型 | 默认值 |
| -------------------- | -------------------------------- | ------- | ------ |
| visible | 密码是否可见 | boolean | false |
| update:visible(v-on) | visible 改变的回调函数 | - | - |
| iconRender | 自定义切换按钮 | slot | - |
| visibilityToggle | 是否显示切换按钮或者控制密码显隐 | boolean | true |
| 参数 | 说明 | 类型 | 默认值 |
| ---------------- | -------------------------------- | ------- | ------ |
| visible(v-model) | 密码是否可见 | boolean | false |
| iconRender | 自定义切换按钮 | slot | - |
| visibilityToggle | 是否显示切换按钮或者控制密码显隐 | boolean | true |

0 comments on commit fb86197

Please sign in to comment.