feat(page): add pull-to-refresh and back-to-top component

1. enable pull-down refresh for the target page in pages.json
2. add scroll mixin and back-to-top component for form and formdata pages, show back-to-top button when scrolling down
This commit is contained in:
2026-07-15 17:35:42 +08:00
parent 4c58db0710
commit 05d6ea1e96
3 changed files with 8 additions and 0 deletions

View File

@@ -1245,6 +1245,7 @@
"navigationStyle": "custom",
// #endif
"navigationBarTitleText": "",
"enablePullDownRefresh": true,
"componentPlaceholder": {
"diy-article": "view",
"diy-audio": "view",

View File

@@ -14,11 +14,15 @@
<loading-cover ref="loadingCover"></loading-cover>
<ns-login ref="login"></ns-login>
<to-top v-if="showTop" @toTop="scrollToTopNative()"></to-top>
</view>
</template>
<script>
import scroll from '@/common/js/scroll-view.js';
export default {
mixins: [scroll],
data() {
return {
id: 0,

View File

@@ -19,17 +19,20 @@
</block>
<loading-cover ref="loadingCover"></loading-cover>
<ns-login ref="login"></ns-login>
<to-top v-if="showTop" @toTop="scrollToTopNative()"></to-top>
</view>
</template>
<script>
import diyForm from '@/components-diy/diy-form.vue';
import scroll from '@/common/js/scroll-view.js';
export default {
components: {
diyForm
},
mixins: [scroll],
data() {
return {
id: 0,