@policystudio/policy-studio-ui-vue 1.1.90-beta.32 → 1.1.90-beta.34

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@policystudio/policy-studio-ui-vue",
3
- "version": "1.1.90-beta.32",
3
+ "version": "1.1.90-beta.34",
4
4
  "description": "Policy Studio UI",
5
5
  "author": "Policy Studio Team",
6
6
  "scripts": {
@@ -112,7 +112,6 @@ const imageLoadError = ref(false)
112
112
  const emit = defineEmits(['click'])
113
113
 
114
114
  const getIconType = computed(() => {
115
- if (imageLoadError.value || !finishedImageLoad.value) return 'material-icons'
116
115
  if (props.type) return props.type
117
116
  if (!props.icon?.includes('/')) return 'material-icons'
118
117
  if (!props.icon?.includes('.svg')) return 'url'
@@ -128,13 +127,9 @@ const getIcon = computed(() => {
128
127
 
129
128
  const getIconClasses = computed(() => {
130
129
  if (props.iconClasses) return props.iconClasses
131
- return `${props.color}`
130
+ return props.color ? `${props.color}` : ''
132
131
  })
133
132
 
134
- // const getHeight = computed(() => {
135
- // return props.height
136
- // })
137
-
138
133
  const getColor = computed(() => {
139
134
  if (getIconType.value === 'material-icons') return props.color
140
135
  return tailwindConfig.theme.colors[props.color.replace('psui-text-', '')] || tailwindConfig.theme.colors[props.color]
@@ -152,14 +147,16 @@ onMounted(() => {
152
147
  })
153
148
 
154
149
  const loadImage = () => {
155
- finishedImageLoad.value = false
156
- imageLoadError.value = false
157
- imageLoader({ imageUrl: props.icon, returnsBase64: false })
150
+ if(getIconType.value != 'material-icons') {
151
+ finishedImageLoad.value = false
152
+ imageLoadError.value = false
153
+ imageLoader({ imageUrl: props.icon, returnsBase64: false })
158
154
  .then(() => {
159
155
  finishedImageLoad.value = true
160
156
  })
161
157
  .catch(() => {
162
158
  imageLoadError.value = true
163
159
  })
160
+ }
164
161
  }
165
162
  </script>