@mythpe/quasar-ui-qui 0.1.62 → 0.1.64

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.62",
3
+ "version": "0.1.64",
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"
@@ -151,13 +151,6 @@ defineOptions({
151
151
  }"
152
152
  v-on="listeners"
153
153
  >
154
- <template
155
- v-for="(_,slot) in $slots as Readonly<QInputSlots>"
156
- :key="slot"
157
- #[slot]
158
- >
159
- <slot :name="slot" />
160
- </template>
161
154
  <template
162
155
  v-if="viewMode"
163
156
  #control
@@ -173,6 +166,19 @@ defineOptions({
173
166
  </MInputFieldControl>
174
167
  </slot>
175
168
  </template>
169
+ <template
170
+ v-if="sar && !viewMode"
171
+ #append
172
+ >
173
+ <MSarCol />
174
+ </template>
175
+ <template
176
+ v-for="(_,slot) in $slots as Readonly<QInputSlots>"
177
+ :key="slot"
178
+ #[slot]
179
+ >
180
+ <slot :name="slot" />
181
+ </template>
176
182
  </component>
177
183
  <slot
178
184
  name="help"