- Aggiunta della copertina iniziale nelle raccolte (Catalogo Generale).
- Corretto altezza delle immagini che erano stretchate. - Fix: poter spostare l'ordinamento dei libri corretto.
This commit is contained in:
@@ -9,6 +9,7 @@ import { CMyPage } from '@src/components/CMyPage'
|
||||
import { tools } from '@tools'
|
||||
import { useGlobalStore } from '@store/globalStore'
|
||||
import { costanti } from '@costanti'
|
||||
import { shared_consts } from 'app/src/common/shared_vuejs';
|
||||
|
||||
export default defineComponent({
|
||||
name: 'CGallery',
|
||||
@@ -41,6 +42,11 @@ export default defineComponent({
|
||||
required: false,
|
||||
default: '',
|
||||
},
|
||||
filetype: {
|
||||
type: Number,
|
||||
required: false,
|
||||
default: shared_consts.FILETYPE.IMG,
|
||||
},
|
||||
quality: {
|
||||
type: String,
|
||||
required: false,
|
||||
@@ -384,6 +390,33 @@ export default defineComponent({
|
||||
message: 'La Dimensione massima dell\'immagine è di 2 MB'
|
||||
})
|
||||
}
|
||||
|
||||
function getFileTypeStr() {
|
||||
let tipo = ''
|
||||
if (props.filetype === shared_consts.FILETYPE.IMG)
|
||||
tipo = 'Immagine'
|
||||
else if (props.filetype === shared_consts.FILETYPE.PDF)
|
||||
tipo = 'PDF'
|
||||
|
||||
return tipo
|
||||
}
|
||||
function getAccept() {
|
||||
let tipo = ''
|
||||
if (props.filetype === shared_consts.FILETYPE.IMG)
|
||||
tipo = 'image/*'
|
||||
else if (props.filetype === shared_consts.FILETYPE.PDF)
|
||||
tipo = 'application/pdf'
|
||||
|
||||
return tipo
|
||||
}
|
||||
|
||||
function isPDF() {
|
||||
return props.filetype === shared_consts.FILETYPE.PDF
|
||||
}
|
||||
function isIMG() {
|
||||
return props.filetype === shared_consts.FILETYPE.IMG
|
||||
}
|
||||
|
||||
onMounted(created)
|
||||
|
||||
return {
|
||||
@@ -415,6 +448,11 @@ export default defineComponent({
|
||||
costanti,
|
||||
getrealdirectory,
|
||||
uploadOptions,
|
||||
getFileTypeStr,
|
||||
getAccept,
|
||||
shared_consts,
|
||||
isIMG,
|
||||
isPDF,
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user