首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >基于流星中无功无功的值打开模态窗口

基于流星中无功无功的值打开模态窗口
EN

Stack Overflow用户
提问于 2015-10-16 23:21:49
回答 1查看 147关注 0票数 0

我有一张表格

代码语言:javascript
复制
<template name="form">
  {{#autoForm id="afUpdateDemo" type=formType collection="Items" doc=selectedDoc autosave=autoSaveMode}}
    {{> afQuickField name="title"}}
    {{#unless autoSaveMode}}
      <div class="form-group">
        <button type="submit" class="btn btn-primary" disabled="{{disableButtons}}">Submit</button>
        <button type="reset" class="btn btn-default" disabled="{{disableButtons}}">Reset Form</button>
      </div>
    {{/unless}}
  {{/autoForm}}
</template>

我希望此表单在模式窗口中打开。因此,如果selectedDoc不为空,则模式应该是活动的。我该怎么做呢?在bootstrap文档中,它们只展示了如何通过链接激活模式窗口。

我也找到了https://atmospherejs.com/yogiben/autoform-modals,但它也只能通过链接来激活。

EN

回答 1

Stack Overflow用户

发布于 2015-10-17 05:11:00

mizzao:bootboxjs包直接从代码中为您提供了这种能力。

代码语言:javascript
复制
if ( selectedDoc ) bootbox.dialog({
  .. your dialog definitions here
});
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/33174069

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档