Skip to content

(二次开发)关于在数据模型保存时新增弹窗的问题 #21

Open
@1731lin

Description

@1731lin

Bug 描述
如何在数据模型res_datatype_create.js保存时,引入弹窗?在其他js如param_editor_core.js中点击事件可以通过new MessageBox({
data: {
}
}).$inject(document.body);引入弹窗

重现步骤

  1. 定义一个组件,类似于public\src\module\poplayer\profile_bind_layer.js
  2. 在res_datatype_create.js中引入
    NEJ.define(['pro/poplayer/messagebox'],function (message)
    创建组件
    pro.__handleSubmit = function () {
    // 正在提交当中, 不用再次提交
    if (this.__submit) {
    return;
    }
    if (this.__formObj.
    $checkValidity()) {
    this.__disableBtn(this.__formElem['save'], '提交中...', true);
    var options = this.__getSubmitOptions();
    new MessageBox({
    data: {
    }
    }).$inject(document.body);
    .......
    };
  3. bug 重现

期望结果
期望在保存后出现弹窗

截图
有截图就是最好的。
image
Uploading image.png…

软件环境

  • 操作系统及版本win10:
  • Node及版本:v10.14.2
  • 浏览器及版本:google

其他信息
其他信息可以填这里。

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions