提交
This commit is contained in:
26
甲情_甲意/miniprogram/node_modules/antd-mini/es/Input/InputBlur/index.axml
generated
vendored
Normal file
26
甲情_甲意/miniprogram/node_modules/antd-mini/es/Input/InputBlur/index.axml
generated
vendored
Normal file
@ -0,0 +1,26 @@
|
||||
<input
|
||||
enableNative="{{enableNative}}"
|
||||
name="{{name}}"
|
||||
class="{{className}}"
|
||||
style="{{style}}"
|
||||
disabled="{{disabled}}"
|
||||
value="{{state.value}}"
|
||||
type="{{type}}"
|
||||
password="{{password}}"
|
||||
placeholder="{{placeholder}}"
|
||||
placeholderClass="ant-input-item-placeholder-base {{placeholderClassName ? placeholderClassName : ''}}"
|
||||
placeholderStyle="{{placeholderStyle ? placeholderStyle : ''}}"
|
||||
maxlength="{{maxLength}}"
|
||||
focus="{{focus}}"
|
||||
confirmType="{{confirmType}}"
|
||||
confirmHold="{{confirmHold}}"
|
||||
alwaysSystem="{{alwaysSystem}}"
|
||||
cursor="{{cursor}}"
|
||||
selectionStart="{{selectionStart}}"
|
||||
selectionEnd="{{selectionEnd}}"
|
||||
randomNumber="{{randomNumber}}"
|
||||
onInput="onChange"
|
||||
onConfirm="onConfirm"
|
||||
onFocus="onFocus"
|
||||
onBlur="onBlur"
|
||||
></input>
|
1
甲情_甲意/miniprogram/node_modules/antd-mini/es/Input/InputBlur/index.d.ts
generated
vendored
Normal file
1
甲情_甲意/miniprogram/node_modules/antd-mini/es/Input/InputBlur/index.d.ts
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
export {};
|
46
甲情_甲意/miniprogram/node_modules/antd-mini/es/Input/InputBlur/index.js
generated
vendored
Normal file
46
甲情_甲意/miniprogram/node_modules/antd-mini/es/Input/InputBlur/index.js
generated
vendored
Normal file
@ -0,0 +1,46 @@
|
||||
import { Component, triggerEvent } from '../../_util/simply';
|
||||
import { InputBlurDefaultProps } from './props';
|
||||
import mixinValue from '../../mixins/value';
|
||||
Component(InputBlurDefaultProps, {
|
||||
onChange: function (e) {
|
||||
var value = e.detail.value;
|
||||
if (this.isControlled()) {
|
||||
this.update(value, {}, true);
|
||||
}
|
||||
triggerEvent(this, 'change', value, e);
|
||||
},
|
||||
onFocus: function (e) {
|
||||
var value = e.detail.value;
|
||||
this.focus = true;
|
||||
triggerEvent(this, 'focus', value, e);
|
||||
},
|
||||
onBlur: function (e) {
|
||||
var value = e.detail.value;
|
||||
this.focus = false;
|
||||
if (this.isControlled()) {
|
||||
this.update(this.props.value);
|
||||
}
|
||||
triggerEvent(this, 'blur', value, e);
|
||||
},
|
||||
onConfirm: function (e) {
|
||||
var value = e.detail.value;
|
||||
triggerEvent(this, 'confirm', value, e);
|
||||
},
|
||||
}, undefined, [
|
||||
mixinValue({
|
||||
scopeKey: 'state',
|
||||
transformValue: function (value, extra, updateWithoutFocusCheck) {
|
||||
if (value === null || (!updateWithoutFocusCheck && this.focus)) {
|
||||
return {
|
||||
needUpdate: false,
|
||||
};
|
||||
}
|
||||
return {
|
||||
needUpdate: true,
|
||||
value: value,
|
||||
};
|
||||
},
|
||||
}),
|
||||
], {
|
||||
focus: false,
|
||||
});
|
3
甲情_甲意/miniprogram/node_modules/antd-mini/es/Input/InputBlur/index.json
generated
vendored
Normal file
3
甲情_甲意/miniprogram/node_modules/antd-mini/es/Input/InputBlur/index.json
generated
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
{
|
||||
"component": true
|
||||
}
|
41
甲情_甲意/miniprogram/node_modules/antd-mini/es/Input/InputBlur/props.d.ts
generated
vendored
Normal file
41
甲情_甲意/miniprogram/node_modules/antd-mini/es/Input/InputBlur/props.d.ts
generated
vendored
Normal file
@ -0,0 +1,41 @@
|
||||
import { IBaseProps } from '../../_util/base';
|
||||
export type InputType = 'text' | 'number' | 'idcard' | 'digit' | 'numberpad' | 'digitpad' | 'idcardpad';
|
||||
/**
|
||||
* @description 输入框。
|
||||
*/
|
||||
export interface InputBlurProps extends IBaseProps {
|
||||
value: string;
|
||||
defaultValue: string;
|
||||
placeholder: string;
|
||||
placeholderClassName: string;
|
||||
placeholderStyle: string;
|
||||
enableNative: boolean;
|
||||
confirmType: string;
|
||||
confirmHold: string;
|
||||
alwaysSystem: boolean;
|
||||
selectionStart: number;
|
||||
selectionEnd: number;
|
||||
cursor: number;
|
||||
controlled: boolean;
|
||||
maxLength?: number;
|
||||
inputClassName: string;
|
||||
inputStyle: string;
|
||||
focus?: boolean;
|
||||
password: boolean;
|
||||
disabled?: boolean;
|
||||
/**
|
||||
* @description 组件名字,用于表单提交获取数据。
|
||||
*/
|
||||
name?: string;
|
||||
type?: InputType;
|
||||
/**
|
||||
* @description 当 type 为 number, digit, idcard 数字键盘是否随机排列。
|
||||
* @default false
|
||||
*/
|
||||
randomNumber?: boolean;
|
||||
onChange?: (value: string, e: any) => void;
|
||||
onBlur?: (value: string, e: any) => void;
|
||||
onFocus?: (value: string, e: any) => void;
|
||||
onConfirm?: (value: string, e: any) => void;
|
||||
}
|
||||
export declare const InputBlurDefaultProps: Partial<InputBlurProps>;
|
23
甲情_甲意/miniprogram/node_modules/antd-mini/es/Input/InputBlur/props.js
generated
vendored
Normal file
23
甲情_甲意/miniprogram/node_modules/antd-mini/es/Input/InputBlur/props.js
generated
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
export var InputBlurDefaultProps = {
|
||||
value: null,
|
||||
defaultValue: null,
|
||||
placeholder: null,
|
||||
placeholderClassName: '',
|
||||
placeholderStyle: '',
|
||||
enableNative: null,
|
||||
confirmType: null,
|
||||
confirmHold: null,
|
||||
alwaysSystem: null,
|
||||
selectionStart: null,
|
||||
selectionEnd: null,
|
||||
cursor: null,
|
||||
controlled: null,
|
||||
inputClassName: null,
|
||||
inputStyle: null,
|
||||
focus: null,
|
||||
password: null,
|
||||
disabled: null,
|
||||
name: null,
|
||||
type: null,
|
||||
randomNumber: null,
|
||||
};
|
Reference in New Issue
Block a user