Taro 小程序开发大型实战(二):多页面跳转和 Taro UI 组件库 | 图雀社区
pftom opened this issue · comments
Tom Huang commented
https://tuture.co/2019/12/29/af69225/
在上一篇教程中,我们用熟悉的 React 和 Hooks 搞定了“奥特曼俱乐部”的雏形。在这一篇文章中,我们将用 Taro 自带的路由功能实现多页面跳转,并用 Taro UI 组件库升级之前略显简陋的界面。
Deleted user commented
浮动按钮也可以用逻辑运算符 &&来做隐藏显示
{!isOpened && (
<View className='post-button'>
<AtFab onClick={() => setIsOpened(true)}>
<Text className='at-fab__icon at-icon at-icon-edit'></Text>
</AtFab>
</View> )
}
twoheart commented
https://github.com/tuture-dev/ultra-club/blob/f6c79ab99d/src/pages/post/post.scss
post 页面的样式错了,这里的内容是 mine 页面的样式……
Tom Huang commented
@twoheartliu 这里 post 的样式不起作用哦,只是当时复制了一下
twoheart commented
@pftom
@twoheartliu 这里 post 的样式不起作用哦,只是当时复制了一下
好的,感谢回复!写的很好,会继续跟下去的
Tom Huang commented
@twoheartliu 加油!
twoheart commented
const router = useRouter();
const { params } = router;
const { title, content } = params;
现在使用 useRouter 得到的参数,如果是中文会是乱码的,类似 %E6%B3%B0%E7%BD%97%E5%A5%A5%E7%89%B9%E6%9B%BC 这样的,网上搜了一圈使用了 decodeURL(title) 这样的方式进行转码
当前版本是:taro 3.0.15
Tom Huang commented
@twoheartliu 👍🏻👍🏻