<template>
  <div class="app-container">
    <Paragraph title="基础信息">
      <template>
        <FormUI ref="formUI" />
        <el-row type="flex" class="row-bg" justify="center">
          <el-col :span="8">
            <el-button size="mini" @click="handleCancel">取消添加</el-button>
            <el-button type="primary" size="mini" @click="handleSubmit"
              >确认保存</el-button
            >
          </el-col>
        </el-row>
      </template>
    </Paragraph>
  </div>
</template>
<script>
import FormUI from "./formUI.vue";
import Paragraph from "@/components/Paragraph";
export default {
  name: "Add",
  components: { FormUI, Paragraph },
  props: {},
  data() {
    return {};
  },
  methods: {
    handleCancel() {
      this.$store.dispatch("tagsView/delView", this.$route);
      this.$router.push({ path: "/material/list" });
    },
    async handleSubmit() {
      await this.$refs.formUI.validate();
    },
  },
};
</script>
<style lang="scss" scoped>
.container {
  width: 60%;
}
</style>
