mirror of
https://github.com/jxxghp/MoviePilot-Frontend.git
synced 2026-06-22 08:03:45 +08:00
更新插件组件文档,调整多个组件以支持关闭功能,增强用户交互体验,并修正配置示例以反映最新的代码结构和依赖关系。
This commit is contained in:
@@ -99,6 +99,7 @@
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn color="secondary" variant="outlined" @click="resetForm">重置</v-btn>
|
||||
<v-btn color="primary" :disabled="!isFormValid" @click="saveConfig" :loading="saving">保存配置</v-btn>
|
||||
<v-btn color="primary" @click="notifyClose">关闭</v-btn>
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
</div>
|
||||
@@ -113,6 +114,10 @@ const props = defineProps({
|
||||
type: Object,
|
||||
default: () => ({}),
|
||||
},
|
||||
api: {
|
||||
type: any,
|
||||
default: () => {},
|
||||
},
|
||||
})
|
||||
|
||||
// 表单状态
|
||||
@@ -162,7 +167,7 @@ onMounted(() => {
|
||||
})
|
||||
|
||||
// 自定义事件,用于保存配置
|
||||
const emit = defineEmits(['save'])
|
||||
const emit = defineEmits(['save', 'close', 'switch'])
|
||||
|
||||
// 保存配置
|
||||
async function saveConfig() {
|
||||
@@ -198,6 +203,11 @@ function resetForm() {
|
||||
form.value.resetValidation()
|
||||
}
|
||||
}
|
||||
|
||||
// 通知主应用关闭组件
|
||||
function notifyClose() {
|
||||
emit('close')
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
Reference in New Issue
Block a user