|
|
@@ -66,7 +66,7 @@
|
|
|
|
|
|
<script lang="ts">
|
|
|
import { onMounted, ref, reactive, toRefs } from 'vue';
|
|
|
-import { createComponent } from '@/utils/create';
|
|
|
+import { createComponent } from '@/packages/utils/create';
|
|
|
const { createDemo } = createComponent('infiniteloading');
|
|
|
import { Toast } from '../toast';
|
|
|
export default createDemo({
|
|
|
@@ -87,9 +87,7 @@ export default createDemo({
|
|
|
const curLen = data.defultList.length;
|
|
|
|
|
|
for (let i = curLen; i < curLen + 10; i++) {
|
|
|
- data.defultList.push(
|
|
|
- `${i} -- 塑像本来就在石头里,我只是把不要的部分去掉`
|
|
|
- );
|
|
|
+ data.defultList.push(`${i}`);
|
|
|
}
|
|
|
|
|
|
if (data.defultList.length > 30) hasMore.value = false;
|
|
|
@@ -102,9 +100,7 @@ export default createDemo({
|
|
|
setTimeout(() => {
|
|
|
const curLen = data.customList.length;
|
|
|
for (let i = curLen; i < curLen + 10; i++) {
|
|
|
- data.customList.push(
|
|
|
- `${i} -- 塑像本来就在石头里,我只是把不要的部分去掉`
|
|
|
- );
|
|
|
+ data.customList.push(`${i}`);
|
|
|
}
|
|
|
if (data.customList.length > 30) customHasMore.value = false;
|
|
|
done();
|
|
|
@@ -115,9 +111,7 @@ export default createDemo({
|
|
|
setTimeout(() => {
|
|
|
const curLen = data.refreshList.length;
|
|
|
for (let i = curLen; i < curLen + 10; i++) {
|
|
|
- data.refreshList.push(
|
|
|
- `${i} -- 塑像本来就在石头里,我只是把不要的部分去掉`
|
|
|
- );
|
|
|
+ data.refreshList.push(`${i}`);
|
|
|
}
|
|
|
if (data.refreshList.length > 30) refreshHasMore.value = false;
|
|
|
done();
|
|
|
@@ -133,15 +127,9 @@ export default createDemo({
|
|
|
|
|
|
const init = () => {
|
|
|
for (let i = 0; i < 10; i++) {
|
|
|
- data.defultList.push(
|
|
|
- `${i} -- 塑像本来就在石头里,我只是把不要的部分去掉`
|
|
|
- );
|
|
|
- data.customList.push(
|
|
|
- `${i} -- 塑像本来就在石头里,我只是把不要的部分去掉`
|
|
|
- );
|
|
|
- data.refreshList.push(
|
|
|
- `${i} -- 塑像本来就在石头里,我只是把不要的部分去掉`
|
|
|
- );
|
|
|
+ data.defultList.push(`${i}`);
|
|
|
+ data.customList.push(`${i}`);
|
|
|
+ data.refreshList.push(`${i}`);
|
|
|
}
|
|
|
};
|
|
|
onMounted(() => {
|
|
|
@@ -173,6 +161,7 @@ export default createDemo({
|
|
|
margin-top: 10px;
|
|
|
font-size: 14px;
|
|
|
color: rgba(100, 100, 100, 1);
|
|
|
+ text-align: center;
|
|
|
}
|
|
|
|
|
|
.loading {
|