FILTRO CITTA Sopra ogni pagina !
This commit is contained in:
@@ -1,9 +1,11 @@
|
||||
import { computed, defineComponent, onMounted, PropType, ref } from 'vue'
|
||||
import { computed, provide, defineComponent, onMounted, PropType, ref } from 'vue'
|
||||
import { costanti } from '@costanti'
|
||||
import { tools } from '@store/Modules/tools'
|
||||
import { CBarSelection } from '../CBarSelection'
|
||||
|
||||
export default defineComponent({
|
||||
name: 'CTitlePage',
|
||||
components: {CBarSelection},
|
||||
props: {
|
||||
ind: {
|
||||
type: Number,
|
||||
@@ -23,18 +25,21 @@ export default defineComponent({
|
||||
required: false
|
||||
},
|
||||
},
|
||||
setup(props) {
|
||||
setup(props, { emit }) {
|
||||
|
||||
const mytitle = ref('')
|
||||
const myicon = ref('')
|
||||
const mycolor = ref('')
|
||||
|
||||
const table = ref('myhosps')
|
||||
|
||||
function mount() {
|
||||
if (props.ind === -1) {
|
||||
mytitle.value = props.title!
|
||||
myicon.value = props.icon!
|
||||
mycolor.value = props.color!
|
||||
} else {
|
||||
table.value = costanti.MAINCARDS[props.ind].table
|
||||
mytitle.value = costanti.MAINCARDS[props.ind].title
|
||||
myicon.value = costanti.MAINCARDS[props.ind].icon
|
||||
mycolor.value = tools.colourNameToHex(costanti.MAINCARDS[props.ind].color)
|
||||
@@ -47,6 +52,7 @@ export default defineComponent({
|
||||
mytitle,
|
||||
myicon,
|
||||
mycolor,
|
||||
table,
|
||||
}
|
||||
},
|
||||
})
|
||||
|
||||
@@ -1,14 +1,29 @@
|
||||
<template>
|
||||
<q-banner
|
||||
rounded
|
||||
dense
|
||||
class="text-white"
|
||||
:style="`text-align: center; background-color: ${mycolor}`">
|
||||
<template v-slot:avatar>
|
||||
<q-icon :name="myicon" size="xs" />
|
||||
</template>
|
||||
<span class="mybanner">{{mytitle}}</span>
|
||||
</q-banner>
|
||||
<div v-if="!table">
|
||||
<q-banner
|
||||
rounded
|
||||
dense
|
||||
class="text-white row"
|
||||
:style="`text-align: center; background-color: ${mycolor}`"
|
||||
>
|
||||
<template v-if="!table" v-slot:avatar>
|
||||
<q-icon :name="myicon" size="xs" />
|
||||
</template>
|
||||
<span v-if="!table" class="mybanner">{{ mytitle }}</span>
|
||||
</q-banner>
|
||||
</div>
|
||||
<div
|
||||
v-else
|
||||
>
|
||||
<CBarSelection
|
||||
:myicon="myicon"
|
||||
:mytitle="mytitle"
|
||||
:mycolor="mycolor"
|
||||
:prop_search="false"
|
||||
:table="table"
|
||||
>
|
||||
</CBarSelection>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" src="./CTitlePage.ts">
|
||||
|
||||
Reference in New Issue
Block a user