pub fn write_state<T: Serialize>(entry_id: &str, key: &str, value: &T)
写入挂载时捕获的历史记录,避免卸载后的异步回调覆盖新页面状态。