<script setup lang="ts">
import {ref} from 'vue'
import {useRoute} from 'vue-router'
import PluginConfigForm from './PluginConfigForm.vue';

const route = useRoute()
const pluginId = ref('system') // 默认值为 system

// 立即获取路由参数，而不是在 onMounted 中获取
if (route.query.plugin_id) {
  pluginId.value = route.query.plugin_id as string
}

// 监听路由参数变化，确保参数变化时更新插件ID
const unwatch = () => {
} // placeholder
</script>

<template>
  <plugin-config-form :plugin-id="pluginId"/>
</template>

<style scoped lang="scss">
</style>