Skip to content

Commit

Permalink
fix(plugin): fix can not show the no-config plugin ui
Browse files Browse the repository at this point in the history
  • Loading branch information
ysfscream authored and Kinplemelon committed Aug 27, 2024
1 parent 4b4e2da commit 49969ab
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 11 deletions.
1 change: 1 addition & 0 deletions src/views/Plugins/PluginDetail.vue
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
:plugin-name="pluginName"
:plugin-version="pluginVersion"
:plugin-with-config="pluginWithConfig"
:is-detail-loading="isDetailLoading"
/>
</el-card>
</el-tab-pane>
Expand Down
33 changes: 22 additions & 11 deletions src/views/Plugins/components/PluginManage.vue
Original file line number Diff line number Diff line change
@@ -1,16 +1,22 @@
<template>
<div class="plugin-manage">
<plugin-form-kit
v-if="uiConfigs"
:data="record"
:layouts="uiConfigs"
:save-func="handleSubmit"
@saved="fetchPluginConfigs(pluginName, pluginVersion)"
/>
<template v-else>
<el-skeleton v-if="schemaLoading" :rows="6" animated />
<div v-else-if="!schemaLoading">{{ $t('Plugins.noPluginConfig') }}</div>
</template>
<el-skeleton v-if="isDetailLoading" :rows="6" animated />
<div v-else-if="!isDetailLoading && pluginWithConfig">
<plugin-form-kit
v-if="uiConfigs"
:data="record"
:layouts="uiConfigs"
:save-func="handleSubmit"
@saved="fetchPluginConfigs(pluginName, pluginVersion)"
/>
<template v-else>
<el-skeleton v-if="schemaLoading" :rows="6" animated />
<div v-else>{{ $t('Plugins.noPluginConfig') }}</div>
</template>
</div>
<div v-else-if="!isDetailLoading && !pluginWithConfig">
{{ $t('Plugins.noPluginConfig') }}
</div>
</div>
</template>

Expand All @@ -30,6 +36,11 @@ const props = defineProps({
},
pluginWithConfig: {
type: Boolean,
default: false,
},
isDetailLoading: {
type: Boolean,
default: false,
},
})
Expand Down

0 comments on commit 49969ab

Please sign in to comment.