调整节流时间
This commit is contained in:
parent
bb0e0aaa2a
commit
c951acffde
@ -8,154 +8,154 @@
|
|||||||
* @FilePath : /u-view2.0/uview-ui/components/u-button/props.js
|
* @FilePath : /u-view2.0/uview-ui/components/u-button/props.js
|
||||||
*/
|
*/
|
||||||
export default {
|
export default {
|
||||||
props: {
|
props: {
|
||||||
// 是否细边框
|
// 是否细边框
|
||||||
hairline: {
|
hairline: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: uni.$u.props.button.hairline
|
default: uni.$u.props.button.hairline
|
||||||
},
|
},
|
||||||
// 按钮的预置样式,info,primary,error,warning,success
|
// 按钮的预置样式,info,primary,error,warning,success
|
||||||
type: {
|
type: {
|
||||||
type: String,
|
type: String,
|
||||||
default: uni.$u.props.button.type
|
default: uni.$u.props.button.type
|
||||||
},
|
},
|
||||||
// 按钮尺寸,large,normal,small,mini
|
// 按钮尺寸,large,normal,small,mini
|
||||||
size: {
|
size: {
|
||||||
type: String,
|
type: String,
|
||||||
default: uni.$u.props.button.size
|
default: uni.$u.props.button.size
|
||||||
},
|
},
|
||||||
// 按钮形状,circle(两边为半圆),square(带圆角)
|
// 按钮形状,circle(两边为半圆),square(带圆角)
|
||||||
shape: {
|
shape: {
|
||||||
type: String,
|
type: String,
|
||||||
default: uni.$u.props.button.shape
|
default: uni.$u.props.button.shape
|
||||||
},
|
},
|
||||||
// 按钮是否镂空
|
// 按钮是否镂空
|
||||||
plain: {
|
plain: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: uni.$u.props.button.plain
|
default: uni.$u.props.button.plain
|
||||||
},
|
},
|
||||||
// 是否禁止状态
|
// 是否禁止状态
|
||||||
disabled: {
|
disabled: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: uni.$u.props.button.disabled
|
default: uni.$u.props.button.disabled
|
||||||
},
|
},
|
||||||
// 是否加载中
|
// 是否加载中
|
||||||
loading: {
|
loading: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: uni.$u.props.button.loading
|
default: uni.$u.props.button.loading
|
||||||
},
|
},
|
||||||
// 加载中提示文字
|
// 加载中提示文字
|
||||||
loadingText: {
|
loadingText: {
|
||||||
type: [String, Number],
|
type: [String, Number],
|
||||||
default: uni.$u.props.button.loadingText
|
default: uni.$u.props.button.loadingText
|
||||||
},
|
},
|
||||||
// 加载状态图标类型
|
// 加载状态图标类型
|
||||||
loadingMode: {
|
loadingMode: {
|
||||||
type: String,
|
type: String,
|
||||||
default: uni.$u.props.button.loadingMode
|
default: uni.$u.props.button.loadingMode
|
||||||
},
|
},
|
||||||
// 加载图标大小
|
// 加载图标大小
|
||||||
loadingSize: {
|
loadingSize: {
|
||||||
type: [String, Number],
|
type: [String, Number],
|
||||||
default: uni.$u.props.button.loadingSize
|
default: uni.$u.props.button.loadingSize
|
||||||
},
|
},
|
||||||
// 开放能力,具体请看uniapp稳定关于button组件部分说明
|
// 开放能力,具体请看uniapp稳定关于button组件部分说明
|
||||||
// https://uniapp.dcloud.io/component/button
|
// https://uniapp.dcloud.io/component/button
|
||||||
openType: {
|
openType: {
|
||||||
type: String,
|
type: String,
|
||||||
default: uni.$u.props.button.openType
|
default: uni.$u.props.button.openType
|
||||||
},
|
},
|
||||||
// 用于 <form> 组件,点击分别会触发 <form> 组件的 submit/reset 事件
|
// 用于 <form> 组件,点击分别会触发 <form> 组件的 submit/reset 事件
|
||||||
// 取值为submit(提交表单),reset(重置表单)
|
// 取值为submit(提交表单),reset(重置表单)
|
||||||
formType: {
|
formType: {
|
||||||
type: String,
|
type: String,
|
||||||
default: uni.$u.props.button.formType
|
default: uni.$u.props.button.formType
|
||||||
},
|
},
|
||||||
// 打开 APP 时,向 APP 传递的参数,open-type=launchApp时有效
|
// 打开 APP 时,向 APP 传递的参数,open-type=launchApp时有效
|
||||||
// 只微信小程序、QQ小程序有效
|
// 只微信小程序、QQ小程序有效
|
||||||
appParameter: {
|
appParameter: {
|
||||||
type: String,
|
type: String,
|
||||||
default: uni.$u.props.button.appParameter
|
default: uni.$u.props.button.appParameter
|
||||||
},
|
},
|
||||||
// 指定是否阻止本节点的祖先节点出现点击态,微信小程序有效
|
// 指定是否阻止本节点的祖先节点出现点击态,微信小程序有效
|
||||||
hoverStopPropagation: {
|
hoverStopPropagation: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: uni.$u.props.button.hoverStopPropagation
|
default: uni.$u.props.button.hoverStopPropagation
|
||||||
},
|
},
|
||||||
// 指定返回用户信息的语言,zh_CN 简体中文,zh_TW 繁体中文,en 英文。只微信小程序有效
|
// 指定返回用户信息的语言,zh_CN 简体中文,zh_TW 繁体中文,en 英文。只微信小程序有效
|
||||||
lang: {
|
lang: {
|
||||||
type: String,
|
type: String,
|
||||||
default: uni.$u.props.button.lang
|
default: uni.$u.props.button.lang
|
||||||
},
|
},
|
||||||
// 会话来源,open-type="contact"时有效。只微信小程序有效
|
// 会话来源,open-type="contact"时有效。只微信小程序有效
|
||||||
sessionFrom: {
|
sessionFrom: {
|
||||||
type: String,
|
type: String,
|
||||||
default: uni.$u.props.button.sessionFrom
|
default: uni.$u.props.button.sessionFrom
|
||||||
},
|
},
|
||||||
// 会话内消息卡片标题,open-type="contact"时有效
|
// 会话内消息卡片标题,open-type="contact"时有效
|
||||||
// 默认当前标题,只微信小程序有效
|
// 默认当前标题,只微信小程序有效
|
||||||
sendMessageTitle: {
|
sendMessageTitle: {
|
||||||
type: String,
|
type: String,
|
||||||
default: uni.$u.props.button.sendMessageTitle
|
default: uni.$u.props.button.sendMessageTitle
|
||||||
},
|
},
|
||||||
// 会话内消息卡片点击跳转小程序路径,open-type="contact"时有效
|
// 会话内消息卡片点击跳转小程序路径,open-type="contact"时有效
|
||||||
// 默认当前分享路径,只微信小程序有效
|
// 默认当前分享路径,只微信小程序有效
|
||||||
sendMessagePath: {
|
sendMessagePath: {
|
||||||
type: String,
|
type: String,
|
||||||
default: uni.$u.props.button.sendMessagePath
|
default: uni.$u.props.button.sendMessagePath
|
||||||
},
|
},
|
||||||
// 会话内消息卡片图片,open-type="contact"时有效
|
// 会话内消息卡片图片,open-type="contact"时有效
|
||||||
// 默认当前页面截图,只微信小程序有效
|
// 默认当前页面截图,只微信小程序有效
|
||||||
sendMessageImg: {
|
sendMessageImg: {
|
||||||
type: String,
|
type: String,
|
||||||
default: uni.$u.props.button.sendMessageImg
|
default: uni.$u.props.button.sendMessageImg
|
||||||
},
|
},
|
||||||
// 是否显示会话内消息卡片,设置此参数为 true,用户进入客服会话会在右下角显示"可能要发送的小程序"提示,
|
// 是否显示会话内消息卡片,设置此参数为 true,用户进入客服会话会在右下角显示"可能要发送的小程序"提示,
|
||||||
// 用户点击后可以快速发送小程序消息,open-type="contact"时有效
|
// 用户点击后可以快速发送小程序消息,open-type="contact"时有效
|
||||||
showMessageCard: {
|
showMessageCard: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: uni.$u.props.button.showMessageCard
|
default: uni.$u.props.button.showMessageCard
|
||||||
},
|
},
|
||||||
// 额外传参参数,用于小程序的data-xxx属性,通过target.dataset.name获取
|
// 额外传参参数,用于小程序的data-xxx属性,通过target.dataset.name获取
|
||||||
dataName: {
|
dataName: {
|
||||||
type: String,
|
type: String,
|
||||||
default: uni.$u.props.button.dataName
|
default: uni.$u.props.button.dataName
|
||||||
},
|
},
|
||||||
// 节流,一定时间内只能触发一次
|
// 节流,一定时间内只能触发一次
|
||||||
throttleTime: {
|
throttleTime: {
|
||||||
type: [String, Number],
|
type: [String, Number],
|
||||||
default: uni.$u.props.button.throttleTime
|
default: 2000
|
||||||
},
|
},
|
||||||
// 按住后多久出现点击态,单位毫秒
|
// 按住后多久出现点击态,单位毫秒
|
||||||
hoverStartTime: {
|
hoverStartTime: {
|
||||||
type: [String, Number],
|
type: [String, Number],
|
||||||
default: uni.$u.props.button.hoverStartTime
|
default: uni.$u.props.button.hoverStartTime
|
||||||
},
|
},
|
||||||
// 手指松开后点击态保留时间,单位毫秒
|
// 手指松开后点击态保留时间,单位毫秒
|
||||||
hoverStayTime: {
|
hoverStayTime: {
|
||||||
type: [String, Number],
|
type: [String, Number],
|
||||||
default: 500
|
default: uni.$u.props.button.hoverStayTime
|
||||||
},
|
},
|
||||||
// 按钮文字,之所以通过props传入,是因为slot传入的话
|
// 按钮文字,之所以通过props传入,是因为slot传入的话
|
||||||
// nvue中无法控制文字的样式
|
// nvue中无法控制文字的样式
|
||||||
text: {
|
text: {
|
||||||
type: [String, Number],
|
type: [String, Number],
|
||||||
default: uni.$u.props.button.text
|
default: uni.$u.props.button.text
|
||||||
},
|
},
|
||||||
// 按钮图标
|
// 按钮图标
|
||||||
icon: {
|
icon: {
|
||||||
type: String,
|
type: String,
|
||||||
default: uni.$u.props.button.icon
|
default: uni.$u.props.button.icon
|
||||||
},
|
},
|
||||||
// 按钮图标
|
// 按钮图标
|
||||||
iconColor: {
|
iconColor: {
|
||||||
type: String,
|
type: String,
|
||||||
default: uni.$u.props.button.icon
|
default: uni.$u.props.button.icon
|
||||||
},
|
},
|
||||||
// 按钮颜色,支持传入linear-gradient渐变色
|
// 按钮颜色,支持传入linear-gradient渐变色
|
||||||
color: {
|
color: {
|
||||||
type: String,
|
type: String,
|
||||||
default: uni.$u.props.button.color
|
default: uni.$u.props.button.color
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Loading…
Reference in New Issue
Block a user