test.vue 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. <template>
  2. <view class="content">
  3. <!-- <comment ref="mescrollItem" :videoId="1552"></comment> -->
  4. <!-- <px-popup-bottom ref="popUp" :visible.sync="specVisible" @close="closePop" :videoId="videoId" :smsNum="pingCount" :title="pingCount+'条评论'" radius="32" maxHeight="1200">
  5. </px-popup-bottom> -->
  6. <view class="notice-warp">
  7. <view class="notice">mescroll-body是原生页面的滚动,子组件无页面生命周期</view>
  8. <view class="notice">需通过mescroll-comp.js给子组件补充页面生命周期</view>
  9. </view>
  10. <!-- 评论弹窗 -->
  11. <popupBottom ref="mescrollItem" :visible.sync="specVisible" @close="closePop" :videoId="videoId" :smsNum="pingCount" :title="pingCount+'条评论'" radius="32" maxHeight="1200"></popupBottom>
  12. </view>
  13. </template>
  14. <script>
  15. // import pxPopupBottom from '@/components/px-popup-bottom/px-popup-bottom.vue'
  16. import popupBottom from '@/components/popupBottom/popupBottom.vue'
  17. // import comment from './comment.vue'
  18. import MescrollCompMixin from "@/uni_modules/mescroll-uni/components/mescroll-uni/mixins/mescroll-comp.js";
  19. export default {
  20. mixins: [MescrollCompMixin],
  21. components: {
  22. // pxPopupBottom,
  23. popupBottom
  24. },
  25. data() {
  26. return {
  27. specVisible:false,
  28. pingCount:1000,
  29. videoId:1552
  30. }
  31. },
  32. onLoad() {
  33. },
  34. mounted() {
  35. setTimeout(() => {
  36. this.specVisible=true;
  37. });
  38. },
  39. methods: {
  40. closePop(){
  41. },
  42. }
  43. }
  44. </script>
  45. <style>
  46. .notice-warp{
  47. z-index: 9;
  48. position: fixed;
  49. top: var(--window-top);
  50. left: 0;
  51. width: 100%;
  52. height: 100rpx;/*对应mescroll-body的top值*/
  53. font-size: 26upx;
  54. padding-top: 10upx;
  55. border-bottom: 1upx solid #eee;
  56. text-align: center;
  57. background-color: #fff;
  58. }
  59. .notice-warp .notice{
  60. color:#555;
  61. }
  62. .notice-warp .btn-change{
  63. display: inline-block;
  64. margin-top: 28upx;
  65. padding: 6upx 16upx;
  66. border: 1upx solid #FF6990;
  67. border-radius: 40upx;
  68. color: #FF6990;
  69. }
  70. .notice-warp .btn-change:active{
  71. opacity: .5;
  72. }
  73. </style>