Skip to content

Agree 协议

Agree 协议打开
9:41
/pages/agree/index

介绍

weui-agree 用于协议确认、隐私授权、条款阅读确认等场景,支持默认文案、插槽文案、警示态和禁用态。

基础用法

vue
<template>
  <weui-agree v-model="checked">
    阅读并同意相关协议
  </weui-agree>
</template>

警示与禁用

vue
<weui-agree v-model="checked" warn animated text="请先阅读并勾选协议" />
<weui-agree v-model="checked" disabled text="不可操作协议" />

Props

属性说明类型默认值
modelValue是否选中,支持 v-modelbooleanfalse
text默认协议文字string''
warn是否显示警示态booleanfalse
animated是否启用警示动画booleanfalse
disabled是否禁用booleanfalse
hotarea是否启用 WeUI 扩展点击热区booleantrue

Slots

插槽名说明
default自定义协议文本,可放链接或富文本

Events

事件名说明回调参数
update:modelValue选中状态变化checked
change选中状态变化checked

Released under the MIT License.