立诚勿怠,格物致知
It's all about connecting the dots

JavaScript 第7页

VueJS项目实践总结

说起来,从最初用客户端vue.js,到后面用vue-cli使用的Vue1 + webpack模版,再到后面使用Vue2+webpack,用这个框架做SPA应用也有一年半的时间了。做一些总结吧,想到哪里写哪里(针对Vue2 + webpack)。 一、页面按需加载 这主要是为了加快首屏加载速度。这样做的好处是第一屏所需加载的文件大小变小了,代价是如果用户会走完整个SPA的话,实际的总代码下载量是变多了的。按需加载页面主要就是修改/src/router/index.js文件,示例代码如下:

阅读(4604)评论(2)赞(0)

Vue-Router 2: Uncaught RangeError: Maximum call stack size exceeded

I was quickly establishing the basic structure of my new project at that time, and so there were many details I ignored. When I found the above error information, I was shocked. WTF is it? After some attempts, I found the problem is that there were some Vuejs component named "RouterView" which has inside them, and that was the cause. After I renamed their router component to names other than "RouterView", the above error information disappeared.

阅读(3323)去评论赞(0)

Stack built with Javascript

栈是一种遵从后进先出(LIFO,last-in-first-out)原则的有序集合。新添加的活待删除的元素都保存在栈的末尾,称作栈顶,另一端就叫栈底。在栈里,新元素都靠近栈顶,旧元素都接近栈底。

阅读(1813)去评论赞(0)

jQuery Mobile: Dialog Widget

作用:打开一个交互式弹层。 注意:dialog组件在jQuery Mobile 1.4.0中已经不提倡使用了,并且会在1.5.0版本中移除。 想使用dialog组件的效果的话,请参考jQuery Mobile框架的page组件(page组件...

阅读(1796)去评论赞(0)

jQuery Mobile: Collapsible Widget

一、基本信息 描述:创建可折叠内容块。 1.1、可折叠内容 要创建一个可折叠内容块,需要创建一个带data-role=”collapsible”的容器。你可以通过data-content-theme来设定可折叠内容的...

阅读(2554)去评论赞(0)

登录

找回密码

注册