<template>
      <AdministrativeDivisionsTree v-model:value="value" :show-search="{ filter }" @change="searchAdministrativeDivisionTree"></AdministrativeDivisionsTree>
</template>
<script setup lang="ts">
import AdministrativeDivisionsTree from "@/components/tree/AdministrativeDivisionsTree.vue";
import {ref} from "vue";
import {ShowSearchType} from "ant-design-vue/es/cascader";

const value = ref([ "110000", "110100", "110116", "110116005" ])

const filter: ShowSearchType['filter'] = (inputValue, path) => {
  return path?.some(option => option.label.toLowerCase().indexOf(inputValue?.toLowerCase()) > -1);
};

const  searchAdministrativeDivisionTree = (e:Array<string>)=>{
  value.value = e as any
}
</script>



<style scoped lang="scss">

</style>
