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>

  

相关文章:

  • 2022-12-23
  • 2021-07-25
  • 2022-12-23
  • 2022-12-23
  • 2021-08-27
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-11-21
  • 2022-12-23
  • 2021-11-01
  • 2021-12-29
  • 2021-07-05
相关资源
相似解决方案