Skip to content

Commit b13440a

Browse files
committed
Update example
1 parent a6d8a5c commit b13440a

File tree

5 files changed

+18
-7
lines changed

5 files changed

+18
-7
lines changed

example/src/common/const.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
// config and constants.
22

3-
export const TOTAL_COUNT = 10000
4-
53
export const TAB_TYPE = {
64
VIEW: 1,
75
CODE: 2

example/src/views/dynamic-size/Main.vue

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
<template>
22
<div class="example">
33
<github-corner />
4-
<introduction description="The size of each item is dynamic, you don't have to care about size, it will calculate automatic, but you have to make sure that there's an unique id for every array data." />
4+
<introduction
5+
description="The size of each item is dynamic,
6+
you don't have to care about size, it will calculate automatic,
7+
but you have to make sure that there's an unique id for every array data."
8+
/>
59

610
<div class="example-content">
711
<tab v-on:tab-change="onTabChange" />
@@ -30,7 +34,9 @@ import Code from './Code'
3034
import { Random } from '../../common/mock'
3135
import getSentences from '../../common/sentences'
3236
import genUniqueId from '../../common/gen-unique-id'
33-
import { TOTAL_COUNT, TAB_TYPE, DEFAULT_TAB } from '../../common/const'
37+
import { TAB_TYPE, DEFAULT_TAB } from '../../common/const'
38+
39+
const TOTAL_COUNT = 10000
3440
3541
const DataItems = []
3642
let count = TOTAL_COUNT
@@ -53,6 +59,7 @@ export default {
5359
5460
data () {
5561
return {
62+
total: TOTAL_COUNT.toLocaleString(),
5663
items: DataItems,
5764
itemComponent: Item,
5865
isShowView: DEFAULT_TAB === TAB_TYPE.VIEW

example/src/views/fixed-size/Main.vue

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,9 @@ import Code from './Code'
2929
3030
import { Random } from '../../common/mock'
3131
import genUniqueId from '../../common/gen-unique-id'
32-
import { TOTAL_COUNT, TAB_TYPE, DEFAULT_TAB } from '../../common/const'
32+
import { TAB_TYPE, DEFAULT_TAB } from '../../common/const'
33+
34+
const TOTAL_COUNT = 10000
3335
3436
const DataItems = []
3537
let count = TOTAL_COUNT
@@ -51,6 +53,7 @@ export default {
5153
5254
data () {
5355
return {
56+
total: TOTAL_COUNT.toLocaleString(),
5457
items: DataItems,
5558
itemComponent: Item,
5659
isShowView: DEFAULT_TAB === TAB_TYPE.VIEW

example/src/views/horizontal/Main.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,9 @@ import Code from './Code'
3131
3232
import { Random } from '../../common/mock'
3333
import genUniqueId from '../../common/gen-unique-id'
34-
import { TOTAL_COUNT, TAB_TYPE, DEFAULT_TAB } from '../../common/const'
34+
import { TAB_TYPE, DEFAULT_TAB } from '../../common/const'
3535
36+
const TOTAL_COUNT = 10000
3637
const sizes = [60, 80, 100, 150, 180]
3738
3839
const DataItems = []

example/src/views/keep-state/Main.vue

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,9 @@ import Code from './Code'
3131
3232
import { Random } from '../../common/mock'
3333
import genUniqueId from '../../common/gen-unique-id'
34-
import { TOTAL_COUNT, TAB_TYPE, DEFAULT_TAB } from '../../common/const'
34+
import { TAB_TYPE, DEFAULT_TAB } from '../../common/const'
35+
36+
const TOTAL_COUNT = 1000
3537
3638
const DataItems = []
3739
let count = TOTAL_COUNT

0 commit comments

Comments
 (0)