Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions src/packages/__VUE/shortpassword/__tests__/index.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,15 @@ test('should emit complete when finish input', async () => {
await nextTick()
expect(wrapper.emitted().complete[0]).toEqual(['321123'])
})

test('should emit tips when clicking tips text', async () => {
const wrapper = mount(ShortPassword, {
props: {
visible: true,
tips: '忘记密码'
}
})
const tipsEl = wrapper.find('.nut-short-password--forget')
await tipsEl.trigger('click')
expect(wrapper.emitted().tips).toBeTruthy()
})
1 change: 1 addition & 0 deletions src/packages/__VUE/shortpassword/doc.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ app.use(NumberKeyboard)
| close | Trigger an event when the close icon is clicked | - |
| complete | Input complete callback | `value:string` |
| focus | Emitted when input is focused | - |
| tips | Emitted when tips is clicked | - |

## Theming

Expand Down
1 change: 1 addition & 0 deletions src/packages/__VUE/shortpassword/doc.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ app.use(NumberKeyboard)
| close | 点击关闭图标时触发事件 | - |
| complete | 输入完成的回调 | `value:string` |
| focus | 输入框聚焦时触发 | - |
| tips | 点击提示语时触发 | - |

## 主题定制

Expand Down
1 change: 1 addition & 0 deletions src/packages/__VUE/shortpassword/doc.taro.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ app.use(NumberKeyboard)
| close | 点击关闭图标或者遮罩时触发事件 | - |
| complete | 输入完成的回调 | `value:string` |
| focus | 输入框聚焦时触发 | - |
| tips | 点击提示语时触发 | - |

## 主题定制

Expand Down