feature: 下拉组件添加自定义placeholder
This commit is contained in:
@@ -48,9 +48,16 @@ export default {
|
|||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: true
|
default: true
|
||||||
},
|
},
|
||||||
|
customPlaceholder: {
|
||||||
|
type: String,
|
||||||
|
default: ''
|
||||||
|
},
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
placeholder () {
|
placeholder () {
|
||||||
|
if (this.customPlaceholder !== '') {
|
||||||
|
return this.customPlaceholder
|
||||||
|
}
|
||||||
return `请选择${this.label}`
|
return `请选择${this.label}`
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user