【问题标题】:Nativescript closeModal() not workingNativescript closeModal()不起作用
【发布时间】:2016-03-17 17:07:36
【问题描述】:

我试图从我的页面关闭一个模式。我使用了 page.closeModal 但它不起作用:(

这是我为展示模态所做的。

modal.js:

page.showModal("./views/samplemodal", "some custom context", function (ret) {
        console.log(ret)
    }, true);

【问题讨论】:

  • 你能检查一下,你使用的是哪个版本的 {N},因为 closeModa() 是在 1.4 版本中首次工作的。

标签: nativescript showmodaldialog


【解决方案1】:

Page.closeModal() 必须从模态函数调用。

<Button text="Cancel" tap="closeModal"/>

exports.closeModal = function() {
    page.closeModal();
};

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2018-02-25
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-10-07
    相关资源
    最近更新 更多