1
0
mirror of https://github.com/ialley-workshop-open/uni-halo.git synced 2026-09-12 16:40:40 +08:00
Files
uni-halo/src/components/uh-plugin-unavailable/uh-plugin-unavailable.vue
T
小莫唐尼 02fa9e4294 refactor: 重构项目页面与组件,优化整体结构与体验
1.  重构分类页面路由与实现,替换旧分类详情页为文章列表页
2.  统一使用自定义导航栏,替换原有原生导航配置
3.  重构加载状态管理,统一使用useDataLoadingStatus hook
4.  优化插件可用性检查逻辑与组件展示
5.  调整数据加载占位与空状态样式
6.  优化文章卡片样式与交互,新增分类跳转功能
7.  重构设置页枚举选择弹窗,使用wd-picker替换自定义实现
8.  删除废弃的IPluginAvailable类型与相关代码
2026-09-04 20:31:46 +08:00

58 lines
1.4 KiB
Vue

<script lang="ts" setup>
import { computed } from 'vue'
import { NeedPlugins } from '@/hooks/usePluginAvailable'
const props = withDefaults(defineProps<{
pluginId : string
errorText ?: string
checking : boolean
}>(), {
errorText: '',
})
const emit = defineEmits<{
(e : 'on-refresh') : void
}>()
/** 插件信息(未在清单中时兜底) */
const pluginInfo = computed(() => {
const info = NeedPlugins.get(props.pluginId)
return info || {
id: props.pluginId,
name: props.name,
desc: '',
url: '',
}
})
function handleRefresh() {
if (props.checking) { return }
emit('on-refresh')
}
</script>
<template>
<view v-if="pluginInfo" class="mx-auto my-auto box-border flex flex-col items-center justify-center gap-6 text-sm">
<wd-icon class-prefix="uhemoji-icon" name="-cry" size="160rpx"></wd-icon>
<view class="box-border text-lg text-gray-900 font-bold">
{{ pluginInfo.name }}
</view>
<view v-if="errorText" class=" text-yellow-500 text-sm">
{{ errorText }}
</view>
<view class="w-full flex flex-col gap-y-4">
<uh-button custom-class="!rounded-full py-2 !uh-shadow-xs" @click="handleRefresh()">
{{props.checking?'正在刷新':'刷新试试'}}
</uh-button>
<!-- #ifdef MP-WEIXIN -->
<uh-button custom-class="bg-white py-2 !rounded-full" open-type="contact">
提交反馈
</uh-button>
<!-- #endif -->
</view>
</view>
</template>