CPage sistemata
This commit is contained in:
@@ -254,7 +254,7 @@ export default defineComponent({
|
||||
|
||||
*/
|
||||
|
||||
watch(locale, (val, oldval) => {
|
||||
watch(() => locale, (val, oldval) => {
|
||||
updateFormatters()
|
||||
})
|
||||
|
||||
|
||||
@@ -34,8 +34,8 @@ export default defineComponent({
|
||||
// console.log('myimgint', this.myimgint)
|
||||
}
|
||||
|
||||
watch(
|
||||
imgprofile,
|
||||
watch(() =>
|
||||
imgprofile,
|
||||
// @ts-ignore
|
||||
(value: string, oldValue: string) => {
|
||||
userStore.my.profile.img = value
|
||||
@@ -44,8 +44,10 @@ export default defineComponent({
|
||||
)
|
||||
|
||||
|
||||
watch(
|
||||
myimgvar, (value: string, oldValue: string) => {
|
||||
watch(() =>
|
||||
myimgvar,
|
||||
// @ts-ignore
|
||||
(value: string, oldValue: string) => {
|
||||
myimgint.value = ''
|
||||
refresh()
|
||||
},
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import {
|
||||
defineComponent, onMounted, ref, toRef,
|
||||
defineComponent, onMounted, ref, toRef, watch,
|
||||
} from 'vue'
|
||||
|
||||
import { IMyPage } from '@src/model'
|
||||
@@ -53,9 +53,18 @@ export default defineComponent({
|
||||
const globalStore = useGlobalStore()
|
||||
|
||||
const load = async (): Promise<void> => {
|
||||
if (mypath.value !== '') rec.value = await globalStore.loadPage(mypath.value)
|
||||
// console.log('load', mypath.value)
|
||||
if (mypath.value !== '') rec.value = await globalStore.loadPage('/'+mypath.value)
|
||||
}
|
||||
onMounted(load)
|
||||
|
||||
watch(() => props.mypath, async (to: string, from: string) => {
|
||||
// console.log('load', mypath.value)
|
||||
if (mypath.value !== '') rec.value = await globalStore.loadPage('/'+mypath.value)
|
||||
})
|
||||
|
||||
// onMounted(load)
|
||||
|
||||
load()
|
||||
|
||||
return { rec }
|
||||
},
|
||||
|
||||
@@ -31,7 +31,7 @@ export default defineComponent({
|
||||
return getOperatorByUsername(props.username)
|
||||
})
|
||||
|
||||
watch(showuserdetails, (value: any, old: any) => {
|
||||
watch(() => showuserdetails, (value: any, old: any) => {
|
||||
if (!showuserdetails.value) {
|
||||
globalStore.autoplaydisc = autoplaydiscsaved.value
|
||||
}
|
||||
|
||||
@@ -204,7 +204,7 @@ export default defineComponent({
|
||||
},
|
||||
})
|
||||
|
||||
watch(
|
||||
watch(() =>
|
||||
stateconn,
|
||||
// @ts-ignore
|
||||
(value: string, oldValue: string) => {
|
||||
|
||||
@@ -19,14 +19,16 @@ export default defineComponent({
|
||||
const { setmeta } = MixinMetaTags()
|
||||
|
||||
async function created() {
|
||||
console.log('MyPage created')
|
||||
rec.value = await globalStore.loadPage(route.path)
|
||||
// console.log('MyPage created', rec.value)
|
||||
|
||||
// console.log('mounted', this.rec)
|
||||
}
|
||||
|
||||
watch(path, async (to: string, from: string) => {
|
||||
// console.log('watch path', path)
|
||||
rec.value = await globalStore.loadPage(to)
|
||||
// console.log('path change', rec.value)
|
||||
})
|
||||
|
||||
function meta() {
|
||||
|
||||
@@ -1,42 +1,19 @@
|
||||
<template>
|
||||
<div v-if="isfinishLoading">
|
||||
<div v-if="isfinishLoading && !!rec">
|
||||
<CMyPage
|
||||
:title="rec.title" :imgbackground="`` + rec.imgback"
|
||||
:mypath="rec.path"
|
||||
:sizes="`max-height: ` + rec.heightimg + `px`">
|
||||
<span>{{
|
||||
setmeta({
|
||||
title: rec.title,
|
||||
description: rec.description,
|
||||
keywords: rec.keywords,
|
||||
})
|
||||
}}
|
||||
</span>
|
||||
|
||||
<div class="q-ma-sm q-gutter-sm q-pa-xs">
|
||||
<div v-if="!!rec.img1" class="text-center">
|
||||
<q-img :src="rec.img1" class="img"></q-img>
|
||||
</div>
|
||||
<span>{{
|
||||
setmeta({
|
||||
title: rec.title,
|
||||
description: rec.description,
|
||||
keywords: rec.keywords,
|
||||
})
|
||||
}}
|
||||
</span>
|
||||
|
||||
<div v-if="!!rec.content" v-html="rec.content"></div>
|
||||
<q-video v-if="!!rec.video1" :src="rec.video1" :ratio="rec.ratio1">
|
||||
</q-video>
|
||||
|
||||
<div v-if="!!rec.img2" class="text-center">
|
||||
<q-img :src="rec.img2" class="img"></q-img>
|
||||
</div>
|
||||
|
||||
<div v-if="!!rec.content2" v-html="rec.content2"></div>
|
||||
<q-video v-if="!!rec.video2" :src="rec.video2" :ratio="rec.ratio2"></q-video>
|
||||
|
||||
<div v-if="!!rec.img3" class="text-center">
|
||||
<q-img :src="rec.img2" class="img"></q-img>
|
||||
</div>
|
||||
|
||||
<div v-if="!!rec.content3" v-html="rec.content3"></div>
|
||||
<q-video v-if="!!rec.video3" :src="rec.video3" :ratio="rec.ratio3"></q-video>
|
||||
<div v-if="!!rec.content4" v-html="rec.content4"></div>
|
||||
|
||||
</div>
|
||||
</CMyPage>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user