@mythpe/quasar-ui-qui 0.1.61 → 0.1.63

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": "@mythpe/quasar-ui-qui",
3
- "version": "0.1.61",
3
+ "version": "0.1.63",
4
4
  "description": "MyTh Quasar UI Kit App Extension",
5
5
  "author": {
6
6
  "name": "MyTh Ahmed Faiz",
@@ -139,14 +139,19 @@ const isFile = computed(() => {
139
139
  }
140
140
  return modelValue.value instanceof File && modelValue.value?.type.slice(0, 6) !== 'image/'
141
141
  })
142
- const getFileType = computed(() => (type: string) => {
142
+ // const getFileType = computed(() => (type: string) => {
143
+ // if (modelValue.value instanceof File) {
144
+ // return modelValue.value?.type.slice(0, type.length) === type || modelValue.value?.type.slice(-1 * type.length) === type
145
+ // }
146
+ // return url.value?.slice(-1 * type.length) === type
147
+ // })
148
+ const isImage = computed(() => {
149
+ const type = 'image/'
143
150
  if (modelValue.value instanceof File) {
144
151
  return modelValue.value?.type.slice(0, type.length) === type || modelValue.value?.type.slice(-1 * type.length) === type
145
152
  }
146
- return url.value?.slice(-1 * type.length) === type
153
+ return !1
147
154
  })
148
- const isImage = computed(() => getFileType.value('image/'))
149
- // const isPdf = computed(() => getFileType.value('pdf'))
150
155
  const isFileNotImage = computed(() => hasSrc.value && !isImage.value)
151
156
  const getAvatarText = computed<string | undefined>(() => props.avatarText ? props.avatarText.slice(0, 1).toUpperCase() : undefined)
152
157
  const loadingSrc = ref(!1)
@@ -269,7 +274,7 @@ defineOptions({
269
274
  <q-avatar
270
275
  v-else
271
276
  :color="errorMessage ? 'negative' : ((!isLoaded || !hasSrc || isFile || isFileNotImage) ? emptyColor : undefined)"
272
- :icon="isFileNotImage ? 'o_description' : undefined"
277
+ :icon="isFileNotImage && !url ? 'o_description' : undefined"
273
278
  :rounded="rounded"
274
279
  :size="size"
275
280
  text-color="white"