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.

49 lines
1.2 KiB

<template>
<el-form-item
:style="{...style,height:height,...styleObject}"
:class="[{'column':column},{'w510':addClass=='w510'},{'w388':addClass=='w388'},'form-item']"
:label="label" :prop="prop" :rules="rules">
<p v-if="desc" class="desc_right">{{ desc }}</p>
<el-select
:style="{width:width}"
v-model="value" placeholder="请选择">
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:disabled="item.disabled"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
</template>
<script>
export default {
name: 'GuipTextarea',
props:['options','styleObject','disabled','defaultValue','placeholder',
'width','height','label','type','prop','rules','column','addClass','desc'],
data() {
return {
value: '',
style:{}
}
},
defaultValue(newVal) {
console.log(newVal,'newVal');
this.value = newVal;
},
created(){
// 默认值赋值
if(this.defaultValue != null){
this.value = this.defaultValue;
}
// 默认提示语
if(this.placeholder){
this.placeholder1 = this.placeholder;
}
},
}
</script>