Skip to content

Commit 5a5fa3b

Browse files
committed
For mobile side response.
1 parent 5acb448 commit 5a5fa3b

File tree

6 files changed

+45
-9
lines changed

6 files changed

+45
-9
lines changed

examples/build/finite.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/build/infinite.js

Lines changed: 4 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/finite/finite.vue

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<div class="scrollToIndex">
44
<span>Scroll to index</span>
55
<input type="text" v-model.number.lazy="startIndex">
6-
<small>Change and blur to set startIndex.</small>
6+
<small>Change and blur to set start index.</small>
77
</div>
88
<VirtualList :size="50" :remain="6" class="list" :start="startIndex">
99
<Item v-for="(udf, index) of items" :index="index" :key="index"></Item>
@@ -45,6 +45,9 @@
4545
border: 1px solid;
4646
border-color: #dddddd;
4747
font-size: 16px;
48+
-webkit-appearance: none;
49+
-moz-appearance: none;
50+
appearance: none;
4851
}
4952
input:focus {
5053
border-color: #6495ed;
@@ -68,5 +71,10 @@
6871
text-decoration: none;
6972
font-weight: 100;
7073
}
74+
@media (max-width: 640px) {
75+
small {
76+
display: none;
77+
}
78+
}
7179
</style>
7280

examples/finite/index.html

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,23 @@
1313
margin: 0 auto;
1414
overflow-y: auto;
1515
}
16-
@media (max-width: 1024px) {
16+
.title {
17+
font-size: 25px;
18+
font-weight: 100;
19+
text-align: center;
20+
}
21+
@media (max-width: 640px) {
1722
.appWraper {
1823
width: 100%;
1924
}
25+
.title {
26+
font-size: 16px;
27+
}
2028
}
2129
</style>
2230
</head>
2331
<body>
24-
<h1 style="font-size: 25px;font-weight: 100;text-align: center;">
32+
<h1 class="title">
2533
Vue virtual list, with 100,000 finite data.
2634
</h1>
2735
<div class="appWraper">

examples/infinite/index.html

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,23 @@
1212
width: 440px;
1313
margin: 0 auto;
1414
}
15+
.title {
16+
font-size: 25px;
17+
font-weight: 100;
18+
text-align: center;
19+
}
1520
@media (max-width: 1024px) {
1621
.appWraper {
1722
width: 100%;
1823
}
24+
.title {
25+
font-size: 16px;
26+
}
1927
}
2028
</style>
2129
</head>
2230
<body>
23-
<h1 style="font-size: 25px;font-weight: 100;text-align: center;">
31+
<h1 class="title">
2432
Vue virtual list, infinite data by requesting 20 each time.
2533
</h1>
2634
<div class="appWraper">

examples/infinite/infinite.vue

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@
1515
<Loading class="list-loading" :loading="loading"></Loading>
1616
</div>
1717
<div class="source">
18-
<a href="https://github.com/tangbc/vue-virtual-scroll-list/blob/master/examples/infinite/infinite.vue#L1">View this demo source code</a>
18+
<a href="https://github.com/tangbc/vue-virtual-scroll-list/blob/master/examples/infinite/infinite.vue#L1">
19+
View this demo source code
20+
</a>
1921
</div>
2022
</div>
2123
</template>
@@ -92,5 +94,13 @@
9294
text-decoration: none;
9395
font-weight: 100;
9496
}
97+
@media (max-width: 640px) {
98+
.times, .count {
99+
display: block;
100+
}
101+
.count {
102+
position: relative;
103+
}
104+
}
95105
</style>
96106

0 commit comments

Comments
 (0)