1
This commit is contained in:
21
uview-plus/components/u-code/code.js
Normal file
21
uview-plus/components/u-code/code.js
Normal file
@@ -0,0 +1,21 @@
|
||||
/*
|
||||
* @Author : LQ
|
||||
* @Description :
|
||||
* @version : 1.0
|
||||
* @Date : 2021-08-20 16:44:21
|
||||
* @LastAuthor : LQ
|
||||
* @lastTime : 2021-08-20 16:55:27
|
||||
* @FilePath : /u-view2.0/uview-ui/libs/config/props/code.js
|
||||
*/
|
||||
|
||||
export default {
|
||||
// code 组件
|
||||
code: {
|
||||
seconds: 60,
|
||||
startText: '获取验证码',
|
||||
changeText: 'X秒重新获取',
|
||||
endText: '重新获取',
|
||||
keepRunning: false,
|
||||
uniqueKey: ''
|
||||
}
|
||||
}
|
||||
36
uview-plus/components/u-code/props.js
Normal file
36
uview-plus/components/u-code/props.js
Normal file
@@ -0,0 +1,36 @@
|
||||
import { defineMixin } from '../../libs/vue'
|
||||
import defProps from '../../libs/config/props.js'
|
||||
export const props = defineMixin({
|
||||
props: {
|
||||
// 倒计时总秒数
|
||||
seconds: {
|
||||
type: [String, Number],
|
||||
default: () => defProps.code.seconds
|
||||
},
|
||||
// 尚未开始时提示
|
||||
startText: {
|
||||
type: String,
|
||||
default: () => defProps.code.startText
|
||||
},
|
||||
// 正在倒计时中的提示
|
||||
changeText: {
|
||||
type: String,
|
||||
default: () => defProps.code.changeText
|
||||
},
|
||||
// 倒计时结束时的提示
|
||||
endText: {
|
||||
type: String,
|
||||
default: () => defProps.code.endText
|
||||
},
|
||||
// 是否在H5刷新或各端返回再进入时继续倒计时
|
||||
keepRunning: {
|
||||
type: Boolean,
|
||||
default: () => defProps.code.keepRunning
|
||||
},
|
||||
// 为了区分多个页面,或者一个页面多个倒计时组件本地存储的继续倒计时变了
|
||||
uniqueKey: {
|
||||
type: String,
|
||||
default: () => defProps.code.uniqueKey
|
||||
}
|
||||
}
|
||||
})
|
||||
132
uview-plus/components/u-code/u-code.vue
Normal file
132
uview-plus/components/u-code/u-code.vue
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user