mirror of
https://gitee.com/dromara/go-view.git
synced 2024-12-02 11:48:36 +08:00
style: 优化写法
This commit is contained in:
parent
de681dbcd4
commit
a6194b8fa9
@ -76,10 +76,11 @@ export const useChartDataFetch = (
|
|||||||
if (res) {
|
if (res) {
|
||||||
try {
|
try {
|
||||||
const filter = targetComponent.filter
|
const filter = targetComponent.filter
|
||||||
echartsUpdateHandle(newFunctionHandle(res?.data, res, filter))
|
const { data } = res
|
||||||
|
echartsUpdateHandle(newFunctionHandle(data, res, filter))
|
||||||
// 更新回调函数
|
// 更新回调函数
|
||||||
if (updateCallback) {
|
if (updateCallback) {
|
||||||
updateCallback(newFunctionHandle(res?.data, res, filter))
|
updateCallback(newFunctionHandle(data, res, filter))
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error(error)
|
console.error(error)
|
||||||
|
@ -130,8 +130,9 @@ const sendHandle = async () => {
|
|||||||
const res = await customizeHttp(toRaw(targetData.value.request), toRaw(chartEditStore.getRequestGlobalConfig))
|
const res = await customizeHttp(toRaw(targetData.value.request), toRaw(chartEditStore.getRequestGlobalConfig))
|
||||||
loading.value = false
|
loading.value = false
|
||||||
if (res) {
|
if (res) {
|
||||||
if (!res?.data && !targetData.value.filter) window['$message'].warning('您的数据不符合默认格式,请配置过滤器!')
|
const { data } = res
|
||||||
targetData.value.option.dataset = newFunctionHandle(res?.data, res, targetData.value.filter)
|
if (!data && !targetData.value.filter) window['$message'].warning('您的数据不符合默认格式,请配置过滤器!')
|
||||||
|
targetData.value.option.dataset = newFunctionHandle(data, res, targetData.value.filter)
|
||||||
showMatching.value = true
|
showMatching.value = true
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user