Replies: 2 comments 2 replies
-
I'm sorry, I don't understand the question. Reading the code, though, this does not appear to be a valid Rust expression: move || if message.get() {
Some(result_info) => {
view! {
<p>"Receive message: " {format!("{:?}", result_info)}</p>
result_info.result_info.trade_record.iter().enumerate().map(|(idx, _)| {
view! { <li>{idx}</li> }
}).collect_view()
}.into_any()
}
else
// 当 message.get() 为 None 时输出空的 <p></p>
view! { <p></p> }.into_any()
}
} I see And then this is not a valid view! {
<p>"Receive message: " {format!("{:?}", result_info)}</p>
result_info.result_info.trade_record.iter().enumerate().map(|(idx, _)| {
view! { <li>{idx}</li> }
}).collect_view()
}.into_any() should be view! {
<p>"Receive message: " {format!("{:?}", result_info)}</p>
{result_info.result_info.trade_record.iter().enumerate().map(|(idx, _)| {
view! { <li>{idx}</li> }
}).collect_view()}
}.into_any() |
Beta Was this translation helpful? Give feedback.
2 replies
-
view! { "status: " {status}
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Beta Was this translation helpful? Give feedback.
All reactions