<template>
  <div class="cascader-split">
    <el-form ref="FilterForm" label-position="left" label-width="80px" inline>
      <el-form-item label="levelOne">
        <level-one
          v-model="modalForm.levelOne"
          set-default
          @on-change="selectChange"
        ></level-one>
      </el-form-item>
      <el-form-item label="levelTwo">
        <level-two
          v-model="modalForm.levelTwo"
          :level-one-model="modalForm.levelOne"
          @on-change="selectChange"
          set-default
        ></level-two>
      </el-form-item>
    </el-form>
  </div>
</template>

<script>
import LevelOne from "./LevelOne";
import LevelTwo from "./LevelTwo";

export default {
  name: "cascader-split",
  components: {
    LevelOne,
    LevelTwo,
  },
  data() {
    return {
      modalForm: {
        levelOne: "",
        levelTwo: "",
      },
    };
  },
  methods: {
    selectChange() {
      console.log(this.modalForm);
    },
  },
};
</script>
