a ver
This commit is contained in:
@@ -5,18 +5,28 @@ const html = htm.bind(h);
|
||||
export default defineComponent({
|
||||
name: 'UserCard',
|
||||
props: { item: { type: Object, required: true }, mode: { type: String, default: 'user' } },
|
||||
<<<<<<< HEAD
|
||||
emits: ['toggleDisable', 'remove', 'edit'],
|
||||
setup(props, { emit }) {
|
||||
function toggle() { emit('toggleDisable', props.item); }
|
||||
function remove() { emit('remove', props.item); }
|
||||
function edit() { emit('edit', props.item); }
|
||||
=======
|
||||
emits: ['toggleDisable', 'remove'],
|
||||
setup(props, { emit }) {
|
||||
function toggle() { emit('toggleDisable', props.item); }
|
||||
function remove() { emit('remove', props.item); }
|
||||
>>>>>>> c92df7bb9a1b22aee21d2c083ea163d21ab1a722
|
||||
return () => html`<div class="card">
|
||||
<div class="row">
|
||||
<b>${props.mode === 'user' ? props.item.username : (props.item.device || props.item.username)}</b>
|
||||
<span class="chip">VLAN ${props.item.vlan}</span>
|
||||
${props.item.disabled ? html`<span class="chip" style="color:#b33">deshabilitado</span>` : html`<span class="chip">activo</span>`}
|
||||
<span class="spacer"></span>
|
||||
<<<<<<< HEAD
|
||||
<button class="icon-btn" onClick=${edit}>Editar</button>
|
||||
=======
|
||||
>>>>>>> c92df7bb9a1b22aee21d2c083ea163d21ab1a722
|
||||
<button class="icon-btn" onClick=${toggle}>${props.item.disabled ? 'Habilitar' : 'Deshabilitar'}</button>
|
||||
<button class="icon-btn" onClick=${remove}>Eliminar</button>
|
||||
</div>
|
||||
@@ -24,3 +34,7 @@ export default defineComponent({
|
||||
</div>`;
|
||||
}
|
||||
});
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
|
||||
>>>>>>> c92df7bb9a1b22aee21d2c083ea163d21ab1a722
|
||||
|
||||
Reference in New Issue
Block a user