Pannello Utente
Aggiornamento Yarn
This commit is contained in:
0
src/components/CKeyAndValue/CKeyAndValue.scss
Executable file
0
src/components/CKeyAndValue/CKeyAndValue.scss
Executable file
55
src/components/CKeyAndValue/CKeyAndValue.ts
Executable file
55
src/components/CKeyAndValue/CKeyAndValue.ts
Executable file
@@ -0,0 +1,55 @@
|
||||
import { defineComponent, onMounted, PropType, ref, watch } from 'vue'
|
||||
import { useQuasar } from 'quasar'
|
||||
import { useI18n } from '@/boot/i18n'
|
||||
import { useGlobalStore } from '@store/globalStore'
|
||||
import { fieldsTable } from '@store/Modules/fieldsTable'
|
||||
import { tools } from '@store/Modules/tools'
|
||||
import { costanti } from '@costanti'
|
||||
import { CDateTime } from '@/components/CDateTime'
|
||||
|
||||
|
||||
export default defineComponent({
|
||||
name: 'CKeyAndValue',
|
||||
props: {
|
||||
mykey: {
|
||||
type: String,
|
||||
required: true,
|
||||
},
|
||||
myvalue: {
|
||||
type: String,
|
||||
required: false,
|
||||
default: '',
|
||||
},
|
||||
mydate: {
|
||||
type: Date,
|
||||
required: false,
|
||||
default: null,
|
||||
},
|
||||
color: {
|
||||
type: String,
|
||||
required: false,
|
||||
default: '',
|
||||
},
|
||||
},
|
||||
components: { CDateTime },
|
||||
setup(props, { emit }) {
|
||||
const $q = useQuasar()
|
||||
const { t } = useI18n()
|
||||
const globalStore = useGlobalStore()
|
||||
|
||||
|
||||
function mounted() {
|
||||
//
|
||||
}
|
||||
|
||||
onMounted(mounted)
|
||||
|
||||
return {
|
||||
tools,
|
||||
costanti,
|
||||
fieldsTable,
|
||||
globalStore,
|
||||
}
|
||||
},
|
||||
})
|
||||
|
||||
38
src/components/CKeyAndValue/CKeyAndValue.vue
Executable file
38
src/components/CKeyAndValue/CKeyAndValue.vue
Executable file
@@ -0,0 +1,38 @@
|
||||
<template>
|
||||
<div class="text-center">
|
||||
<div class="row items-center justify-center q-gutter-md q-ma-xs">
|
||||
|
||||
<div class="q-ma-xs">
|
||||
<q-field rounded outlined bg-color="blue-1" dense style="min-width:110px;">
|
||||
<template v-slot:control>
|
||||
<div class="centermydiv">
|
||||
<div class="self-center full-width no-outline text-center" tabindex="0">{{ mykey }}</div>
|
||||
</div>
|
||||
</template>
|
||||
</q-field>
|
||||
</div>
|
||||
|
||||
<div :class="` q-ma-sm q-pa-sm col-grow `">
|
||||
<span :style="color ? `background-color: ${color} !important; color: white;` : ``">
|
||||
<span v-if="mydate">
|
||||
<CDateTime
|
||||
v-model:value="mydate"
|
||||
:canEdit="false">
|
||||
</CDateTime>
|
||||
</span>
|
||||
<span v-else>
|
||||
{{myvalue}}
|
||||
</span>
|
||||
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" src="./CKeyAndValue.ts">
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import './CKeyAndValue.scss';
|
||||
</style>
|
||||
1
src/components/CKeyAndValue/index.ts
Executable file
1
src/components/CKeyAndValue/index.ts
Executable file
@@ -0,0 +1 @@
|
||||
export {default as CKeyAndValue} from './CKeyAndValue.vue'
|
||||
Reference in New Issue
Block a user