文件种子数据
This commit is contained in:
34
Yi.Vue3.x.Vant/src/components/AppUserIcon.vue
Normal file
34
Yi.Vue3.x.Vant/src/components/AppUserIcon.vue
Normal file
@@ -0,0 +1,34 @@
|
||||
<template>
|
||||
<van-image
|
||||
round
|
||||
:width="width"
|
||||
:height="height"
|
||||
:src="url+(src??'0')"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { type } from 'os';
|
||||
import { ref } from 'vue'
|
||||
defineProps<{ src: {type:string,default:'null',required:false},
|
||||
width:{type:string,default:'3rem',required:false},
|
||||
height:{type:string,default:'3rem',required:false},
|
||||
|
||||
}>()
|
||||
const url = `${import.meta.env.VITE_APP_BASE_API}/file/`;
|
||||
</script>
|
||||
<style scoped>
|
||||
.col-body
|
||||
{
|
||||
text-align: center;
|
||||
|
||||
}
|
||||
.col-body .van-icon
|
||||
{
|
||||
margin-bottom: 0.6rem;
|
||||
}
|
||||
p{
|
||||
font-size: large;
|
||||
font-weight:bold;
|
||||
}
|
||||
</style>
|
||||
@@ -10,12 +10,7 @@
|
||||
>
|
||||
<van-row v-for="(item, index) in articleList" :key="index" class="row">
|
||||
<van-col span="4" class="leftCol">
|
||||
<van-image
|
||||
round
|
||||
width="3rem"
|
||||
height="3rem"
|
||||
src="https://fastly.jsdelivr.net/npm/@vant/assets/cat.jpeg"
|
||||
/>
|
||||
<AppUserIcon width="3rem" height="3rem" :src="item.user==null?null:(item.user.icon)"/>
|
||||
</van-col>
|
||||
|
||||
<van-col span="14" class="centerTitle">
|
||||
@@ -77,6 +72,7 @@
|
||||
import { ref, onMounted, reactive, toRefs } from "vue";
|
||||
import { ImagePreview, Toast } from "vant";
|
||||
import AppCreateTime from "@/components/AppCreateTime.vue";
|
||||
import AppUserIcon from "@/components/AppUserIcon.vue";
|
||||
import articleApi from "@/api/articleApi.ts";
|
||||
import { ArticleEntity } from "@/type/interface/ArticleEntity.ts";
|
||||
const VanImagePreview = ImagePreview.Component;
|
||||
@@ -172,7 +168,7 @@ const getList = () => {
|
||||
.rowBody {
|
||||
text-align: left;
|
||||
background-color: white;
|
||||
min-height: 2rem;
|
||||
|
||||
margin-top: 1rem;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
@@ -9,12 +9,7 @@
|
||||
|
||||
<van-row class="bodyRow">
|
||||
<van-col span="6" class="leftCol">
|
||||
<van-image
|
||||
round
|
||||
width="4rem"
|
||||
height="4rem"
|
||||
src="https://fastly.jsdelivr.net/npm/@vant/assets/cat.jpeg"
|
||||
/>
|
||||
<AppUserIcon width="4rem" height="4rem" :src="user.icon"></AppUserIcon>
|
||||
</van-col>
|
||||
<van-col span="12" class="title"><span>{{user.nick}}</span></van-col>
|
||||
<van-col span="6" class="subtitle"
|
||||
@@ -100,6 +95,7 @@ import { ref } from "vue";
|
||||
import { Dialog } from "vant";
|
||||
import useUserStore from "@/store/modules/user";
|
||||
import { storeToRefs } from 'pinia';
|
||||
import AppUserIcon from "@/components/AppUserIcon.vue";
|
||||
const show = ref<boolean>(false);
|
||||
let data1: AppGridData = {
|
||||
head: "个人中心",
|
||||
|
||||
Reference in New Issue
Block a user