mirror of
https://github.com/primefaces/primevue.git
synced 2025-05-11 01:42:34 +00:00
Refactor #5046
This commit is contained in:
parent
19cd180575
commit
6ccebe113b
28 changed files with 30 additions and 174 deletions
|
@ -6,11 +6,6 @@ import { ObjectUtils, UniqueComponentId } from 'primevue/utils';
|
|||
export default {
|
||||
name: 'BaseIcon',
|
||||
extends: BaseComponent,
|
||||
data() {
|
||||
return {
|
||||
id: this.$attrs.id
|
||||
};
|
||||
},
|
||||
props: {
|
||||
label: {
|
||||
type: String,
|
||||
|
@ -22,12 +17,9 @@ export default {
|
|||
}
|
||||
},
|
||||
style: BaseIconStyle,
|
||||
mounted() {
|
||||
this.id = this.id || UniqueComponentId();
|
||||
},
|
||||
watch: {
|
||||
'$attrs.id': function (newValue) {
|
||||
this.id = newValue || UniqueComponentId();
|
||||
computed: {
|
||||
pathId() {
|
||||
return UniqueComponentId('pv_icon_clip_pv_id_');
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
@ -43,7 +35,6 @@ export default {
|
|||
}
|
||||
]
|
||||
}),
|
||||
id: this.id,
|
||||
role: !isLabelEmpty ? 'img' : undefined,
|
||||
'aria-label': !isLabelEmpty ? this.label : undefined,
|
||||
'aria-hidden': isLabelEmpty
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue