You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
38 lines
1.0 KiB
38 lines
1.0 KiB
<template>
|
|
<a-select :mode="data.props.mode" :placeholder="data.props.placeholder" v-model="data.props.value" :disabled="data.props.is_disabled"
|
|
:allowClear="data.props.allowClear" :showSearch="data.props.showSearch" class="drop-select-style">
|
|
<a-select-option v-for="item in data.props.datas" :key="item.dic_code" :value="item.dic_code">
|
|
{{ item.dic_value }}
|
|
</a-select-option>
|
|
</a-select>
|
|
</template>
|
|
|
|
<script>
|
|
import { Select } from 'ant-design-vue'
|
|
export default {
|
|
name: "DropDown",
|
|
props:["field","disabled"],
|
|
data: function () {
|
|
// eslint-disable-next-line no-debugger
|
|
return {
|
|
data:this.field
|
|
}
|
|
},
|
|
components:{
|
|
ASelect:Select,
|
|
ASelectOption:Select.Option
|
|
},
|
|
watch:{
|
|
field:function (newData) {
|
|
this.data = newData;
|
|
},
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style scoped lang="scss">
|
|
.drop-select-style{
|
|
width: 100%;
|
|
}
|
|
</style>
|