
Element UI: messagebox嵌套el-select
element
A Vue.js 2.0 UI Toolkit for Web
项目地址:https://gitcode.com/gh_mirrors/eleme/element

·
data中:
new Vue({
data(){
//单个体系指标信息用于抽屉中的表格展示
singleSchemeDetailInfo: [],
//要显示哪个体系
schemeIDForDisplay: ''
}
})
method中:
const h = this.$createElement;
var _this = this;
this.$msgbox({
title: '请选择体系', //弹框标题
//弹框信息
message: h('el-select', {
props: {
value: '',
filterable: true
},
ref: 'selectView',
on: {
change: e => {
_this.schemeIDForDisplay = e;
_this.$refs.selectView.value = e;
}
}
},
[
_this.schemeTableData.map(it => {
return h('el-option', {
props: {
key: it.scheme_id,
label: it.scheme_name,
value: it.scheme_id
}
});
})
]
),
showCancelButton: true,
closeOnClickModal: false,
confirmButtonText: '确定',
cancelButtonText: '取消'
}).then(_ => {
//成功操作
console.log('点击确定,运行体系scheme_id=' + _this.schemeIDForDisplay);
}).catch(_ => {
//取消操作
console.log('取消');
});
效果:




A Vue.js 2.0 UI Toolkit for Web
最近提交(Master分支:6 个月前 )
c345bb45
10 个月前
a07f3a59
* Update transition.md
* Update table.md
* Update transition.md
* Update table.md
* Update transition.md
* Update table.md
* Update table.md
* Update transition.md
* Update popover.md 10 个月前
更多推荐
所有评论(0)