提交
This commit is contained in:
1
甲情_甲意/miniprogram/node_modules/antd-mini/es/Input/Textarea/index.acss
generated
vendored
Normal file
1
甲情_甲意/miniprogram/node_modules/antd-mini/es/Input/Textarea/index.acss
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
.ant-textarea{display:flex;align-items:center;background:#fff}.ant-textarea-disabled{opacity:.4}.ant-textarea-line{position:relative;flex:1;display:flex;align-items:center;overflow:hidden}.ant-textarea-content{width:100%;align-self:center;padding:0;font-size:17px;text-align:left;color:#333;background:#fff}.ant-textarea-content-clear{padding-right:17px}.ant-textarea-clear{position:absolute;top:0;right:0;z-index:2;display:flex;justify-content:center;align-items:center;border-radius:8px;margin-left:4px}.ant-textarea-clear-icon{color:#ccc;font-size:17px}.ant-textarea-clear-show{display:flex}.ant-textarea-clear-hidden{display:none;pointer-events:none}.ant-textarea-placeholder{font-size:17px;color:#ccc;margin-left:-3px}
|
38
甲情_甲意/miniprogram/node_modules/antd-mini/es/Input/Textarea/index.axml
generated
vendored
Normal file
38
甲情_甲意/miniprogram/node_modules/antd-mini/es/Input/Textarea/index.axml
generated
vendored
Normal file
@ -0,0 +1,38 @@
|
||||
<view
|
||||
class="ant-textarea {{disabled ? 'ant-textarea-disabled' : ''}} {{className ? className : ''}} {{selfFocus ? focusClassName ? focusClassName : '' : ''}}"
|
||||
style="{{style || ''}};{{focusStyle || ''}}"
|
||||
>
|
||||
<view class="ant-textarea-line">
|
||||
<textarea
|
||||
enableNative="{{enableNative}}"
|
||||
name="{{name}}"
|
||||
class="ant-textarea-content {{allowClear ? 'ant-textarea-content-clear' : ''}}"
|
||||
disabled="{{disabled}}"
|
||||
value="{{state.value || ''}}"
|
||||
placeholder="{{placeholder}}"
|
||||
placeholderClass="ant-textarea-placeholder {{placeholderClassName ? placeholderClassName : ''}}"
|
||||
placeholderStyle="{{placeholderStyle ? placeholderStyle : ''}}"
|
||||
maxlength="{{maxLength}}"
|
||||
focus="{{focus}}"
|
||||
confirmType="{{confirmType}}"
|
||||
confirmHold="{{confirmHold}}"
|
||||
autoHeight="{{autoHeight}}"
|
||||
showCount="{{showCount}}"
|
||||
controlled="{{state.controlled}}"
|
||||
onInput="onChange"
|
||||
onConfirm="onConfirm"
|
||||
onFocus="onFocus"
|
||||
onBlur="onBlur"
|
||||
></textarea>
|
||||
<view
|
||||
a:if="{{allowClear}}"
|
||||
class="ant-textarea-clear {{state.value && state.value.length > 0 ? 'ant-textarea-clear-show' : 'ant-textarea-clear-hidden'}}"
|
||||
onTap="onClear"
|
||||
>
|
||||
<icon
|
||||
className="ant-textarea-clear-icon"
|
||||
type="CloseCircleFill"
|
||||
></icon>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
1
甲情_甲意/miniprogram/node_modules/antd-mini/es/Input/Textarea/index.d.ts
generated
vendored
Normal file
1
甲情_甲意/miniprogram/node_modules/antd-mini/es/Input/Textarea/index.d.ts
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
export {};
|
38
甲情_甲意/miniprogram/node_modules/antd-mini/es/Input/Textarea/index.js
generated
vendored
Normal file
38
甲情_甲意/miniprogram/node_modules/antd-mini/es/Input/Textarea/index.js
generated
vendored
Normal file
@ -0,0 +1,38 @@
|
||||
import { Component, triggerEvent } from '../../_util/simply';
|
||||
import { TextareaDefaultProps } from './props';
|
||||
import mixinValue from '../../mixins/value';
|
||||
Component(TextareaDefaultProps, {
|
||||
onChange: function (e) {
|
||||
var value = e.detail.value;
|
||||
if (!this.isControlled()) {
|
||||
this.update(value);
|
||||
}
|
||||
triggerEvent(this, 'change', value, e);
|
||||
},
|
||||
onFocus: function (e) {
|
||||
var value = e.detail.value;
|
||||
this.setData({
|
||||
selfFocus: true,
|
||||
});
|
||||
triggerEvent(this, 'focus', value, e);
|
||||
},
|
||||
onBlur: function (e) {
|
||||
var value = e.detail.value;
|
||||
this.setData({
|
||||
selfFocus: false,
|
||||
});
|
||||
triggerEvent(this, 'blur', value, e);
|
||||
},
|
||||
onConfirm: function (e) {
|
||||
var value = e.detail.value;
|
||||
triggerEvent(this, 'confirm', value, e);
|
||||
},
|
||||
onClear: function (e) {
|
||||
if (!this.isControlled()) {
|
||||
this.update('');
|
||||
}
|
||||
triggerEvent(this, 'change', '', e);
|
||||
},
|
||||
}, {
|
||||
selfFocus: false,
|
||||
}, [mixinValue({ scopeKey: 'state' })]);
|
6
甲情_甲意/miniprogram/node_modules/antd-mini/es/Input/Textarea/index.json
generated
vendored
Normal file
6
甲情_甲意/miniprogram/node_modules/antd-mini/es/Input/Textarea/index.json
generated
vendored
Normal file
@ -0,0 +1,6 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
"icon": "../../Icon/index"
|
||||
}
|
||||
}
|
34
甲情_甲意/miniprogram/node_modules/antd-mini/es/Input/Textarea/props.d.ts
generated
vendored
Normal file
34
甲情_甲意/miniprogram/node_modules/antd-mini/es/Input/Textarea/props.d.ts
generated
vendored
Normal file
@ -0,0 +1,34 @@
|
||||
import { IBaseProps } from '../../_util/base';
|
||||
/**
|
||||
* 有效值:return(显示“换行”)、done(显示“完成”)、go(显示“前往”)、next(显示“下一个”)、search(显示“搜索”)、send(显示“发送”)。
|
||||
*/
|
||||
export type ConfirmType = 'return' | 'done' | 'go' | 'next' | 'search' | 'send';
|
||||
/**
|
||||
* @description 输入框。
|
||||
*/
|
||||
export interface TextareaProps extends IBaseProps {
|
||||
value?: string;
|
||||
defaultValue: string;
|
||||
placeholder: string;
|
||||
placeholderClassName: string;
|
||||
placeholderStyle: string;
|
||||
autoHeight: boolean;
|
||||
showCount: boolean;
|
||||
allowClear: boolean;
|
||||
controlled: boolean;
|
||||
enableNative?: boolean;
|
||||
maxLength?: number;
|
||||
inputClassName: string;
|
||||
disabled?: boolean;
|
||||
inputStyle: string;
|
||||
focusStyle?: string;
|
||||
name?: string;
|
||||
confirmType?: ConfirmType;
|
||||
focus?: boolean;
|
||||
confirmHold?: string;
|
||||
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 TextareaDefaultProps: TextareaProps;
|
20
甲情_甲意/miniprogram/node_modules/antd-mini/es/Input/Textarea/props.js
generated
vendored
Normal file
20
甲情_甲意/miniprogram/node_modules/antd-mini/es/Input/Textarea/props.js
generated
vendored
Normal file
@ -0,0 +1,20 @@
|
||||
export var TextareaDefaultProps = {
|
||||
value: null,
|
||||
defaultValue: null,
|
||||
placeholder: null,
|
||||
placeholderClassName: null,
|
||||
placeholderStyle: null,
|
||||
autoHeight: null,
|
||||
showCount: null,
|
||||
allowClear: null,
|
||||
controlled: null,
|
||||
enableNative: false,
|
||||
inputClassName: null,
|
||||
disabled: null,
|
||||
inputStyle: null,
|
||||
focusStyle: null,
|
||||
name: null,
|
||||
confirmType: null,
|
||||
focus: null,
|
||||
confirmHold: null,
|
||||
};
|
Reference in New Issue
Block a user