微信小程序表單組件總結


1,Form

Form表單組件,結合Cell、Checkbox-group、Checkbox組件等做表單校驗。

{

  "component": true,

  "usingComponents": {

    "mp-toptips": "../components/toptips/toptips",

    "mp-cells": "../components/cells/cells",

    "mp-cell": "../components/cell/cell",

    "mp-checkbox": "../components/checkbox/checkbox",

    "mp-checkbox-group": "../components/checkbox-group/checkbox-group",

    "mp-form": "../components/form/form"

  }

 

}

2,FormPage

表單頁面,規定了標准表單的頂部的標題和底部的按鈕提示等區域的規范

 

代碼引入

在 page.json 中引入組件

 

{

  "usingComponents": {

    "mp-form-page": "www.dglantun.com/components/form-page/form-page",

    "mp-form": "../../components/form/form"

  }

 

}

3,Cell

 

Cell是列表或者是表單的一項,常用於設置頁的展示,或者用在表單中,作為表單的每一個要填寫的項,Cell必須要放在Cells組件的下面。

 

4,Checkbox-group和Checkbox

Checkbox-group是由一組單選或者多選Checkbox組件組成,

Form


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM