The Select drop-down box does not have an optional gray
One
Html
<divclass="Sale"> <Select@change ="Getcountydata ()"> <option> Please select </option> <option v for="(Item,index) in data":d isabled="Item.is_true==1?true:false":class="{statusbtn:item.is_true==1}">{{item.is_true}}</option> </Select></div>
Two
Script
default { ' app', data () { return {
"Data": [{
"Is_true": "0",
"region_id": "12",
"Region_name": "Nanchang",
},
{
"Is_true": "1",
"region_id": "13",
"Region_name": "Jingdezhen",
},
{
"Is_true": "0",
"region_id": "14",
"Region_name": "Pingxiang",
},
{
"Is_true": "1",
"region_id": "15",
"Region_name": "Jiujiang",
},
{
"Is_true": "0",
"region_id": "16",
"Region_name": "Xinyu",
},
{
"Is_true": "0",
"region_id": "17",
"Region_name": "Yingtan",
}
]
} }, props: [], mounted () { },
methods:{
}}
Three
Css
. statusbtn { color: #d6caca; Cursor:not/* This works on the button, is a disabled small sign */ }
Vue Select drop-down box an item is set to not selectable