<template>
  <div class="siteManage-main groupInfo">
    <el-form
      :model="form"
      :rules="rules"
      ref="form"
      label-width="100px"
    >
          <div class="grid-content bg-purple">
            <div class="el-form-item blockTitle">
               分组信息
             </div>
            <div></div>
            <el-form-item label="分组名称" prop="name" label-width="130px">
              <el-input v-model="name"></el-input>
            </el-form-item>

          
            <el-form-item>
              <el-button type="primary" @click="submitForm('form')"
                >保存</el-button>
            
            </el-form-item>

          </div>
       
    </el-form>
  </div>
</template>

<script>
export default {
  name: "GroupInfoCom",
  data() {
    return {
    
        groupingName: "分组1",
      
      rules: {
        groupingName: [
          { required: true, message: "请输入分组名称", trigger: "blur" },
          { min: 3, max: 5, message: "长度在 3 到 5 个字符", trigger: "blur" },
        ],
      },
    };
  },
  methods: {
    handleRemove(file) {
      console.log(file);
    },
  
    submitForm(formName) {
      this.$refs[formName].validate((valid) => {
        if (valid) {
          alert("submit!");
        } else {
          console.log("error submit!!");
          return false;
        }
      });
    },
  },
};
</script>
<style scoped lang="scss">
</style>
