<template>
  <el-form ref="form" :model="form" label-width="80px">
    <el-form-item label="帐号">
      <el-input v-model="form.user" placeholder="请输入帐号"></el-input>
    </el-form-item>
    <el-form-item label="密码">
     <el-input v-model="form.password" type="password" placeholder="请输入密码"></el-input>
    </el-form-item>
    <el-form-item>
      <el-button type="primary" @click="onLogin(form.user,form.password)">登录</el-button>
    </el-form-item>
  </el-form>
</template>

<script lang="ts">

  export default {
    name: 'login',
    data(){
      return {
        form:{
          user:'',
          password:''
        }
      }
    },
    props:{
      onLogin:Function
    }
  }
</script>
