- Statistiche
- Menu e Sottomenu - Lista ultimi Movimenti
This commit is contained in:
@@ -92,6 +92,8 @@ export default defineComponent({
|
||||
const visuadd = ref(false)
|
||||
const direzadd = ref(1)
|
||||
|
||||
const selectedClasses = ref(<any>[])
|
||||
|
||||
watch(() => myel.value.order, (value, oldval) => {
|
||||
mounted()
|
||||
})
|
||||
@@ -222,6 +224,11 @@ export default defineComponent({
|
||||
|
||||
if (props.myelem)
|
||||
newtype.value = props.myelem.type
|
||||
|
||||
if (myel.value.class4) {
|
||||
selectedClasses.value = myel.value.class4.split(' ').filter(Boolean)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function clickOnElem() {
|
||||
@@ -237,6 +244,27 @@ export default defineComponent({
|
||||
modifElem()
|
||||
|
||||
|
||||
}
|
||||
|
||||
function dupNewCard() {
|
||||
if (!myel.value.listcards)
|
||||
return
|
||||
|
||||
const myfindcard = myel.value.listcards[tabCard.value]
|
||||
|
||||
if (myfindcard) {
|
||||
let mycard = { ...myfindcard }
|
||||
delete mycard._id
|
||||
mycard._id = objectId()
|
||||
|
||||
const bakcard = [...myel.value.listcards]
|
||||
|
||||
myel.value.listcards = []
|
||||
myel.value.listcards = [...bakcard, mycard]
|
||||
modifElem()
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
function addNewElemText() {
|
||||
@@ -284,7 +312,12 @@ export default defineComponent({
|
||||
if (props.myelem.listcards) {
|
||||
props.myelem.listcards.forEach((rec: IMyCard) => {
|
||||
if (recpass._id === rec._id) {
|
||||
rec.imagefile = myval
|
||||
if (myval.imagefile) {
|
||||
rec.imagefile = myval.imagefile
|
||||
rec.vers_img = tools.getGenerateVersionImage()
|
||||
} else {
|
||||
rec.imagefile = myval
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -292,7 +325,11 @@ export default defineComponent({
|
||||
if (props.myelem.elemsText) {
|
||||
props.myelem.elemsText.forEach((rec: IElemText) => {
|
||||
if (recpass._id === rec._id) {
|
||||
rec.text = myval
|
||||
if (myval.imagefile) {
|
||||
rec.text = myval.imagefile
|
||||
} else {
|
||||
rec.text = myval
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -335,6 +372,11 @@ export default defineComponent({
|
||||
modifElem()
|
||||
}
|
||||
|
||||
function updateSizeHeight(value: any) {
|
||||
myel.value.heightimg = value; // Aggiorna widthimg con il nuovo valore
|
||||
modifElem()
|
||||
}
|
||||
|
||||
function toggleSize() {
|
||||
emit('toggleSize', null)
|
||||
}
|
||||
@@ -402,6 +444,30 @@ export default defineComponent({
|
||||
emit('saveElem', myelem)
|
||||
}
|
||||
|
||||
function classiImmagineOptions() {
|
||||
// Ritorna l'array delle classi, ad esempio:
|
||||
return [
|
||||
{ label: 'Tonda', value: 'image-circle' },
|
||||
{ label: 'Sbordata', value: 'image-round-bordered' },
|
||||
{ label: 'Ombrata', value: 'image-ombra' },
|
||||
// Aggiungi altre classi se necessario
|
||||
];
|
||||
}
|
||||
|
||||
function updateClass4(selectedOptions: any) {
|
||||
|
||||
// Aggiorna selectedClasses
|
||||
selectedClasses.value = selectedOptions;
|
||||
|
||||
if (myel.value) {
|
||||
// Imposta myel.class2 come stringa
|
||||
myel.value.class4 = selectedOptions.join(' '); // Converte l'array in una stringa separata da spazi
|
||||
|
||||
saveElem()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
onMounted(mounted)
|
||||
|
||||
return {
|
||||
@@ -449,6 +515,11 @@ export default defineComponent({
|
||||
orderOptions,
|
||||
addOrder,
|
||||
moveElem,
|
||||
updateSizeHeight,
|
||||
dupNewCard,
|
||||
updateClass4,
|
||||
selectedClasses,
|
||||
classiImmagineOptions,
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
@@ -173,16 +173,20 @@
|
||||
dense
|
||||
style="width: 150px"
|
||||
/>
|
||||
<q-input
|
||||
<q-select
|
||||
label="Altezza:"
|
||||
@update:model-value="modifElem"
|
||||
style="width: 100px"
|
||||
v-model="myel.heightimg"
|
||||
emit-value
|
||||
map-options
|
||||
:options="generateSizeOptions()"
|
||||
use-input
|
||||
use-chips
|
||||
@input="saveElem"
|
||||
filled
|
||||
dense
|
||||
v-on:keyup.enter="saveElem"
|
||||
>
|
||||
</q-input>
|
||||
@new-value="updateSizeHeight"
|
||||
style="width: 150px"
|
||||
/>
|
||||
</div>
|
||||
</q-expansion-item>
|
||||
|
||||
@@ -281,6 +285,42 @@
|
||||
>
|
||||
</CSelectAnimation>
|
||||
</q-expansion-item>
|
||||
<q-expansion-item
|
||||
dense
|
||||
dense-toggle
|
||||
expand-separator
|
||||
label="Banner Iniziale"
|
||||
icon="fas fa-play-circle"
|
||||
>
|
||||
<div>Banner:</div>
|
||||
|
||||
<q-input
|
||||
dense
|
||||
label="Titolo Banner:"
|
||||
@update:model-value="modifElem"
|
||||
v-model="myel.titleBanner"
|
||||
filled
|
||||
v-on:keyup.enter="saveElem"
|
||||
>
|
||||
</q-input>
|
||||
<q-input
|
||||
dense
|
||||
label="Classe Banner:"
|
||||
@update:model-value="modifElem"
|
||||
v-model="myel.classBanner"
|
||||
filled
|
||||
v-on:keyup.enter="saveElem"
|
||||
>
|
||||
</q-input>
|
||||
<CSelectColor
|
||||
v-if="enableEdit"
|
||||
style="min-width: 150px"
|
||||
v-model="myel.color"
|
||||
@update:model-value="modifElem"
|
||||
title="Colore Titolo"
|
||||
>
|
||||
</CSelectColor>
|
||||
</q-expansion-item>
|
||||
<div v-if="myel.type === shared_consts.ELEMTYPE.TEXT">
|
||||
<div v-if="enableEdit">
|
||||
<q-input
|
||||
@@ -302,16 +342,22 @@
|
||||
dense
|
||||
dense-toggle
|
||||
expand-separator
|
||||
label="Animazione"
|
||||
label="Classi per l'Immagine"
|
||||
icon="fas fa-expand-alt"
|
||||
>
|
||||
<CSelectAnimation
|
||||
v-if="enableEdit && showAnimation"
|
||||
v-model="myel.anim2"
|
||||
@update:model-value="modifElem"
|
||||
label="Animazione Immagini"
|
||||
>
|
||||
</CSelectAnimation>
|
||||
<q-select
|
||||
label="Classi:"
|
||||
v-model="selectedClasses"
|
||||
emit-value
|
||||
map-options
|
||||
:options="classiImmagineOptions()"
|
||||
use-chips
|
||||
multiple
|
||||
@update:model-value="updateClass4"
|
||||
filled
|
||||
dense
|
||||
style="width: 350px"
|
||||
/>
|
||||
</q-expansion-item>
|
||||
<div class="row">
|
||||
<q-input
|
||||
@@ -333,6 +379,15 @@
|
||||
@click="addNewCard"
|
||||
>
|
||||
</q-btn>
|
||||
<q-btn
|
||||
rounded
|
||||
dense
|
||||
color="primary"
|
||||
label="Scheda"
|
||||
icon="fas fa-copy"
|
||||
@click="dupNewCard"
|
||||
>
|
||||
</q-btn>
|
||||
|
||||
<q-tabs
|
||||
v-model="tabCard"
|
||||
@@ -346,7 +401,7 @@
|
||||
<q-tab
|
||||
v-for="(rec, ind) in myel.listcards"
|
||||
:key="ind"
|
||||
:name="`card` + ind"
|
||||
:name="ind"
|
||||
:label="`Scheda ` + (ind + 1)"
|
||||
icon="fas fa-pencil-alt"
|
||||
/>
|
||||
@@ -356,11 +411,11 @@
|
||||
<q-tab-panel
|
||||
v-for="(rec, ind) in myel.listcards"
|
||||
:key="ind"
|
||||
:name="`card` + ind"
|
||||
:name="ind"
|
||||
>
|
||||
<div v-if="enableEdit" class="column bordered q-ma-xs">
|
||||
<q-bar class="bg-primary text-white">
|
||||
Card {{ ind + 1 }}
|
||||
Scheda {{ ind + 1 }}
|
||||
<q-space />
|
||||
<q-btn
|
||||
icon="fas fa-trash-alt"
|
||||
@@ -411,6 +466,17 @@
|
||||
v-on:keyup.enter="saveElem"
|
||||
>
|
||||
</q-input>
|
||||
<q-input
|
||||
dense
|
||||
style="min-width: 450px"
|
||||
label="Link:"
|
||||
class="fa-border"
|
||||
@update:model-value="modifElem"
|
||||
v-model="rec.link"
|
||||
filled
|
||||
v-on:keyup.enter="saveElem"
|
||||
>
|
||||
</q-input>
|
||||
<CSelectColor
|
||||
v-if="enableEdit"
|
||||
style="min-width: 150px"
|
||||
@@ -602,15 +668,20 @@
|
||||
style="width: 150px"
|
||||
/>
|
||||
|
||||
<q-input
|
||||
<q-select
|
||||
label="Altezza Logo:"
|
||||
@update:model-value="modifElem"
|
||||
v-model="myel.height"
|
||||
v-model="myel.heightimg"
|
||||
emit-value
|
||||
map-options
|
||||
:options="generateSizeOptions()"
|
||||
use-input
|
||||
use-chips
|
||||
@input="saveElem"
|
||||
filled
|
||||
dense
|
||||
v-on:keyup.enter="saveElem"
|
||||
>
|
||||
</q-input>
|
||||
@new-value="updateSizeHeight"
|
||||
style="width: 150px"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<q-btn
|
||||
@@ -869,27 +940,34 @@
|
||||
>
|
||||
</q-input>
|
||||
<div class="col-12 col-sm-6 col-md-6 col-lg-6 col-xl-6 col-sticky">
|
||||
<q-input
|
||||
dense
|
||||
<q-select
|
||||
label="Lunghezza:"
|
||||
type="number"
|
||||
@update:model-value="modifElem"
|
||||
debounce="1000"
|
||||
v-model="myel.widthimg"
|
||||
emit-value
|
||||
map-options
|
||||
:options="generateSizeOptions()"
|
||||
use-input
|
||||
use-chips
|
||||
@input="saveElem"
|
||||
filled
|
||||
v-on:keyup.enter="saveElem"
|
||||
>
|
||||
</q-input>
|
||||
<q-input
|
||||
dense
|
||||
@new-value="updateSizeWidth"
|
||||
style="width: 150px"
|
||||
/>
|
||||
<q-select
|
||||
label="Altezza:"
|
||||
type="number"
|
||||
@update:model-value="modifElem"
|
||||
debounce="1000"
|
||||
v-model="myel.heightimg"
|
||||
emit-value
|
||||
map-options
|
||||
:options="generateSizeOptions()"
|
||||
use-input
|
||||
use-chips
|
||||
@input="saveElem"
|
||||
filled
|
||||
v-on:keyup.enter="saveElem"
|
||||
>
|
||||
</q-input>
|
||||
dense
|
||||
@new-value="updateSizeHeight"
|
||||
style="width: 150px"
|
||||
/>
|
||||
<q-input
|
||||
dense
|
||||
label="Link:"
|
||||
|
||||
Reference in New Issue
Block a user