<script>
export default {
  name: "ZooContainer",
  data() {
    return {
      form:{
        name:'张三',
        password:'123456'
      }
    }
  },
  methods: {
    onSubmit() {
      console.log('点击了按钮')
      this.$router.push({
        path: '/panel/home',
      })
    }
  }
}
</script>

<template>
  <div class="root">
    <el-card style="width: 480px" shadow="always">
      <el-form :model="form" label-width="auto" style="max-width: 600px">
        <el-form-item label="用户名">
          <el-input v-model="form.name" style="width: 240px" placeholder="请输入用户名"/>
        </el-form-item>
        <el-form-item label="密码">
          <el-input
              v-model="form.password"
              style="width: 240px"
              type="password"
              placeholder="请输入密码"
              show-password
          />
        </el-form-item>
        <el-form-item>
          <el-button type="primary" @click="onSubmit">Create</el-button>
          <el-button>Cancel</el-button>
        </el-form-item>
      </el-form>
    </el-card>
  </div>

</template>

<style scoped>
.root {
  position: relative;
}

</style>