插槽

jsform({
    init: function (callback, initContext) {
        //initContext.scope.XingMingLN=initContext.context.login.loginName; 
        callback();
    },

    'on:~mounted': {

        'nnf-slot_2018.9.20.12_74a47322': {   //nnf-slot_2018.9.20.12_74a47322   插槽Id
            'nnf-slot': function () {
                var ctx = this._ctx;

                //把全新的 Vue 实例挂载到插槽中
                new Vue({
                    el: document.getElementById(ctx.layout_id),
                    template:
                        '<div style="background-color:red;100px;height:50px">'+
                            'sasasas {{name}} <el-form-item label="测试"></el-form-item><el-input type="text" prop="Name"></el-input>'+
                        '</div>',

                    data: {
                        entity: ctx.entity, context: ctx.context,
                        name: '张三'
                    }
                });
            }
        }

    }



});

  

原文地址:https://www.cnblogs.com/hnzheng/p/9680150.html