Skip to content

Form 表单

Form 表单打开
9:41
/pages/form/index

介绍

weui-form 提供 WeUI 表单页面结构,包含标题描述、控件区域、提示区域、底部操作和额外信息。

基础用法

vue
<weui-form
  title="表单结构"
  desc="展示表单页面的信息层级"
  tips="底部说明文字"
  :actions="[{ text: '确定' }]"
>
  <weui-cell-group variant="form">
    <weui-cell title="微信号">
      <template #right>
        <weui-input v-model="wechat" placeholder="填写本人微信号" />
      </template>
    </weui-cell>
  </weui-cell-group>
</weui-form>

Props

属性说明类型默认值
title表单标题string''
desc表单描述string''
tips底部提示string''
extra额外信息string''
actions操作按钮数组,支持 { text, type, disabled }array[]
bottomFixed操作区是否固定在底部booleanfalse

Slots

插槽名说明
header自定义头部标题区域
default表单控件区域
tips自定义提示区域
actions自定义操作区域
extra自定义额外信息

Events

事件名说明回调参数
action-click点击默认操作按钮action, index

Released under the MIT License.