tantee-nuxt-commons 0.0.171 → 0.0.173
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/dist/module.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script lang="ts" setup>
|
|
2
|
-
import { ref, watch } from 'vue'
|
|
2
|
+
import { ref, watch,computed } from 'vue'
|
|
3
3
|
import { isEqual } from 'lodash-es'
|
|
4
4
|
import { useAlert } from '../../../composables/alert'
|
|
5
5
|
import { useAssetFile, type Base64Image, type Base64Asset, type Base64File} from '../../../composables/assetFile'
|
|
@@ -230,58 +230,65 @@ defineExpose({
|
|
|
230
230
|
<template>
|
|
231
231
|
<v-input v-model="images" v-bind="$attrs" ref="inputRef">
|
|
232
232
|
<template #default="{ isReadonly, isDisabled }">
|
|
233
|
-
<
|
|
234
|
-
<
|
|
235
|
-
<
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
v-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
<
|
|
259
|
-
<
|
|
260
|
-
<
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
233
|
+
<v-container fluid>
|
|
234
|
+
<v-row>
|
|
235
|
+
<v-col class="pa-0">
|
|
236
|
+
<VCard>
|
|
237
|
+
<VToolbar density="compact">
|
|
238
|
+
<VToolbarTitle>{{ label }}</VToolbarTitle>
|
|
239
|
+
<v-spacer />
|
|
240
|
+
<VToolbarItems v-if="!readonly">
|
|
241
|
+
<FileBtn
|
|
242
|
+
v-model="uploadImages"
|
|
243
|
+
:accept="accept"
|
|
244
|
+
color="primary"
|
|
245
|
+
icon="mdi:mdi-image-plus"
|
|
246
|
+
icon-only
|
|
247
|
+
multiple
|
|
248
|
+
variant="text"
|
|
249
|
+
@update:model-value="uploadImageFile"
|
|
250
|
+
:disabled="isDisabled?.value" :readonly="isReadonly?.value"
|
|
251
|
+
/>
|
|
252
|
+
<v-btn color="primary" icon @click="dialog = true" :disabled="isDisabled?.value" :readonly="isReadonly?.value">
|
|
253
|
+
<v-icon>mdi mdi-camera-plus</v-icon>
|
|
254
|
+
</v-btn>
|
|
255
|
+
</VToolbarItems>
|
|
256
|
+
</VToolbar>
|
|
257
|
+
|
|
258
|
+
<VCardText>
|
|
259
|
+
<VRow dense justify="start">
|
|
260
|
+
<VCol v-for="(image, index) in images" :key="`${imageKey(image)}-${index}`" cols="4">
|
|
261
|
+
<VCard>
|
|
262
|
+
<VToolbar density="compact">
|
|
263
|
+
<VToolbarTitle>
|
|
264
|
+
{{ image.imageTitle }}
|
|
265
|
+
</VToolbarTitle>
|
|
266
|
+
<VSpacer />
|
|
267
|
+
<VToolbarItems v-if="!readonly">
|
|
268
|
+
<v-btn icon @click="remove(index)" :disabled="isDisabled?.value" :readonly="isReadonly?.value">
|
|
269
|
+
<v-icon>mdi mdi-delete-outline</v-icon>
|
|
270
|
+
</v-btn>
|
|
271
|
+
<v-btn color="primary" icon @click="setDataUpdate(image)" v-if="!image.imageData?.id" :disabled="isDisabled?.value" :readonly="isReadonly?.value">
|
|
272
|
+
<v-icon>mdi mdi-image-edit-outline</v-icon>
|
|
273
|
+
</v-btn>
|
|
274
|
+
</VToolbarItems>
|
|
275
|
+
</VToolbar>
|
|
276
|
+
|
|
277
|
+
<v-img
|
|
278
|
+
:src="imageSrcFromImageData(image)"
|
|
279
|
+
height="250"
|
|
280
|
+
@click="() => { (props.readonly || image.imageData?.id || isReadonly?.value) ? openImageFullScreen(image) : setDataUpdate(image) }"
|
|
281
|
+
:disabled="isDisabled?.value"
|
|
282
|
+
/>
|
|
283
|
+
</VCard>
|
|
284
|
+
</VCol>
|
|
285
|
+
</VRow>
|
|
286
|
+
</VCardText>
|
|
287
|
+
</VCard>
|
|
288
|
+
</v-col>
|
|
289
|
+
</v-row>
|
|
290
|
+
</v-container>
|
|
291
|
+
|
|
285
292
|
|
|
286
293
|
<!-- Edit dialog -->
|
|
287
294
|
<VDialog v-model="dialogUpdate" fullscreen transition="dialog-bottom-transition">
|