CPage sistemata

This commit is contained in:
Paolo Arena
2021-10-03 15:09:17 +02:00
parent d0bfd3c33f
commit df4b4825e8
7 changed files with 34 additions and 44 deletions

View File

@@ -254,7 +254,7 @@ export default defineComponent({
*/
watch(locale, (val, oldval) => {
watch(() => locale, (val, oldval) => {
updateFormatters()
})

View File

@@ -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()
},

View File

@@ -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 }
},

View File

@@ -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
}

View File

@@ -204,7 +204,7 @@ export default defineComponent({
},
})
watch(
watch(() =>
stateconn,
// @ts-ignore
(value: string, oldValue: string) => {