Yi Liu's blog

Archives · All

Home

About

Archives

loading..
ReactJavaScriptiScroll前端

关于iScroll和React结合的可行性方案

前言这两天试了下React和iScroll结合的事情,坑还是挺多的。注意这里说的是原版的iScroll5而非魔改版的react-iscroll。网上查了下关于这个的讨论不多,但有两个人做成功的案例。不料实操的时候问题还是多多,例如关于AMD报错的问题无人提及,外网上查了一圈也没什么人讨论这个。 AMD报错首先第一步导入iScroll就会出现问题:import iScroll from ‘./lib/iscroll’; 导入后React会报错,提示iScroll.js里面最后两行有个define is not defined。这是关于异步amd的错误,研究一阵后发觉这个并不是我想要的东西,随即仔细看了下这一段的语法,且抱着试试的心态将iScroll中最后一段(2162行-2168行)修改为如下: if ( ..

Read more
loading..
hexo语法

记一些Hexo的命令行语法

发布新的文章 hexo n 文章标题 本地预览 随后在localhost:4000访问hexo s 生成并部署到github hexo g 或 hexo generatehexo d 或 hexo deploy Hexo是如何与Github连接起来的? 打开站点主目录下的_config.yml文件 翻到最后deploy的部分 修改站点信息: 随后安装git部署插件即可完成绑定npm install hexo-deployer-git –save

Read more

Hello World

Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any problems when using Hexo, you can find the answer in troubleshooting or you can ask me on GitHub. Quick StartCreate a new post1$ hexo new "My New Post" More info: Writing Run server1$ hexo server More info: Server Generate static files1$ hexo genera..

Read more