fix plugin ui

This commit is contained in:
jxxghp
2023-08-19 17:46:28 +08:00
parent 68b9822aac
commit 943c009ac6
2 changed files with 10 additions and 2 deletions
+5 -1
View File
@@ -16,6 +16,9 @@ const emit = defineEmits(['install'])
// 提示框 // 提示框
const $toast = useToast() const $toast = useToast()
// 图片是否加载完成
const isImageLoaded = ref(false)
// 安装插件 // 安装插件
async function installPlugin() { async function installPlugin() {
try { try {
@@ -51,12 +54,13 @@ async function installPlugin() {
> >
<VAvatar <VAvatar
size="128" size="128"
class="shadow" :class="{ shadow: isImageLoaded }"
> >
<VImg <VImg
:src="`/plugin/${props.plugin?.plugin_icon}`" :src="`/plugin/${props.plugin?.plugin_icon}`"
aspect-ratio="4/3" aspect-ratio="4/3"
cover cover
@load="isImageLoaded = true"
/> />
</VAvatar> </VAvatar>
</div> </div>
+5 -1
View File
@@ -37,6 +37,9 @@ const pluginInfoDialog = ref(false)
// 插件详情页面配置项 // 插件详情页面配置项
let pluginPageItems = reactive([]) let pluginPageItems = reactive([])
// 图片是否加载完成
const isImageLoaded = ref(false)
// 调用API卸载插件 // 调用API卸载插件
async function uninstallPlugin() { async function uninstallPlugin() {
try { try {
@@ -184,12 +187,13 @@ const dropdownItems = ref([
</div> </div>
<VAvatar <VAvatar
size="128" size="128"
class="shadow" :class="{ shadow: isImageLoaded }"
> >
<VImg <VImg
:src="`/plugin/${props.plugin?.plugin_icon}`" :src="`/plugin/${props.plugin?.plugin_icon}`"
aspect-ratio="4/3" aspect-ratio="4/3"
cover cover
:class="{ shadow: isImageLoaded }"
/> />
</VAvatar> </VAvatar>
</div> </div>