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

View File

@@ -16,6 +16,9 @@ const emit = defineEmits(['install'])
// 提示框
const $toast = useToast()
// 图片是否加载完成
const isImageLoaded = ref(false)
// 安装插件
async function installPlugin() {
try {
@@ -51,12 +54,13 @@ async function installPlugin() {
>
<VAvatar
size="128"
class="shadow"
:class="{ shadow: isImageLoaded }"
>
<VImg
:src="`/plugin/${props.plugin?.plugin_icon}`"
aspect-ratio="4/3"
cover
@load="isImageLoaded = true"
/>
</VAvatar>
</div>

View File

@@ -37,6 +37,9 @@ const pluginInfoDialog = ref(false)
// 插件详情页面配置项
let pluginPageItems = reactive([])
// 图片是否加载完成
const isImageLoaded = ref(false)
// 调用API卸载插件
async function uninstallPlugin() {
try {
@@ -184,12 +187,13 @@ const dropdownItems = ref([
</div>
<VAvatar
size="128"
class="shadow"
:class="{ shadow: isImageLoaded }"
>
<VImg
:src="`/plugin/${props.plugin?.plugin_icon}`"
aspect-ratio="4/3"
cover
:class="{ shadow: isImageLoaded }"
/>
</VAvatar>
</div>