1.0.5 • Published 6 years ago
lockui v1.0.5
LockUI
Plugin para bloquear la interfaz de usuario con Javascript puro, sin utilizar jQuery. Basado en BlockUI y FreezeUI
Instalación
NPM
$ npm install --save lockuiimport UI from 'lockui';CDN
<script src="https://unpkg.com/lockui@latest/lockui.js" type="text/javascript"></script>script
<script src="/path/to/lockui.js" type="text/javascript"></script>Uso
Simple
// Bloquear Interfaz de Usuario
UI.lock();
// Desbloquear Interfaz de Usuario
UI.unlock();Opciones
Puedes establecer algunas opciones cuando llamas la función UI.lock()
| Param | Type | Default | Details |
|---|---|---|---|
| text | string | Procesando... | El texto a mostrar. |
| selector | string | body del documento | Elemento a bloquear. |
Ejemplos
UI.lock(); // Para bloquear toda la página
UI.lock({ text: 'Custom text' }); // Bloquear con un texto personalizado
UI.lock({ selector: '#component' }); // Bloquear un cierto componente
UI.lock({ selector: '.component', text: 'Getting there...' }) // Usando ambas opciones a la vez.
UI.unlock(); // Desbloquear la interfaz de usuarioLicence
LockUI está bajo MIT licence