Vuetify —— 使用v-select下拉框
<v-row no-gutters dense style="border-bottom:none!important;"><v-col cols="3" class="mt-2"><v-subheader><span class="red--text">*</span>类型</v-subheader></v-col&g
·
<v-row no-gutters dense style="border-bottom:none!important;">
<v-col cols="3" class="mt-2">
<v-subheader>
<span class="red--text">*</span>
类型
</v-subheader>
</v-col>
<v-col class="d-flex" cols="12" sm="6">
<v-select
:items="types"
:label="value_type ? '' : '请选择'"
item-text="name"
item-value="id"
v-model="value_type"
@change="getvalue_typeSelected(value_type)"
></v-select>
</v-col>
</v-row>
<script>
export default {
data(){
return {
types: [
{
id: "STRING",
name: "字符串类型",
},
{
id: "BOOLEAN",
name: "布尔值",
},
{
id: "INTEGER",
name: "数字类型",
},
{
id: "DATETIME",
name: "日期时间类型",
},
{
id: "DATE",
name: "日期类型",
},
],
}
},
methods:{
getvalue_typeSelected(val) {
this.value_type = val;
}
}
}
</script>
更多推荐
已为社区贡献27条内容
所有评论(0)