W3Cschool
恭喜您成為首批注冊(cè)用戶
獲得88經(jīng)驗(yàn)值獎(jiǎng)勵(lì)
表單頁面,規(guī)定了標(biāo)準(zhǔn)表單的頂部的標(biāo)題和底部的按鈕提示等區(qū)域的規(guī)范
在 page.json 中引入組件
{
"usingComponents": {
"mp-form-page": "../../components/form-page/form-page",
"mp-form": "../../components/form/form"
}
}
<!--WXML示例代碼-->
<mp-form-page title="表單結(jié)構(gòu)" subtitle="展示表單頁面的信息結(jié)構(gòu)樣式, 分別由頭部區(qū)域/控件區(qū)域/提示區(qū)域/操作區(qū)域和底部信息區(qū)域組成。">
<mp-form id="form" rules="{{rules}}" models="{{formData}}">
</mp-form>
<checkbox-group slot="tips" bindchange="bindAgreeChange">
<label class="weui-agree" for="weuiAgree">
<view class="weui-agree__text">
<checkbox class="weui-agree__checkbox" id="weuiAgree" value="agree" checked="{{isAgree}}" />
<view class="weui-agree__checkbox-icon">
<icon class="weui-agree__checkbox-icon-check" type="success_no_circle" size="9" wx:if="{{isAgree}}"></icon>
</view>
閱讀并同意<navigator url="" class="weui-agree__link">《相關(guān)條款》</navigator>
</view>
</label>
</checkbox-group>
<view slot="button">
<button class="weui-btn" type="primary" bindtap="submitForm">確定</button>
</view>
</mp-form-page>
屬性 | 類型 | 默認(rèn)值 | 必填 | 說明 |
---|---|---|---|---|
title | string | 否 | 標(biāo)題 | |
subtitle | boolean | 否 | 副標(biāo)題 |
名稱 | 描述 |
---|---|
title | 標(biāo)題區(qū)域slot和title屬性互斥 |
tips | 底部確認(rèn)按鈕前面的提示區(qū)域 |
button | 底部提交按鈕區(qū)域 |
suffixtips | 提交按鈕下面的提示區(qū)域 |
footer | 頁腳的內(nèi)容區(qū)域 |
Copyright©2021 w3cschool編程獅|閩ICP備15016281號(hào)-3|閩公網(wǎng)安備35020302033924號(hào)
違法和不良信息舉報(bào)電話:173-0602-2364|舉報(bào)郵箱:jubao@eeedong.com
掃描二維碼
下載編程獅App
編程獅公眾號(hào)
聯(lián)系方式:
更多建議: