feat:使用van-image组件替换img标签

This commit is contained in:
talktao 2022-03-25 10:53:02 +08:00
parent d58ea4ef24
commit cbb8395c6d
2 changed files with 7 additions and 4 deletions

View File

@ -2,6 +2,8 @@
import { computed } from 'vue'
import { useStore } from 'vuex'
import logo from '@/assets/logo.png'
const store = useStore()
const userName = computed(() => store.state.userNmae)
@ -18,10 +20,10 @@
<div class="wrapper">
<div class="list flex-center py-8 flex-column">
<span class="logo">
<img width="150" src="@/assets/logo.png" />
<van-image width="150" :src="logo" />
</span>
<span class="logo fs-1 py-3 opacity-75">VUE3 H5开发模板</span>
<span class="fs-5 py-3 opacity-75">
<span class="fs-6 py-3 opacity-75">
项目地址
<a href="https://github.com/talktao/Vue3-Vite-Vant-TS-H5">https://github.com/talktao/Vue3-Vite-Vant-TS-H5</a>
</span>

View File

@ -1,6 +1,7 @@
<script setup lang="ts">
import { computed, reactive, ref, toRefs } from 'vue'
import { useRoute, useRouter } from 'vue-router'
import logo from '@/assets/logo.png'
const useShowList = () => {
const state = reactive({
@ -40,7 +41,7 @@
<CustomHeader title="首页" />
<div class="py-3 px-3">
<div class="title py-2 flex-start align-items-center">
<img width="36" src="@/assets/logo.png" />
<van-image width="36" :src="logo" />
<span class="fs-1 px-5">Vue3+TS H5开发模板</span>
</div>
<div class="subTitle px-3 fs-3 opacity-50">