Filter如何在Uikit中运行?

时间:2018-06-14 18:07:49

标签: javascript uikit

update img clicking时如何button图库var btn = document.getElementById('btn'), link = document.querySelectorAll('.uk-subnav.uk-subnav-pill li'); btn.addEventListener('click', function() { console.log('k'); link.forEach(function(elem) { elem.classList.remove('uk-active'); }); document.getElementById('all').classList.add('uk-active'); });

目前我刚刚更新了活动课程,但没有设法恢复所有项目。

JS

<button type="button" id="btn" class="uk-button uk-button-secondary uk-position-center" style="top:1.5em;letter-spacing:.5em;">Back to top</button>
        <div uk-filter="target: .js-filter">
            <ul class="uk-subnav uk-subnav-pill">
                <li id="all" class="uk-active" uk-filter-control><a href="#">All</a></li>
                <li uk-filter-control="[data-color='white']"><a href="#">White</a></li>
                <li uk-filter-control="[data-color='blue']"><a href="#">Blue</a></li>
                <li uk-filter-control="[data-color='black']"><a href="#">Black</a></li>
            </ul>
            <ul class="js-filter uk-child-width-1-2 uk-child-width-1-3@m uk-text-center" uk-grid>
                <li data-color="white">
                    <div class="uk-card uk-card-default uk-card-body">Item</div>
                </li>
                <li data-color="blue">
                    <div class="uk-card uk-card-primary uk-card-body">Item</div>
                </li>
                <li data-color="black">
                    <div class="uk-card uk-card-default uk-card-body">Item</div>
                </li>
            </ul>
        </div>

HTML 的一部分:

output.set_shape(tensor_shape.TensorShape([None]).concatenate(shape))

Fiddle

0 个答案:

没有答案