【问题标题】:Google Closure : How to render 2 componentsGoogle Closure:如何渲染 2 个组件
【发布时间】:2014-01-14 00:32:54
【问题描述】:

我有 2 个 goog.ui.component 说 component1 和 component2 我必须渲染两者。

var bottom_content = goog.dom.getElement('diag_details');
component1.render(bottom_content);
component2.render(bottom_content);

上面的代码给出错误“组件已呈现”。

有没有办法渲染多个goog.ui.component。

【问题讨论】:

  • 您必须创建两个实例。 1 个组件在显示树中只能存在一次
  • 能否提供初始化component1和component2的代码?

标签: user-interface components google-closure


【解决方案1】:

错误消息意味着组件已经被直接或间接渲染(它是另一个被渲染元素的子元素)。

【讨论】:

    猜你喜欢
    • 2018-05-04
    • 2019-05-14
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-01-20
    • 1970-01-01
    • 2020-09-10
    • 2017-03-08
    相关资源
    最近更新 更多