Merge branch 'master' of https://github.com/primefaces/primevue
commit
bcf326e0d9
|
@ -4,8 +4,8 @@
|
|||
<i :class="iconClass" />
|
||||
<span class="p-confirm-dialog-message">{{message}}</span>
|
||||
<template #footer>
|
||||
<CDButton :label="rejectLabel" :icon="rejectIcon" :class="rejectClass" @click="reject()"/>
|
||||
<CDButton :label="acceptLabel" :icon="acceptIcon" :class="acceptClass" @click="accept()" autofocus />
|
||||
<CDButton :label="rejectLabel" :icon="rejectIcon" :class="rejectClass" @click="reject()" :autofocus="autoFocusReject"/>
|
||||
<CDButton :label="acceptLabel" :icon="acceptIcon" :class="acceptClass" @click="accept()" :autofocus="autoFocusAccept" />
|
||||
</template>
|
||||
</CDialog>
|
||||
</template>
|
||||
|
@ -104,6 +104,13 @@ export default {
|
|||
},
|
||||
rejectClass() {
|
||||
return ['p-confirm-dialog-reject', this.confirmation ? (this.confirmation.rejectClass || 'p-button-text') : null];
|
||||
},
|
||||
autoFocusAccept() {
|
||||
return this.confirmation.defaultFocus === 'accept' ? true : false;
|
||||
},
|
||||
autoFocusReject() {
|
||||
// backward compatibility
|
||||
return this.confirmation.defaultFocus !== 'accept' ? true : false;
|
||||
}
|
||||
},
|
||||
components: {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<input :class="['p-inputtext p-component', {'p-filled': filled}]" :value="modelValue" @input="onInput" />
|
||||
<input :class="['p-inputtext p-component', {'p-filled': filled}]" :value="modelValue" @input="onInput" v-bind="$attrs" />
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
|
|
@ -192,6 +192,12 @@ export default {
|
|||
<td>true</td>
|
||||
<td>Whether background scroll should be blocked when dialog is visible.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>defaultFocus</td>
|
||||
<td>string</td>
|
||||
<td>null</td>
|
||||
<td>Element to receive the focus when the dialog gets visible, valid values are "accept" and "reject".</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue