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('取消');
    });

效果:

 

GitHub 加速计划 / eleme / element
10
1
下载
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 个月前
Logo

旨在为数千万中国开发者提供一个无缝且高效的云端环境,以支持学习、使用和贡献开源项目。

更多推荐