40 lines
695 B
Vue
40 lines
695 B
Vue
<script lang="ts" setup>
|
|
import { useCommonStore } from '@/store/common'
|
|
|
|
const props = defineProps({
|
|
multiple: {
|
|
type: Boolean,
|
|
default: false,
|
|
},
|
|
checkStrictly: {
|
|
type: Boolean,
|
|
default: false,
|
|
},
|
|
})
|
|
|
|
const commonStore = useCommonStore()
|
|
</script>
|
|
|
|
<template>
|
|
<el-cascader
|
|
placeholder="请选择地域"
|
|
:options="commonStore.areaOptions"
|
|
filterable
|
|
:props="{
|
|
label: 'name',
|
|
value: 'name',
|
|
children: 'children',
|
|
multiple: props.multiple,
|
|
checkStrictly: props.checkStrictly,
|
|
}"
|
|
class="area-select-cascader"
|
|
v-bind="$attrs"
|
|
/>
|
|
</template>
|
|
|
|
<style lang="scss">
|
|
.area-select-cascader {
|
|
width: 100%;
|
|
}
|
|
</style>
|