feat: add back-to-top component to multiple pages and import scroll mixin
add to-top component to card.vue, card_buy.vue, diy.vue and member index.vue, import scroll mixin for diy and member index pages to support scroll to top functionality
This commit is contained in:
@@ -51,6 +51,7 @@
|
||||
<!-- 小程序隐私协议 -->
|
||||
<privacy-popup ref="privacyPopup"></privacy-popup>
|
||||
<!-- #endif -->
|
||||
<to-top v-if="showTop" @toTop="scrollToTopNative()"></to-top>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
@@ -58,10 +59,11 @@
|
||||
<script>
|
||||
|
||||
import diyJs from '@/common/js/diy.js';
|
||||
import scroll from '@/common/js/scroll-view.js';
|
||||
import microPageJs from './public/js/diy.js';
|
||||
|
||||
export default {
|
||||
mixins: [diyJs, microPageJs]
|
||||
mixins: [diyJs, scroll, microPageJs]
|
||||
};
|
||||
</script>
|
||||
|
||||
|
||||
@@ -118,6 +118,7 @@
|
||||
|
||||
<ns-goods-recommend ref="goodrecommend" route="super_member"></ns-goods-recommend>
|
||||
<ns-login ref="login"></ns-login>
|
||||
<to-top v-if="showTop" @toTop="scrollToTopNative()"></to-top>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
|
||||
@@ -215,6 +215,7 @@
|
||||
|
||||
<ns-login ref="login"></ns-login>
|
||||
<loading-cover ref="loadingCover"></loading-cover>
|
||||
<to-top v-if="showTop" @toTop="scrollToTopNative()"></to-top>
|
||||
<!-- 选择支付方式弹窗 -->
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -71,12 +71,14 @@
|
||||
<!-- 小程序隐私协议 -->
|
||||
<privacy-popup ref="privacyPopup"></privacy-popup>
|
||||
<!-- #endif -->
|
||||
<to-top v-if="showTop" @toTop="scrollToTopNative()"></to-top>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import diyJs from '@/common/js/diy.js';
|
||||
import scroll from '@/common/js/scroll-view.js';
|
||||
import indexJs from './public/js/index.js';
|
||||
import memberPublic from './public/js/member-public.js';
|
||||
|
||||
@@ -88,7 +90,7 @@ export default {
|
||||
nsBirthdayGift,
|
||||
nsNewGift
|
||||
},
|
||||
mixins: [diyJs, indexJs, memberPublic],
|
||||
mixins: [diyJs, scroll, indexJs, memberPublic],
|
||||
computed: {
|
||||
pageStyle() {
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user