missing.vue 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. <template name="Mssing">
  2. <view class="app">
  3. <view class="mssing_top">
  4. <image class="mssing_top_img" :src="imgUrl"></image>
  5. </view>
  6. <view class="mssing_desc">
  7. {{desc}}
  8. </view>
  9. <button v-if="handlerName != ''" @click="handler"
  10. class="lem-btn round line-green" style="font-size: 28rpx;margin-top: 57rpx;">{{buttonName}}</button>
  11. </view>
  12. </template>
  13. <script>
  14. export default {
  15. name: "missing",
  16. //属性
  17. props: {
  18. imgUrl: {
  19. type: String,//属性类型
  20. default: ""
  21. },
  22. desc:{
  23. type:String,
  24. default:""
  25. },
  26. handlerName:{
  27. type:String,
  28. default:""
  29. },
  30. buttonName:{
  31. type:String,
  32. default:""
  33. }
  34. },
  35. //组件生命周期
  36. created:function(e){
  37. },
  38. methods: {
  39. handler(){
  40. this.$emit(this.handlerName,1)
  41. }
  42. }
  43. }
  44. </script>
  45. <style scoped>
  46. page{
  47. background-color: #F6F5FA;
  48. }
  49. .app{
  50. width: 100%;
  51. display: flex;
  52. justify-content: center;
  53. align-items: center;
  54. flex-direction: column;
  55. }
  56. .line-green::after {
  57. border-color: #2AAC34;
  58. }
  59. .mssing_top{
  60. width: 419rpx;
  61. height: 253rpx;
  62. }
  63. .mssing_top_img{
  64. width: 419rpx;
  65. height: 253rpx;
  66. }
  67. .mssing_desc{
  68. padding-top: 106rpx;
  69. font-size: 28rpx;
  70. color: #8D8E99;
  71. }
  72. </style>