Closed mishanga closed 9 years ago
block('z-weather').elem('tile')( match(function() { return !this.mods.layout; }) .tag()('td'), match(function() { return this.isLast(); }) .mix()({ elemMods: { position: 'last' } }) );
[{ tag: 'table', content: { block: 'z-weather', tag: 'tr', content: [ { elem: 'tile', content: 'cell' }, { elem: 'tile', content: 'last cell' } ] } }, { block: 'z-weather', elem: 'tile', mods: { layout: 'yes' }, content: 'with layout mode' }, { block: 'z-weather', elem: 'tile', mods: { layout: 'yes' }, content: 'Last with layout mode' }];
<table>...</table> <div class="z-weather__tile z-weather__tile_layout_yes">with layout mode</div> <div class="z-weather__tile z-weather__tile_layout_yes z-weather__tile_position_last">Last with layout mode</div>
<table>...</table> <div class="z-weather__tile z-weather__tile_layout_yes z-weather__tile_position_last">with layout mode</div> <div class="z-weather__tile z-weather__tile_layout_yes">Last with layout mode</div>
В простом случае, когда просто массив из двух и более элементов, не воспроизводится.
странненько
Fixed, thank you!
:+1:
template
bemjson
expected result
actual result