- Le immagini uploadate non vengono visualizzate subito... cache... aggiungere la versione dell'immagine: vers_img
- Aggiunto il Server TESTRISO e TEST_PCB.
This commit is contained in:
@@ -101,11 +101,6 @@ export default defineComponent({
|
||||
|
||||
}
|
||||
|
||||
function showandsave(value: any) {
|
||||
console.log('EMIT: showandsave')
|
||||
emit('showandsave', value)
|
||||
}
|
||||
|
||||
function getnumimages() {
|
||||
if (gallerylist.value)
|
||||
return gallerylist.value.length
|
||||
@@ -228,19 +223,31 @@ export default defineComponent({
|
||||
|
||||
function uploaded(info: any) {
|
||||
console.log('uploaded', info)
|
||||
|
||||
let vers_img = tools.getGenerateVersionImage()
|
||||
if (gallerylist.value) {
|
||||
console.log('vers_img', vers_img)
|
||||
if (props.single && info.files) {
|
||||
console.log('gallerylist.value[0]', info.files[0].name)
|
||||
gallerylist.value[0] = { imagefile: info.files[0].name }
|
||||
if (info.files[0].name.imagefile) {
|
||||
gallerylist.value[0] = info.files[0].name
|
||||
} else {
|
||||
gallerylist.value[0] = { imagefile: info.files[0].name, vers_img }
|
||||
}
|
||||
|
||||
} else {
|
||||
for (const file of info.files) {
|
||||
gallerylist.value.push({ imagefile: file.name })
|
||||
if (file.name.imagefile) {
|
||||
gallerylist.value.push(file.name)
|
||||
} else {
|
||||
gallerylist.value.push({ imagefile: file.name, vers_img })
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
save()
|
||||
|
||||
console.log('gallerylist', gallerylist.value)
|
||||
console.log('CGALLERY gallerylist', gallerylist.value)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -313,7 +320,7 @@ export default defineComponent({
|
||||
if (!props.single) {
|
||||
emit('showandsave', gallerylist.value)
|
||||
} else {
|
||||
emit('showandsave', gallerylist.value[0].imagefile)
|
||||
emit('showandsave', gallerylist.value[0])
|
||||
}
|
||||
} else {
|
||||
emit('showandsave', !props.single ? [] : '')
|
||||
@@ -331,27 +338,6 @@ export default defineComponent({
|
||||
return props.directory
|
||||
}
|
||||
|
||||
function getsrcimg(gallerylistery: any) {
|
||||
|
||||
if (!gallerylistery.imagefile) {
|
||||
return 'images/noimg.png';
|
||||
}
|
||||
if (gallerylistery) {
|
||||
if (tools.getextfile(gallerylistery.imagefile) === 'pdf')
|
||||
return 'images/images/pdf.jpg'
|
||||
else {
|
||||
if (tools.contieneSlash(gallerylistery.imagefile)) {
|
||||
return gallerylistery.imagefile
|
||||
} else {
|
||||
return costanti.DIR_UPLOAD + getrealdirectory() + '/' + gallerylistery.imagefile
|
||||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
return 'images/noimg.png';
|
||||
}
|
||||
}
|
||||
|
||||
function getParamDir() {
|
||||
return tools.escapeslash(getrealdirectory())
|
||||
}
|
||||
@@ -389,7 +375,6 @@ export default defineComponent({
|
||||
getclimg,
|
||||
copytoclipboard,
|
||||
deleteFile,
|
||||
getsrcimg,
|
||||
tools,
|
||||
uploaded,
|
||||
gallerylist,
|
||||
|
||||
Reference in New Issue
Block a user