mirror of
https://github.com/primefaces/primevue.git
synced 2025-05-09 00:42:36 +00:00
Refactor #5257
This commit is contained in:
parent
a9164bdbde
commit
dd84dbbb60
33 changed files with 82 additions and 44 deletions
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<button v-ripple :class="cx('root')" type="button" :aria-label="defaultAriaLabel" :disabled="disabled" v-bind="getPTOptions('root')" :data-pc-severity="severity">
|
||||
<button v-ripple :class="cx('root')" type="button" :aria-label="defaultAriaLabel" :disabled="disabled" v-bind="getPTOptions('root')" :data-p-severity="severity">
|
||||
<slot>
|
||||
<slot v-if="loading" name="loadingicon" :class="[cx('loadingIcon'), cx('icon')]">
|
||||
<span v-if="loadingIcon" :class="[cx('loadingIcon'), cx('icon'), loadingIcon]" v-bind="ptm('loadingIcon')" />
|
||||
|
@ -23,9 +23,12 @@ import BaseButton from './BaseButton.vue';
|
|||
export default {
|
||||
name: 'Button',
|
||||
extends: BaseButton,
|
||||
inheritAttrs: false,
|
||||
methods: {
|
||||
getPTOptions(key) {
|
||||
return this.ptm(key, {
|
||||
const _ptm = key === 'root' ? this.ptmi : this.ptm;
|
||||
|
||||
return _ptm(key, {
|
||||
context: {
|
||||
disabled: this.disabled
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue