-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(slider-vertify): 新增slider-vertify滑块验证组件
- Loading branch information
1 parent
4b2a2b1
commit 64cbab3
Showing
6 changed files
with
575 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
<script setup> | ||
import useCompStore from '../store/copname.js' | ||
import { onMounted } from 'vue' | ||
const compStore =useCompStore() | ||
|
||
onMounted(()=>{ | ||
compStore.updateName('slider-vertify') | ||
}) | ||
|
||
</script> | ||
|
||
## 基本使用 | ||
|
||
```html | ||
<uvSliderVertify /> | ||
``` | ||
|
||
# | ||
|
||
## props | ||
|
||
| 属性 | 含义 | 类型 | 默认值 | | ||
| --------------- | :----------------------------------------: | :------: | ------------------------------------: | | ||
| width | canvas宽度 | Number | 320 | | ||
| height | canvas高度 | Number | 160 | | ||
| visible | 是否可见 | Boolean | true | | ||
| refreshIcon | 刷新icon地址 | String | 'http://cdn.dooring.cn/dr/icon12.png' | | ||
| l | 滑块边长 | Number | 42 | | ||
| r | 滑块半径 | Number | 9 | | ||
| imgUrl | 图片地址 | String | '' | | ||
| text | 文字 | String | '' | | ||
| onDraw | 拖拽滑块时的回调, 参数为当前滑块拖拽的距离 | Function | (l) => {} | | ||
| onCustomVertify | 用户的自定义验证逻辑 | Function | (VertifyType) => VertifyType | | ||
| onBeforeRefresh | 重制刷新前的回调 | Function | () => {} | | ||
| onSuccess | 验证成功回调 | Function | () => {} | | ||
| onFail | 验证失败回调 | Function | () => {} | | ||
| onRefresh | 刷新时回调 | Function | () => {} | | ||
|
||
|
||
## css变量 | ||
|
||
```css | ||
|
||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<template> | ||
<div> | ||
<demoBlock title="基本使用"> | ||
<uvSliderVertify /> | ||
</demoBlock> | ||
</div> | ||
</template> | ||
|
||
<script setup> | ||
import demoBlock from '../../../demo/demo-block.vue' | ||
import { uvSliderVertify } from 'uv-ui' | ||
</script> | ||
|
||
<style lang="scss" scoped> | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import SliderVertify from './slider-vertify.vue' | ||
import { withInstall } from '../../utils/index.js' | ||
|
||
const uvSliderVertify = withInstall(SliderVertify) | ||
|
||
export default uvSliderVertify |
Oops, something went wrong.