j-Empty
pathmåste innehålla en datakälla som kommer att övervakas
Konfigurera:
icon {String}en standardikon (default:ti ti-database)parent {String}en föräldralåda som sätter en minimal höjd (default:parent)height {Number}höjdstorlek (om du inte vill användaparent, standard:undefined)margin {Number}en marginal (default:0)topoffset {Boolean}tillämparelement.offset().topsom en marginal (default:false)topposition {Boolean}tillämparelement.position().topsom en marginal (default:false)- NEW
wait {Boolean}väntar på data (default:false)
Användning 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>Användning 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-componentAnvänd den med <ui-component name="empty">När komponenten ännu inte är laddad, jComponent Ladda ner den första gången från adressen i DEF.fallback (en av Componentator Författare: Peter Širka. källa: The Componentator Komponenterna i lager, MIT licens.
<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>