支持开发者刷新插件

This commit is contained in:
muwoo
2021-12-27 11:52:54 +08:00
parent e89cfd049a
commit ab8b616f6a
10 changed files with 54 additions and 6 deletions

View File

@@ -14,6 +14,7 @@
<a-form-item :wrapper-col="{ span: 14, offset: 4 }">
<a-button :loading="loading" type="primary" @click="onSubmit">安装</a-button>
<a-button @click="refresh" style="margin-left: 10px;">刷新插件</a-button>
</a-form-item>
</a-form>
</div>
@@ -50,6 +51,15 @@ const downloadPlugin = async (pluginName) => {
loading.value = false;
};
const refresh = () => {
formRef.value.validate().then(() => {
window.market.refreshPlugin({
name: formState.name,
});
message.success(`${formState.name}刷新成功!`);
});
};
const labelCol = { span: 4 };
const wrapperCol = { span: 14 };
</script>