Skip to content

Commit f550a9d

Browse files
committed
chore: update docs
1 parent 26c084e commit f550a9d

28 files changed

+159
-350
lines changed

.github/workflows/deploy.yml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,6 @@ on:
77
branches:
88
- main
99

10-
defaults:
11-
run:
12-
working-directory: ./docs
13-
1410
permissions:
1511
contents: write
1612

@@ -37,10 +33,11 @@ jobs:
3733

3834
- name: Build with VitePress
3935
run: |
40-
npm run build
36+
npm run core:update
37+
npm run docs:build
4138
ls
4239
4340
- name: Deploy Github Pages
4441
uses: JamesIves/github-pages-deploy-action@v4
4542
with:
46-
folder: docs/dist
43+
folder: docs/.vuepress/dist

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,7 @@ yarn-error.log*
1515
# lock files
1616
package-lock.json
1717
yarn.lock
18+
19+
# vuepress
20+
.temp
21+
docs/*/dist

docs/.gitignore

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

docs/.vitepress/config.js

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

docs/.vitepress/theme/index.js

Lines changed: 0 additions & 14 deletions
This file was deleted.
Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,11 @@
2020
</template>
2121

2222
<script>
23-
import { reactive, toRefs } from 'vue';
2423
import { getPageData } from '../public/sentence';
2524
export default {
26-
setup() {
27-
const data = reactive({
28-
list: getPageData(100, 0),
29-
});
30-
25+
data() {
3126
return {
32-
...toRefs(data),
27+
list: getPageData(1000, 0),
3328
};
3429
},
3530
};
Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -41,18 +41,13 @@
4141
</template>
4242

4343
<script>
44-
import { reactive, toRefs } from 'vue';
4544
import { getPageData } from '../public/sentence';
4645
export default {
47-
setup() {
48-
const data = reactive({
49-
list1: getPageData(100, 0),
50-
list2: getPageData(100, 0),
51-
group: { name: 'group', pull: true, put: true },
52-
});
53-
46+
data() {
5447
return {
55-
...toRefs(data),
48+
list1: getPageData(1000, 0),
49+
list2: getPageData(1000, 0),
50+
group: { name: 'group', pull: true, put: true },
5651
};
5752
},
5853
};
Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,11 @@
2222
</template>
2323

2424
<script>
25-
import { reactive, toRefs } from 'vue';
2625
import { getPageData } from '../public/sentence';
2726
export default {
28-
setup() {
29-
const data = reactive({
30-
list: getPageData(100, 0),
31-
});
32-
27+
data() {
3328
return {
34-
...toRefs(data),
29+
list: getPageData(1000, 0),
3530
};
3631
},
3732
};
Lines changed: 11 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -26,27 +26,22 @@
2626
</template>
2727

2828
<script>
29-
import { reactive, toRefs, ref } from 'vue';
3029
import { getPageData } from '../public/sentence';
3130
export default {
32-
setup() {
33-
const data = reactive({
34-
list: getPageData(30, 0),
35-
});
36-
37-
const bottomLoading = () => {
38-
setTimeout(() => {
39-
const index = data.list.length - 1;
40-
const loadedList = getPageData(10, index);
41-
data.list.push(...loadedList);
42-
}, 1000);
43-
};
44-
31+
data() {
4532
return {
46-
...toRefs(data),
47-
bottomLoading,
33+
list: getPageData(50, 0),
4834
};
4935
},
36+
methods: {
37+
bottomLoading() {
38+
setTimeout(() => {
39+
const index = this.list.length - 1;
40+
const loadedList = getPageData(10, index);
41+
this.list.push(...loadedList);
42+
}, 1000);
43+
}
44+
}
5045
};
5146
</script>
5247

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,19 +21,17 @@
2121
</template>
2222

2323
<script>
24-
import { reactive, toRefs } from 'vue';
2524
import { getPageData } from '../public/sentence';
2625
export default {
27-
setup() {
28-
const data = reactive({
29-
scroller: document,
30-
list: getPageData(100, 0),
31-
});
32-
26+
data() {
3327
return {
34-
...toRefs(data),
28+
scroller: null,
29+
list: getPageData(100, 0),
3530
};
3631
},
32+
mounted() {
33+
this.scroller = document;
34+
}
3735
};
3836
</script>
3937

0 commit comments

Comments
 (0)