dynamic.vue 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. <template>
  2. <view class="uni-main">
  3. <view class="sticky-nav">
  4. <view class="nav-box">
  5. <u-icon name="arrow-left" color="#000" size="48" @click="backHome()"></u-icon>
  6. <text class="rule-text">我的动态</text>
  7. </view>
  8. </view>
  9. <view class="uni-list-warp">
  10. <view v-if="dataList.length>0">
  11. </view>
  12. <view class="uni-empty" v-else>
  13. <view><image class="icon" src="../../static/index/icon/empty_data_icon.png"></image></view>
  14. <view><text class="empty">空空如也,去装饰一下这里吧.</text></view>
  15. </view>
  16. </view>
  17. </view>
  18. </template>
  19. <script>
  20. export default{
  21. data(){
  22. return{
  23. dataList:[]
  24. }
  25. },
  26. methods:{
  27. backHome() {
  28. uni.navigateBack({
  29. delta: 1
  30. });
  31. },
  32. }
  33. }
  34. </script>
  35. <style lang="less" scoped>
  36. page {
  37. height: 100%;
  38. }
  39. .uni-main {
  40. width: 100%;
  41. height: 100%;
  42. background-color: #f6f7f5;
  43. font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  44. }
  45. .sticky-nav {
  46. position: sticky;
  47. width: 100%;
  48. top: 0;
  49. z-index: 1;
  50. }
  51. .nav-box {
  52. width: 100%;
  53. padding-top: 50rpx;
  54. display: flex;
  55. align-items: center;
  56. background: #fff;
  57. height: 100rpx;
  58. padding-bottom: 50rpx;
  59. /deep/.u-icon{
  60. margin-left: 20rpx!important;
  61. }
  62. .rule-text {
  63. font-size: 38rpx;
  64. color: #000;
  65. margin-left: 250rpx;
  66. }
  67. }
  68. /deep/.directory-content {
  69. margin: 0 0 25rpx 25rpx;
  70. font-size: 35rpx;
  71. color: rgb(118,118,118);
  72. }
  73. .uni-list-warp {
  74. }
  75. .uni-empty {
  76. // height: 100%;
  77. margin-top: 60%;
  78. text-align: center;
  79. font-size: 32rpx;
  80. color: #FF7A55;
  81. // height: 100%;
  82. }
  83. .uni-empty .icon {
  84. width: 160rpx;
  85. height: 100rpx;
  86. }
  87. </style>