vue
文章平均质量分 76
赵玉玲
只有不断接触新的东西生活才有趣味
展开
-
代码规范-提交时检查
工具: husky:Husky improves your commits and more woof! You can use it to lint your commit messages, run tests, lint code, etc… when you commit or push. Husky supports all Git hooks. husky可以让你方便的使用各种git hooks lint-staged:This project contains a script that原创 2022-03-02 20:36:17 · 470 阅读 · 0 评论 -
setTimeout in vue methods(this与vue视图更新)
先来看一段代码 <template> <div @click="fn">test{{obj}}</div> </template> <script> export default { data() { return { obj:{} } }, methods: { ...原创 2019-10-15 17:09:01 · 471 阅读 · 0 评论 -
vue-router:hash与history
结论 实现原理: hash利用hash改变时的onhashchange事件 history利用window.history在H5中新增的特性:onpopstate事件以及pushState()、replaceState()方法 由实现原理引发的特性 url: hsah方式实现的前端路由中有#字符,history实现的就是一个正常的url 页面刷新时的额外配置: 页面刷新时,由于http请求不包含h...原创 2018-12-17 11:51:56 · 992 阅读 · 0 评论