ant-design 基礎格式


1 格式

<template>
    <div>
        <center><h1>這是·注冊頁面</h1></center>

        <a-form-item label="用戶名" v-bind="formlayout">
          <a-input v-model="username"/>
        </a-form-item >

        <a-form-item v-bind="buttonlayout"  >
        <a-button type="primary"  @click="submit">注冊</a-button>
        </a-form-item>

    </div>
</template>
<script type="text/javascript">
    export  default {
      data(){
        return{
        username:'',
          // 表單樣式
          formlayout:{
          //標簽
          labelCol:{
            xs:{span:24},
            sm:{span:8}
          },
            // 文本框
            wrapperCol:{
            xs:{span:24},
            sm:{span:16}
            }
          },
          // 按鈕樣式
          buttonlayout:{
          //標簽
          wrapperCol:{
            xs:{
              span:24,
              offset:0
            },
            sm:{span:16,offset:8}
          },
          }
        }
      }
</script>

  


免責聲明!

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



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