Карточка пользователя

This commit is contained in:
iriska-gri committed 2024-01-23 09:53:49 +03:00
1 parent a6e43d4cd0
commit 20eccbf800
1 file changed
+84 -31
+84 -31
View File
@@ -1,31 +1,85 @@
<template>
<v-dialog
v-model="mydialog"
persistent
width="600">
<v-card
height="350">
<v-card-text>
dfd
</v-card-text>
<v-divider/>
<v-card-actions class="align-self-end pt-0 ">
<v-btn
color="modal_btn"
variant="text"
@click= "$emit('update:opendialog', value)"
>
Закрыть
</v-btn>
</v-card-actions>
</v-card>
v-model="mydialog"
persistent
width="600"
class="mx-auto"
>
<v-card height="440">
<v-card-title class="pl-6">
Информация
</v-card-title>
<v-divider/>
<v-card-text>
<v-row
no-gutters
class="flex-grow-0"
>
<v-col lg=4>
<v-img
cover
min-height="180px"
max-height="180px"
:src="checkremote(`${spravURL}${userlinks.login}.jpg`)"
/>
</v-col>
<v-col class="d-flex flex-column">
<v-row
no-gutters
class="flex-grow-0 mx-3 my-1"
v-for="n in basicInformation()"
:key="n"
>
<v-col>
<span class="font-weight-medium">
{{n.title}}
</span>
<br/>
<span class="text-subtitle-1">
{{n.info}}
</span>
</v-col>
</v-row>
</v-col>
</v-row>
</v-card-text>
<v-divider/>
<v-card-text class="d-flex flex-column py-2">
<v-row
no-gutters
class="flex-grow-0"
v-for="n in subInformation()"
:key="n"
>
<v-col>
<span class="font-weight-medium">
{{n.title}}
</span>
<span class="text-subtitle-1">
{{n.info}}
</span>
</v-col>
</v-row>
</v-card-text>
<v-divider/>
<v-card-actions class="align-self-end pt-0">
<v-btn
color="modal_btn"
variant="text"
@click= "$emit('update:opendialog', value)"
>
Закрыть
</v-btn>
</v-card-actions>
</v-card>
</v-dialog>
</template>
<script>
import { ref, computed, watch } from 'vue'
import { axiosApiInstance } from '@/utils/axios-api'
import {checkremote} from '@/utils/universal_functions'
import { spravURL } from '@/utils/axios-api'
export default {
props: {
@@ -42,11 +96,10 @@ export default {
setup (props, {emit}) {
const userlinks = ref([])
const infouser = () => {
axiosApiInstance.get('api/accounts/getuser/?userlogin='+props.loging).then(res => {
userlinks.value=res.data
console.log(userlinks.value.fio);
})}
const mydialog = computed({
@@ -54,7 +107,6 @@ export default {
set: (value) => emit('update:opendialog', value)
})
watch(()=>props.opendialog,(newValue,oldValue)=>{
if(newValue){
infouser()
@@ -74,14 +126,15 @@ export default {
{title: 'Логин: ', info: userlinks.value.login},
]
return {
mydialog,
userlinks,
infouser
}
return {
mydialog,
userlinks,
infouser,
spravURL,
checkremote,
basicInformation,
subInformation
}
}
}
</script>