Skip to content

Commit 03ccf54

Browse files
committed
Update demos.
1 parent e6dc48d commit 03ccf54

20 files changed

+7171
-171
lines changed

.gitignore

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,2 @@
11
node_modules
2-
npm-debug.log
3-
demo/build.js
4-
demo/build.js.map
2+
npm-debug.log

demo/build/finite.js

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

demo/build/finite.js.map

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

demo/build/infinite.js

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

demo/build/infinite.js.map

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

demo/common.css

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
.title {
2+
font-size: 25px;
3+
font-weight: 100;
4+
text-align: center;
5+
}
6+
.appWraper {
7+
width: 440px;
8+
position: absolute;
9+
left: 50%;
10+
margin-left: -220px;
11+
overflow-y: auto;
12+
box-shadow: 4px 6px 20px #e6e6e6;
13+
}

demo/demo.vue

Lines changed: 0 additions & 49 deletions
This file was deleted.

demo/finite/finite.vue

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<template>
2+
<div>
3+
<VirtualList
4+
:size="40"
5+
:remain="8"
6+
>
7+
<Item v-for="(udf, index) of items" :index="index" :key="index" />
8+
</VirtualList>
9+
</div>
10+
</template>
11+
12+
<script>
13+
import Item from '../item.vue';
14+
import VirtualList from 'virtual-list';
15+
16+
export default {
17+
name: 'finite-test',
18+
19+
components: { Item, VirtualList },
20+
21+
data () {
22+
return {
23+
items: new Array(100000)
24+
}
25+
}
26+
}
27+
</script>
28+
29+
<style scoped>
30+
.virtual-list {
31+
border-radius: 3px;
32+
border: 1px solid #ddd;
33+
}
34+
</style>
35+

demo/finite/index.html

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<!DOCTYPE html>
2+
<html lang="en-US">
3+
<head>
4+
<meta charset="utf-8">
5+
<title>Vue virtual list (finite data)</title>
6+
<meta name="viewport" content="width=device-width, initial-scale=1">
7+
<link rel="stylesheet" type="text/css" href="../common.css">
8+
</head>
9+
<body>
10+
<h1 class="title">Vue virtual list, with 10,0000 finite data.</h1>
11+
<div class="appWraper">
12+
<div id="app"></div>
13+
</div>
14+
<script src="../build/finite.js"></script>
15+
</body>
16+
</html>

demo/finite/index.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import Vue from 'vue';
2+
import FiniteDemo from './finite.vue';
3+
4+
new Vue({
5+
el: '#app',
6+
template: '<FiniteDemo />',
7+
components: { FiniteDemo }
8+
});

0 commit comments

Comments
 (0)