mirror of
https://github.com/rubickCenter/rubick
synced 2025-12-24 11:31:44 +08:00
✨ 支持开发者刷新插件
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user