We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see ourdocumentation.
There was an error while loading.Please reload this page.
1 parent74c86ab commit5192c70Copy full SHA for 5192c70
falco.config.js
@@ -9,5 +9,6 @@ if (NODE_ENV === 'docs') {
9
module.exports={
10
registry:'https://registry.npm.taobao.org',
11
mode:NODE_ENV ?'production' :'development',
12
+esModules:false,
13
output,
14
}
index.sample.html
@@ -99,6 +99,5 @@
99
</div>
100
101
<divid="loader"><div></div></div>
102
-<scriptnomodulesrc="https://cdnjs.cloudflare.com/ajax/libs/babel-polyfill/7.2.5/polyfill.min.js"></script>
103
</body>
104
</html>
src/helper/mobile.js
@@ -0,0 +1 @@
1
+exportdefault()=>!!('ontouchstart'inwindow)
src/index.js
@@ -8,6 +8,7 @@ import Obeserver from './observer'
8
import{switchToHome,switchToPost}from'./switch'
importsleepfrom'./switch/sleep'
importScrollerfrom'./scroller'
+importisMobilefrom'./helper/mobile'
consttopBar=document.querySelector('#bar')
constmirror={
@@ -88,9 +89,12 @@ mirror.getPosts = async function getPosts(type, { cursor, e }) {
88
89
90
mirror.getPost=asyncfunctiongetPost(number){
91
document.title='loading'
-topBar.style.width=0
92
scroller.stop(0)
93
94
+if(!isMobile()){
95
+topBar.style.width=0
96
+}
97
+
98
letpost=this.issue[number]
if(post){
@@ -166,6 +170,10 @@ router.init = (route) => {
166
170
$('.home').addClass('page-current')
167
171
scroller.start(document.querySelector('.home'))
168
172
173
174
+if(isMobile()){
175
+$('.page').addClass('scroll')
176
169
177
178
179
observer.watch({
src/scroller/index.js
@@ -1,5 +1,6 @@
importVirtualScrollfrom'virtual-scroll'// eslint-disable-line import/no-unresolved
2
importraffrom'raf'// eslint-disable-line import/no-unresolved
3
+importisMobilefrom'../helper/mobile'
4
5
raf.polyfill()
6
@@ -13,6 +14,10 @@ export default class extends VirtualScroll {
15
16
start(ele){
17
18
+return
19
20
21
[this.child]=ele.children
22
this.el=ele
23
this.on((e)=>{
@@ -29,6 +34,10 @@ export default class extends VirtualScroll {
29
34
30
35
31
36
stop(y){
37
38
39
40
32
41
this.lastScrollY=this.scrollY
33
42
this.el=window
43
this.off()
src/style/transition.less
@@ -8,6 +8,10 @@
height:100%;
overflow:hidden;
+.page.scroll {
+overflow-y:scroll;
+-webkit-overflow-scrolling:touch;
.page-current {
z-index:1;