Merge pull request #5128 from primefaces/issue-5046

Icon id hydration
pull/5134/head
Tuğçe Küçükoğlu 2024-01-23 16:05:00 +03:00 committed by GitHub
commit f0880cda5a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
28 changed files with 33 additions and 190 deletions

View File

@ -1,7 +1,7 @@
<script>
import BaseComponent from 'primevue/basecomponent';
import BaseIconStyle from 'primevue/baseicon/style';
import { ObjectUtils } from 'primevue/utils';
import { ObjectUtils, UniqueComponentId } from 'primevue/utils';
export default {
name: 'BaseIcon',
@ -17,6 +17,11 @@ export default {
}
},
style: BaseIconStyle,
computed: {
pathId() {
return UniqueComponentId('pv_icon_clip_pv_id_');
}
},
methods: {
pti() {
const isLabelEmpty = ObjectUtils.isEmpty(this.label);

View File

@ -18,15 +18,9 @@
<script>
import BaseIcon from 'primevue/baseicon';
import { UniqueComponentId } from 'primevue/utils';
export default {
name: 'ArrowDownIcon',
extends: BaseIcon,
computed: {
pathId() {
return `pv_icon_clip_${UniqueComponentId()}`;
}
}
extends: BaseIcon
};
</script>

View File

@ -18,15 +18,9 @@
<script>
import BaseIcon from 'primevue/baseicon';
import { UniqueComponentId } from 'primevue/utils';
export default {
name: 'ArrowUpIcon',
extends: BaseIcon,
computed: {
pathId() {
return `pv_icon_clip_${UniqueComponentId()}`;
}
}
extends: BaseIcon
};
</script>

View File

@ -16,15 +16,9 @@
<script>
import BaseIcon from 'primevue/baseicon';
import { UniqueComponentId } from 'primevue/utils';
export default {
name: 'BanIcon',
extends: BaseIcon,
computed: {
pathId() {
return `pv_icon_clip_${UniqueComponentId()}`;
}
}
extends: BaseIcon
};
</script>

View File

@ -24,15 +24,9 @@
<script>
import BaseIcon from 'primevue/baseicon';
import { UniqueComponentId } from 'primevue/utils';
export default {
name: 'ExclamationTriangleIcon',
extends: BaseIcon,
computed: {
pathId() {
return `pv_icon_clip_${UniqueComponentId()}`;
}
}
extends: BaseIcon
};
</script>

View File

@ -18,15 +18,9 @@
<script>
import BaseIcon from 'primevue/baseicon';
import { UniqueComponentId } from 'primevue/utils';
export default {
name: 'EyeSlashIcon',
extends: BaseIcon,
computed: {
pathId() {
return `pv_icon_clip_${UniqueComponentId()}`;
}
}
extends: BaseIcon
};
</script>

View File

@ -16,15 +16,9 @@
<script>
import BaseIcon from 'primevue/baseicon';
import { UniqueComponentId } from 'primevue/utils';
export default {
name: 'FilterIcon',
extends: BaseIcon,
computed: {
pathId() {
return `pv_icon_clip_${UniqueComponentId()}`;
}
}
extends: BaseIcon
};
</script>

View File

@ -18,15 +18,9 @@
<script>
import BaseIcon from 'primevue/baseicon';
import { UniqueComponentId } from 'primevue/utils';
export default {
name: 'FilterSlashIcon',
extends: BaseIcon,
computed: {
pathId() {
return `pv_icon_clip_${UniqueComponentId()}`;
}
}
extends: BaseIcon
};
</script>

View File

@ -18,15 +18,9 @@
<script>
import BaseIcon from 'primevue/baseicon';
import { UniqueComponentId } from 'primevue/utils';
export default {
name: 'InfoCircleIcon',
extends: BaseIcon,
computed: {
pathId() {
return `pv_icon_clip_${UniqueComponentId()}`;
}
}
extends: BaseIcon
};
</script>

View File

@ -16,15 +16,9 @@
<script>
import BaseIcon from 'primevue/baseicon';
import { UniqueComponentId } from 'primevue/utils';
export default {
name: 'PencilIcon',
extends: BaseIcon,
computed: {
pathId() {
return `pv_icon_clip_${UniqueComponentId()}`;
}
}
extends: BaseIcon
};
</script>

View File

@ -16,15 +16,9 @@
<script>
import BaseIcon from 'primevue/baseicon';
import { UniqueComponentId } from 'primevue/utils';
export default {
name: 'PlusIcon',
extends: BaseIcon,
computed: {
pathId() {
return `pv_icon_clip_${UniqueComponentId()}`;
}
}
extends: BaseIcon
};
</script>

View File

@ -18,15 +18,9 @@
<script>
import BaseIcon from 'primevue/baseicon';
import { UniqueComponentId } from 'primevue/utils';
export default {
name: 'RefreshIcon',
extends: BaseIcon,
computed: {
pathId() {
return `pv_icon_clip_${UniqueComponentId()}`;
}
}
extends: BaseIcon
};
</script>

View File

@ -18,15 +18,9 @@
<script>
import BaseIcon from 'primevue/baseicon';
import { UniqueComponentId } from 'primevue/utils';
export default {
name: 'SearchIcon',
extends: BaseIcon,
computed: {
pathId() {
return `pv_icon_clip_${UniqueComponentId()}`;
}
}
extends: BaseIcon
};
</script>

View File

@ -18,15 +18,9 @@
<script>
import BaseIcon from 'primevue/baseicon';
import { UniqueComponentId } from 'primevue/utils';
export default {
name: 'SearchMinusIcon',
extends: BaseIcon,
computed: {
pathId() {
return `pv_icon_clip_${UniqueComponentId()}`;
}
}
extends: BaseIcon
};
</script>

View File

@ -18,15 +18,9 @@
<script>
import BaseIcon from 'primevue/baseicon';
import { UniqueComponentId } from 'primevue/utils';
export default {
name: 'SearchPlusIcon',
extends: BaseIcon,
computed: {
pathId() {
return `pv_icon_clip_${UniqueComponentId()}`;
}
}
extends: BaseIcon
};
</script>

View File

@ -22,15 +22,9 @@
<script>
import BaseIcon from 'primevue/baseicon';
import { UniqueComponentId } from 'primevue/utils';
export default {
name: 'SortAltIcon',
extends: BaseIcon,
computed: {
pathId() {
return `pv_icon_clip_${UniqueComponentId()}`;
}
}
extends: BaseIcon
};
</script>

View File

@ -16,15 +16,9 @@
<script>
import BaseIcon from 'primevue/baseicon';
import { UniqueComponentId } from 'primevue/utils';
export default {
name: 'SortAmountDownIcon',
extends: BaseIcon,
computed: {
pathId() {
return `pv_icon_clip_${UniqueComponentId()}`;
}
}
extends: BaseIcon
};
</script>

View File

@ -16,15 +16,9 @@
<script>
import BaseIcon from 'primevue/baseicon';
import { UniqueComponentId } from 'primevue/utils';
export default {
name: 'SortAmountUpAltIcon',
extends: BaseIcon,
computed: {
pathId() {
return `pv_icon_clip_${UniqueComponentId()}`;
}
}
extends: BaseIcon
};
</script>

View File

@ -16,15 +16,9 @@
<script>
import BaseIcon from 'primevue/baseicon';
import { UniqueComponentId } from 'primevue/utils';
export default {
name: 'SpinnerIcon',
extends: BaseIcon,
computed: {
pathId() {
return `pv_icon_clip_${UniqueComponentId()}`;
}
}
extends: BaseIcon
};
</script>

View File

@ -16,15 +16,9 @@
<script>
import BaseIcon from 'primevue/baseicon';
import { UniqueComponentId } from 'primevue/utils';
export default {
name: 'StarIcon',
extends: BaseIcon,
computed: {
pathId() {
return `pv_icon_clip_${UniqueComponentId()}`;
}
}
extends: BaseIcon
};
</script>

View File

@ -16,15 +16,9 @@
<script>
import BaseIcon from 'primevue/baseicon';
import { UniqueComponentId } from 'primevue/utils';
export default {
name: 'StarFillIcon',
extends: BaseIcon,
computed: {
pathId() {
return `pv_icon_clip_${UniqueComponentId()}`;
}
}
extends: BaseIcon
};
</script>

View File

@ -18,15 +18,9 @@
<script>
import BaseIcon from 'primevue/baseicon';
import { UniqueComponentId } from 'primevue/utils';
export default {
name: 'ThLargeIcon',
extends: BaseIcon,
computed: {
pathId() {
return `pv_icon_clip_${UniqueComponentId()}`;
}
}
extends: BaseIcon
};
</script>

View File

@ -18,15 +18,9 @@
<script>
import BaseIcon from 'primevue/baseicon';
import { UniqueComponentId } from 'primevue/utils';
export default {
name: 'TimesCircleIcon',
extends: BaseIcon,
computed: {
pathId() {
return `pv_icon_clip_${UniqueComponentId()}`;
}
}
extends: BaseIcon
};
</script>

View File

@ -18,15 +18,9 @@
<script>
import BaseIcon from 'primevue/baseicon';
import { UniqueComponentId } from 'primevue/utils';
export default {
name: 'TrashIcon',
extends: BaseIcon,
computed: {
pathId() {
return `pv_icon_clip_${UniqueComponentId()}`;
}
}
extends: BaseIcon
};
</script>

View File

@ -18,15 +18,9 @@
<script>
import BaseIcon from 'primevue/baseicon';
import { UniqueComponentId } from 'primevue/utils';
export default {
name: 'UndoIcon',
extends: BaseIcon,
computed: {
pathId() {
return `pv_icon_clip_${UniqueComponentId()}`;
}
}
extends: BaseIcon
};
</script>

View File

@ -18,15 +18,9 @@
<script>
import BaseIcon from 'primevue/baseicon';
import { UniqueComponentId } from 'primevue/utils';
export default {
name: 'UploadIcon',
extends: BaseIcon,
computed: {
pathId() {
return `pv_icon_clip_${UniqueComponentId()}`;
}
}
extends: BaseIcon
};
</script>

View File

@ -18,15 +18,9 @@
<script>
import BaseIcon from 'primevue/baseicon';
import { UniqueComponentId } from 'primevue/utils';
export default {
name: 'WindowMaximizeIcon',
extends: BaseIcon,
computed: {
pathId() {
return `pv_icon_clip_${UniqueComponentId()}`;
}
}
extends: BaseIcon
};
</script>

View File

@ -18,15 +18,9 @@
<script>
import BaseIcon from 'primevue/baseicon';
import { UniqueComponentId } from 'primevue/utils';
export default {
name: 'WindowMinimizeIcon',
extends: BaseIcon,
computed: {
pathId() {
return `pv_icon_clip_${UniqueComponentId()}`;
}
}
extends: BaseIcon
};
</script>