本时支付宝小程序
This commit is contained in:
1
node_modules/mini-ali-ui/es/verify-code/index.acss
generated
vendored
Executable file
1
node_modules/mini-ali-ui/es/verify-code/index.acss
generated
vendored
Executable file
@@ -0,0 +1 @@
|
||||
.am-verify-code-item{display:flex;align-items:center;background:#fff;background:var(--am-verify-code-item-background,#fff);padding-left:12px;padding-left:var(--am-verify-code-item-padding-left,12px)}.am-verify-code-item .a-input-content{padding-left:2px}.am-verify-code-line{position:relative;flex:1;display:flex;align-items:center;padding-right:12px;padding-right:var(--am-verify-code-line-padding-right,12px);min-height:48px;min-height:var(--am-verify-code-line-min-height,48px);overflow:hidden;font-size:17px;font-size:var(--am-verify-code-font-size,17px)}.am-verify-code-label{min-width:80px;min-width:var(--am-verify-code-label-min-width,80px);margin-right:2px;color:#333;color:var(--am-verify-code-item-label-color,#333)}.am-verify-code-content{flex:1;display:flex;color:#333;color:var(--am-verify-code-item-label-color,#333);text-align:left;padding:0}.am-verify-code-content .a-input-wrap{flex:1}.am-verify-code-clear{display:flex;height:22px;height:var(--am-verify-code-icon-size,22px);width:22px;width:var(--am-verify-code-icon-size,22px);justify-content:center;align-items:center;margin-right:12px;margin-right:var(--am-verify-code-line-padding-right,12px)}.am-verify-code-clear-icon{line-height:1;line-height:var(--am-verify-code-icon-line-height,1)}.am-verify-code-clear.show{visibility:visible}.am-verify-code-clear.hidden{visibility:hidden;pointer-events:none}.am-verify-code-line-bottom::after{content:'';position:absolute;background-color:#eee;display:block;top:auto;right:0;bottom:0;left:0;height:1px;transform:scaleY(.5)}.am-verify-code-item.last .am-verify-code-line-bottom::after{display:none}.am-verify-code-action{border-left-width:1px;border-left-width:var(--am-verify-code-action-border-left-width,1px);border-left-style:solid;border-left-color:#ccc;border-left-color:var(--am-verify-code-action-border-left-color,#ccc);padding-left:12px;padding-left:var(--am-verify-code-action-padding-left,12px)}.am-verify-code-action.active{color:#1677ff;color:var(--am-verify-code-action-active-color,#1677ff)}.am-verify-code-action.inactive{color:#999;color:var(--am-verify-code-action-inactive-color,#999)}.am-verify-code-placeholder-base{color:#ccc;color:var(--am-verify-code-item-placeholder-color,#ccc)}
|
||||
35
node_modules/mini-ali-ui/es/verify-code/index.axml
generated
vendored
Executable file
35
node_modules/mini-ali-ui/es/verify-code/index.axml
generated
vendored
Executable file
@@ -0,0 +1,35 @@
|
||||
<view class="am-verify-code-item {{last ? 'last': ''}} {{className}}">
|
||||
<view class="am-verify-code-line">
|
||||
<view class="am-verify-code-label {{labelCls}}">
|
||||
{{label}}
|
||||
</view>
|
||||
<input enableNative="{{enableNative}}"
|
||||
sync-input="{{syncInput}}"
|
||||
class="am-verify-code-content {{inputCls}}"
|
||||
value="{{value}}"
|
||||
name="{{name}}"
|
||||
placeholder="{{placeholder}}"
|
||||
placeholderClass="am-verify-code-placeholder-base {{placeholderClass}}"
|
||||
placeholderStyle="{{placeholderStyle}}"
|
||||
disabled="{{disabled}}"
|
||||
maxlength="{{maxlength}}"
|
||||
focus="{{focus}}"
|
||||
onInput="onInput"
|
||||
onConfirm="onConfirm"
|
||||
onFocus="onFocus"
|
||||
onBlur="onBlur"
|
||||
controlled />
|
||||
<view class="am-verify-code-clear {{clear && value.length > 0 && !disabled && _focus ? 'show' : 'hidden'}}"
|
||||
onTap="onClear" a:if="{{clear}}">
|
||||
<am-icon size="18"
|
||||
type="close_"
|
||||
class="am-verify-code-clear-icon"
|
||||
color="#ccc" />
|
||||
</view>
|
||||
<view class="am-verify-code-action {{_actionActive ? 'active' : 'inactive'}}"
|
||||
onTap="onTapSend">{{
|
||||
_actionActive ? (actedBefore ? '重发验证码' : '发送验证码') : `${_countDown}秒后重试`
|
||||
}}</view>
|
||||
<view class="am-verify-code-line-bottom" />
|
||||
</view>
|
||||
</view>
|
||||
105
node_modules/mini-ali-ui/es/verify-code/index.js
generated
vendored
Executable file
105
node_modules/mini-ali-ui/es/verify-code/index.js
generated
vendored
Executable file
@@ -0,0 +1,105 @@
|
||||
import fmtEvent from '../_util/fmtEvent';
|
||||
Component({
|
||||
props: {
|
||||
className: '',
|
||||
labelCls: '',
|
||||
label: '验证码',
|
||||
inputCls: '',
|
||||
last: false,
|
||||
value: '',
|
||||
name: '',
|
||||
type: 'text',
|
||||
password: false,
|
||||
placeholder: '请输入验证码',
|
||||
placeholderClass: '',
|
||||
placeholderStyle: '',
|
||||
disabled: false,
|
||||
maxlength: 140,
|
||||
focus: false,
|
||||
clear: true,
|
||||
// 默认有清除功能
|
||||
syncInput: false,
|
||||
enableNative: false,
|
||||
// 兼容安卓input的输入bug
|
||||
countDown: 60,
|
||||
isInitialActive: true,
|
||||
onInput: function onInput() {},
|
||||
onConfirm: function onConfirm() {},
|
||||
onFocus: function onFocus() {},
|
||||
onBlur: function onBlur() {},
|
||||
onClear: function onClear() {},
|
||||
onSend: function onSend() {}
|
||||
},
|
||||
data: {
|
||||
_focus: false,
|
||||
_actionActive: true,
|
||||
_countDown: 60,
|
||||
resent: false
|
||||
},
|
||||
didMount: function didMount() {
|
||||
this.setData({
|
||||
_focus: this.props.focus,
|
||||
_actionActive: this.props.isInitialActive,
|
||||
_countDown: this.props.countDown,
|
||||
actedBefore: false
|
||||
});
|
||||
},
|
||||
didUnmount: function didUnmount() {
|
||||
clearInterval(this._timeout);
|
||||
},
|
||||
methods: {
|
||||
onBlur: function onBlur(e) {
|
||||
this.setData({
|
||||
_focus: false
|
||||
});
|
||||
var event = fmtEvent(this.props, e);
|
||||
this.props.onBlur(event);
|
||||
},
|
||||
onConfirm: function onConfirm(e) {
|
||||
var event = fmtEvent(this.props, e);
|
||||
this.props.onConfirm(event);
|
||||
},
|
||||
onFocus: function onFocus(e) {
|
||||
this.setData({
|
||||
_focus: true
|
||||
});
|
||||
var event = fmtEvent(this.props, e);
|
||||
this.props.onFocus(event);
|
||||
},
|
||||
onInput: function onInput(e) {
|
||||
var event = fmtEvent(this.props, e);
|
||||
this.props.onInput(event);
|
||||
},
|
||||
onClear: function onClear(e) {
|
||||
var event = fmtEvent(this.props, e);
|
||||
this.props.onClear(event);
|
||||
},
|
||||
onTapSend: function onTapSend(e) {
|
||||
var _this = this;
|
||||
|
||||
this.setData({
|
||||
_actionActive: false
|
||||
});
|
||||
this._timeout = setInterval(function () {
|
||||
var subOne = _this.data._countDown - 1;
|
||||
|
||||
if (subOne <= 0) {
|
||||
clearInterval(_this._timeout);
|
||||
|
||||
_this.setData({
|
||||
_actionActive: true,
|
||||
resend: true,
|
||||
_countDown: _this.props.countDown,
|
||||
actedBefore: true
|
||||
});
|
||||
} else {
|
||||
_this.setData({
|
||||
_countDown: subOne
|
||||
});
|
||||
}
|
||||
}, 1000);
|
||||
var event = fmtEvent(this.props, e);
|
||||
this.props.onSend(event);
|
||||
}
|
||||
}
|
||||
});
|
||||
6
node_modules/mini-ali-ui/es/verify-code/index.json
generated
vendored
Executable file
6
node_modules/mini-ali-ui/es/verify-code/index.json
generated
vendored
Executable file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
"am-icon": "../am-icon/index"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user