Operation processes on invoices
This commit is contained in:
@@ -7,8 +7,17 @@ const props = defineProps({
|
||||
name: { type: String, required: true },
|
||||
})
|
||||
|
||||
if (SolidIcons[`fa${props.name.charAt(0).toUpperCase()}${props.name.slice(1)}`]) {
|
||||
library.add(SolidIcons[`fa${props.name.charAt(0).toUpperCase()}${props.name.slice(1)}`])
|
||||
function toPascalCase(str) {
|
||||
return str
|
||||
.split('-')
|
||||
.map(part => part.charAt(0).toUpperCase() + part.slice(1))
|
||||
.join('')
|
||||
}
|
||||
|
||||
const iconName = `fa${toPascalCase(props.name)}`
|
||||
|
||||
if (SolidIcons[iconName]) {
|
||||
library.add(SolidIcons[iconName])
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user