Skip to content

Toptips 顶部提示

Toptips 顶部提示打开
9:41
/pages/toptips/index

介绍

weui-toptips 用于页面顶部错误、成功或信息提示,支持自动关闭和点击关闭。

基础用法

vue
<weui-toptips v-model="visible" type="warn" text="错误提示" />

Props

属性说明类型默认值
modelValue是否显示,支持 v-modelbooleanfalse
text提示文字string''
type类型,可选 warninfosuccessstring'warn'
duration自动关闭时间,0 表示不自动关闭number2000
closable点击提示是否关闭booleantrue

Slots

插槽名说明
default自定义提示内容

Events

事件名说明回调参数
update:modelValue显示状态变化visible
show显示时触发-
close关闭时触发-
click点击提示条event

Released under the MIT License.