dom-if

    0热度

    1回答

    Here is my JSBin 点击“名字:詹姆斯”文本。 我在dom-if中有一个输入元素。在一个事件中,我让dom如果通过,所以元素将会存在,但在dom-if条件通过后我不能立即访问输入元素。 可能我需要知道何时实际评估了dom-if,以及为什么即使条件成为true,元素也不存在。 <!doctype html> <head> <meta charset="utf-8">

    0热度

    3回答

    我有一个<template is="dom-if" if=...,我想用这个逻辑条件。 任何有约束力的我尽量显得truthy: <link href="https://polygit.org/components/polymer/polymer.html" rel="import"> <dom-module id="test-thing"> <template>

    -1热度

    1回答

    我正在寻找一个更好的优化解决方案,在聚合物2.0中有太多if。例如,我建立一个表格对象,其中每个单元格可以是文本,按钮,链接,对象等。我希望用户能够输入2D数组,并让Polymer 2.0对象能够选择使用哪个标记。我目前的解决方案(下面)简单地有几个if语句,但这意味着每个单元格如果要调用每个语句。有没有更好的方法来处理这个问题? <template is="dom-if" if="[[match

    1热度

    1回答

    我试图给某些用户显示一个dom-if模板,但我不知道如何去做。这里是什么,我试图做一个伪代码: <template is="dom-if" if="{{user.isAdmin}}" restamp="true"> <hr /> <h1>Add new conference:</h1> <paper-input id="title" la