|
@@ -22,6 +22,7 @@ import { ref, watch } from 'vue'
|
|
|
import { ElMessage } from 'element-plus'
|
|
import { ElMessage } from 'element-plus'
|
|
|
import { getPluginConfigApi, savePluginConfigApi } from '@/api/plugin'
|
|
import { getPluginConfigApi, savePluginConfigApi } from '@/api/plugin'
|
|
|
import {useUserStore} from "@/store/user.js";
|
|
import {useUserStore} from "@/store/user.js";
|
|
|
|
|
+import formCreate from '@form-create/element-ui'
|
|
|
|
|
|
|
|
const userStore = useUserStore()
|
|
const userStore = useUserStore()
|
|
|
const props = defineProps({
|
|
const props = defineProps({
|
|
@@ -55,15 +56,11 @@ const configOptions = ref({
|
|
|
} finally {
|
|
} finally {
|
|
|
loading.value = false
|
|
loading.value = false
|
|
|
}
|
|
}
|
|
|
- },
|
|
|
|
|
- beforeFetch: (options) => {
|
|
|
|
|
- options.headers = {
|
|
|
|
|
- Authorization: `Bearer ${userStore.token}`
|
|
|
|
|
- };
|
|
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
const loadConfig = async () => {
|
|
const loadConfig = async () => {
|
|
|
|
|
+ formCreate.setData('API_TOKEN', userStore.token)
|
|
|
try {
|
|
try {
|
|
|
let { data } = await getPluginConfigApi(props.pluginId)
|
|
let { data } = await getPluginConfigApi(props.pluginId)
|
|
|
|
|
|