Closed xiusin closed 1 year ago
window.get_big_index().then((data) => { state.data = data })
// block fn get_big_index(event_id &char, raw_args &char, mut app App) { mut data := app.api.big_index() or { return } app.w.result(event_id, .value, json.encode(data)) } // no block, but the frontend also won't receive the response data. fn get_big_index(event_id &char, raw_args &char, mut app App) { spawn fn [mut app, event_id] () { mut data := app.api.big_index() or { return } app.w.result(event_id, .value, json.encode(data)) }() }
I'm sorry for posting a garbage question. After reviewing the cases, I realized that it was my own fault.
No worries.
I am glad you found a solution :+1: .
vue
vlang