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