|
@@ -1,10 +1,10 @@
|
|
|
-export default function (option) {
|
|
|
+export default function (option, placeholder = '请选择', errMsg = '请先选择数据') {
|
|
|
return new Promise((r, j) => {
|
|
|
const h = this.$createElement
|
|
|
var _this = this
|
|
|
var done_ = null
|
|
|
this.$msgbox({
|
|
|
- title: '请选择',
|
|
|
+ title: placeholder,
|
|
|
message: h(
|
|
|
'el-select',
|
|
|
{
|
|
@@ -13,7 +13,9 @@ export default function (option) {
|
|
|
},
|
|
|
props: {
|
|
|
value: '',
|
|
|
- filterable: true
|
|
|
+ filterable: true,
|
|
|
+ clearable: true,
|
|
|
+ size: 'mini'
|
|
|
},
|
|
|
ref: 'selectView',
|
|
|
on: {
|
|
@@ -41,7 +43,7 @@ export default function (option) {
|
|
|
} else {
|
|
|
done_ = done
|
|
|
this.$message({
|
|
|
- message: '请先选择数据',
|
|
|
+ message: errMsg,
|
|
|
type: 'warning'
|
|
|
})
|
|
|
}
|