dykj-football/uni_modules/uview-plus/components/u-textarea/props.js
2024-04-17 15:27:43 +08:00

126 lines
3.5 KiB
JavaScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import defProps from '../../libs/config/props.js';
export default {
props: {
// 输入框的内容
value: {
type: [String, Number],
default: () => defProps.textarea.value
},
// 输入框的内容
modelValue: {
type: [String, Number],
default: () => defProps.textarea.value
},
// 输入框为空时占位符
placeholder: {
type: [String, Number],
default: () => defProps.textarea.placeholder
},
// 指定placeholder的样式类注意页面或组件的style中写了scoped时需要在类名前写/deep/
placeholderClass: {
type: String,
default: () => defProps.input.placeholderClass
},
// 指定placeholder的样式
placeholderStyle: {
type: [String, Object],
default: () => defProps.input.placeholderStyle
},
// 输入框高度
height: {
type: [String, Number],
default: () => defProps.textarea.height
},
// 设置键盘右下角按钮的文字仅微信小程序App-vue和H5有效
confirmType: {
type: String,
default: () => defProps.textarea.confirmType
},
// 是否禁用
disabled: {
type: Boolean,
default: () => defProps.textarea.disabled
},
// 是否显示统计字数
count: {
type: Boolean,
default: () => defProps.textarea.count
},
// 是否自动获取焦点nvue不支持H5取决于浏览器的实现
focus: {
type: Boolean,
default: () => defProps.textarea.focus
},
// 是否自动增加高度
autoHeight: {
type: Boolean,
default: () => defProps.textarea.autoHeight
},
// 如果textarea是在一个position:fixed的区域需要显示指定属性fixed为true
fixed: {
type: Boolean,
default: () => defProps.textarea.fixed
},
// 指定光标与键盘的距离
cursorSpacing: {
type: Number,
default: () => defProps.textarea.cursorSpacing
},
// 指定focus时的光标位置
cursor: {
type: [String, Number],
default: () => defProps.textarea.cursor
},
// 是否显示键盘上方带有”完成“按钮那一栏,
showConfirmBar: {
type: Boolean,
default: () => defProps.textarea.showConfirmBar
},
// 光标起始位置自动聚焦时有效需与selection-end搭配使用
selectionStart: {
type: Number,
default: () => defProps.textarea.selectionStart
},
// 光标结束位置自动聚焦时有效需与selection-start搭配使用
selectionEnd: {
type: Number,
default: () => defProps.textarea.selectionEnd
},
// 键盘弹起时,是否自动上推页面
adjustPosition: {
type: Boolean,
default: () => defProps.textarea.adjustPosition
},
// 是否去掉 iOS 下的默认内边距,只微信小程序有效
disableDefaultPadding: {
type: Boolean,
default: () => defProps.textarea.disableDefaultPadding
},
// focus时点击页面的时候不收起键盘只微信小程序有效
holdKeyboard: {
type: Boolean,
default: () => defProps.textarea.holdKeyboard
},
// 最大输入长度,设置为 -1 的时候不限制最大长度
maxlength: {
type: [String, Number],
default: () => defProps.textarea.maxlength
},
// 边框类型surround-四周边框bottom-底部边框
border: {
type: String,
default: () => defProps.textarea.border
},
// 用于处理或者过滤输入框内容的方法
formatter: {
type: [Function, null],
default: () => defProps.textarea.formatter
},
// 是否忽略组件内对文本合成系统事件的处理
ignoreCompositionEvent: {
type: Boolean,
default: true
}
}
}