mirror of
https://github.com/primefaces/primevue.git
synced 2025-05-10 01:12:37 +00:00
Refactor #3922 - For InputSwitch
This commit is contained in:
parent
6539ba296d
commit
636bd1de8f
4 changed files with 66 additions and 4 deletions
|
@ -1,6 +1,6 @@
|
|||
<template>
|
||||
<div :class="containerClass" @click="onClick($event)">
|
||||
<div class="p-hidden-accessible">
|
||||
<div :class="containerClass" @click="onClick($event)" v-bind="ptm('root')">
|
||||
<div class="p-hidden-accessible" v-bind="ptm('hiddenAccessible')">
|
||||
<input
|
||||
ref="input"
|
||||
:id="inputId"
|
||||
|
@ -15,16 +15,19 @@
|
|||
:aria-label="ariaLabel"
|
||||
@focus="onFocus($event)"
|
||||
@blur="onBlur($event)"
|
||||
v-bind="inputProps"
|
||||
v-bind="ptm('inputAria')"
|
||||
/>
|
||||
</div>
|
||||
<span class="p-inputswitch-slider"></span>
|
||||
<span class="p-inputswitch-slider" v-bind="{ ...inputProps, ...ptm('slider') }"></span>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import BaseComponent from 'primevue/basecomponent';
|
||||
|
||||
export default {
|
||||
name: 'InputSwitch',
|
||||
extends: BaseComponent,
|
||||
emits: ['click', 'update:modelValue', 'change', 'input', 'focus', 'blur'],
|
||||
props: {
|
||||
modelValue: {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue