Last 12 weeks · 0 commits
1 of 6 standards met
Repository: vuejs/vue2-ssr-docs. Description: Vue.js Server-Side Rendering Guide (for Vue 2) Stars: 567, Forks: 231. Open PRs: 24, open issues: 36. Last activity: 2y ago. Community health: 25%. Top contributors: hello-lizhihua, yyx990803, ChangJoo-Park, kazupon, dependabot[bot], Jinjiang, Alex-Sokolov, MachinisteWeb, chikathreesix, sotayamashita and others.
https://ssr.vuejs.org/zh/guide/data.html#%E5%AE%A2%E6%88%B7%E7%AB%AF%E6%95%B0%E6%8D%AE%E9%A2%84%E5%8F%96-client-data-fetching // 我们只关心非预渲染的组件 // 所以我们对比它们,找出两个匹配列表的差异组件 let diffed = false const activated = matched.filter((c, i) => { return diffed (diffed = (prevMatched[i] !== c)) }) 其中这段代码的含义似乎是找到第一个变更的组件后返回其自身以及后续所有组件。 为什么要这样筛选而不是只筛选出存在差异的组件呢。