Web Editor home made

This commit is contained in:
Surya Paolo
2022-11-17 08:10:43 +01:00
parent 711f1b515d
commit 495abc33be
77 changed files with 1742 additions and 1771 deletions

View File

@@ -1,21 +1,54 @@
import { defineComponent, ref, onMounted, watch, computed } from 'vue'
import {
defineComponent, ref, computed,
} from 'vue'
import { useGlobalStore } from '@store/globalStore'
import { useRoute } from 'vue-router'
import { useUserStore } from '@store/UserStore'
import { tools } from '@src/store/Modules/tools'
import { CSkill } from '@/components/CSkill'
import { CChartMap } from '@src/components/CChartMap'
import { CMapsEsempio } from '@src/components/CMapsEsempio'
import { static_data } from '@src/db/static_data'
import { toolsext } from '@src/store/Modules/toolsext'
import { CMyPageElem } from '@components'
import MixinBase from '@src/mixins/mixin-base'
import MixinMetaTags from '@/mixins/mixin-metatags'
import { useMeta } from 'quasar'
import { useI18n } from '@src/boot/i18n'
export default defineComponent({
name: 'Home',
components: { CSkill, CChartMap, CMapsEsempio },
components: { CMyPageElem },
setup() {
const userStore = useUserStore()
const globalStore = useGlobalStore()
const { t } = useI18n()
const isfinishLoading = computed(() => globalStore.finishLoading)
const { getMeta } = MixinMetaTags()
const { setValDb, getValDb } = MixinBase()
function inizia() {
if (globalStore.site) {
useMeta(getMeta({
title: globalStore.site.name,
description: globalStore.site.description,
keywords: globalStore.site.keywords,
}, t))
}
}
inizia()
return {
tools,
toolsext,
static_data,
getValDb,
globalStore,
isfinishLoading,
}
},
})

View File

@@ -1,23 +1,9 @@
<template>
<q-page class="">
<h1>Inizio:</h1>
<CSkill>
</CSkill>
<!--<CChartMap
title="Mappa"
subtitle="cartina..."
serie1="Serie 1"
>
</CChartMap>-->
<!--<CMapsEsempio></CMapsEsempio>-->
</q-page>
<div v-if="isfinishLoading">
<CMyPageElem title="Home" mypath="home">
</CMyPageElem>
</div>
</template>
<script lang="ts" src="./home.ts">
</script>

View File

@@ -19,14 +19,14 @@ export default defineComponent({
const { setmeta } = MixinMetaTags()
async function created() {
rec.value = await globalStore.loadPage(route.path)
rec.value = await globalStore.loadPage(route.path, 'mypage.ts')
// console.log('MyPage created', rec.value)
// console.log('mounted', this.rec)
}
watch(path, async (to: string, from: string) => {
// console.log('watch path', path)
console.log('watch path', to, from)
rec.value = await globalStore.loadPage(to)
// console.log('path change', rec.value)
})