<template>
  <div class="app-container">
    <el-form ref="form" :model="form" label-width="80px">
      <el-form-item label="标题">
        <el-input v-model="form.name" style="width: 50%"></el-input>
      </el-form-item>
      <el-form-item label="详情">
        <el-input v-model="form.name" style="width: 50%"></el-input>
      </el-form-item>
      <el-upload class="upload-demo" style="width: 50%; margin-left: 350px;" drag action="https://jsonplaceholder.typicode.com/posts/" multiple>
        <i class="el-icon-upload"></i>
        <div class="el-upload__text">将文件拖到此处，或<em>点击上传</em></div>
        <div slot="tip" class="el-upload__tip">只能上传jpg/png/pdf文件，且不超过500kb</div>
      </el-upload>
      <el-form-item>
        <el-button type="primary" @click="onSubmit">立即创建</el-button>
        <el-button>取消</el-button>
      </el-form-item>
    </el-form>
  </div>
</template>

<script>
import waves from '@/directive/waves'; // 水波纹效果
export default {
  directives: { waves },
  data() {
    return {
      form: {
        name: '',
      },
    };
  },
  methods: {
    onSubmit(index, row) {
      console.log('submit!');
    },
  },
};
</script>

<style>
</style>
