Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
因为在考虑 SSR 的事情,所以进行了这个 PR。
基本原理是先让 Waterfall 组件先将列表元素渲染出来,待到客户端再渲染。这样可以使得搜索引擎爬虫可以爬取瀑布流数据。
唯一的改动是修改 dom.js。为了适应不同浏览器, dom.js 采用创造元素并判断方法来确定 transform 是否可用。但是在服务端,document 是不可用的。为此,简单的想法是每次使用前 catch,如果不存在说明位于非客户端,返回默认值。
此外,在 READ.md 添加了在 Nuxt 使用的方法,测试可行,但是存在污染全局 Vue 的风险,因为这相当于全局注入。