0

これが私の現在の温度です

<div class="ProjectT">{strType}&nbsp - &nbsp{strTitle}</div>

アーキテクト経由で可能かどうかは本当にわかりませんが、{strType} を、strType の値に応じて IcoMoon アイコンを挿入するスイッチ ケースに置き換えたいと考えています。

アイコンはすでに追加されているはずです(チェックして動作します)

4

2 に答える 2

0

私は IcoMoon に詳しくありませんが、必要に応じてこれを調整することができます。

new Ext.XTemplate(
    '<tpl for=".">',
        '<div class="ProjectT"><img src="{[this.getIcon(values.strType)]}" />&nbsp - &nbsp{strTitle}</div>',
    '</tpl>',
    {
        getIcon: function(strType){
            switch (strType)
            {
                case "x": return "x.png";
                //etc...
            }
        }
    }
)
于 2013-07-03T15:51:20.773 に答える