j-Empty
pathmusi zawierać źródło danych, które będzie monitorowane
Konfiguracja:
icon {String}jako ikona domyślna (default:ti ti-database)parent {String}to rodzinny pojemnik, który ustala minimalną wysokość (default:parent)- Wysokość
height {Number}(jeśli nie chcesz używaćparent, domyślnie:undefined) margin {Number}na margines (default:0)topoffset {Boolean}stosujeelement.offset().topjako marżę (default:false)topposition {Boolean}stosujeelement.position().topjako marżę (default:false)- NEW
wait {Boolean}czeka na dane (default:false)
Przypadek 1:
<ui-component name="empty" path="datasource" class="hidden">
Items not found
</ui-component>
<ui-bind path="datasource" config="show:value && value.length" class="hidden"></ui-bind>Przypadek użycia 2:
<ui-component name="empty" path="datasource" class="hidden">
<script type="text/html">
Items not found
</script>
<div>
YOUR CONTENT. This DIV will be hidden automatically if the "datasource" is empty.
</div>
</ui-componentUżyj go z <ui-component name="empty">Gdy element nie jest jeszcze ładowany, jComponent Pobierz go po pierwszym użyciu z adresu DEF.fallback (Wydaje się Componentator Autor: Peter Širka Źródło: Componentator Zestaw składników, licencja MIT.
<ui-component name="empty" path="datasource" config="parent:window;wait:false" class="hidden">The datasource is empty.</ui-component>
<script>
var datasource = [];
// Empty component will be hidden after 5 seconds
PUSH('datasource', { item: 1 }, 5000);
</script>