feat: 新增数据池 hook

This commit is contained in:
奔跑的面条
2022-11-15 21:25:35 +08:00
parent 8c089b800a
commit 48f00e44f6
8 changed files with 143 additions and 15 deletions
@@ -125,7 +125,7 @@ const sendHandle = async () => {
if (!targetData.value?.request) return
loading.value = true
try {
const res = await customizeHttp(toRaw(targetData.value.request), toRaw(chartEditStore.requestGlobalConfig))
const res = await customizeHttp(toRaw(targetData.value.request), toRaw(chartEditStore.getRequestGlobalConfig))
loading.value = false
if (res) {
if(!res?.data && !targetData.value.filter) window['$message'].warning('您的数据不符合默认格式,请配置过滤器!')
@@ -128,7 +128,7 @@ const sourceData = ref<any>('')
// 动态获取数据
const fetchTargetData = async () => {
try {
const res = await customizeHttp(toRaw(targetData.value.request), toRaw(chartEditStore.requestGlobalConfig))
const res = await customizeHttp(toRaw(targetData.value.request), toRaw(chartEditStore.getRequestGlobalConfig))
if (res) {
sourceData.value = res
return