You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

119 lines
2.1 KiB

10 months ago
  1. <template>
  2. <div class="order-panel">
  3. <!-- 订单操作面板组件 -->
  4. <u-popup :show="open" :round="20" closeable @close="close">
  5. <view class="order-panel-body">
  6. <view class="order-panel-title">{{ title }}</view>
  7. <view class="product-info">
  8. <view class="img-box">
  9. <img :src="url" alt="" />
  10. <view class="mask-layer">
  11. {{ $t('page.order.common') + " " + num + " " + $t('page.order.piece') }}
  12. </view>
  13. </view>
  14. </view>
  15. <view class="desc">
  16. {{ desc }}
  17. </view>
  18. <div class="btn">
  19. <u-button @click="definiteExecution()" type="primary" color="#ED762F" shape="circle" :text="$t('page.order.ok')"></u-button>
  20. </div>
  21. </view>
  22. </u-popup>
  23. </div>
  24. </template>
  25. <script>
  26. let src = '/static/product/8.png'
  27. export default {
  28. data() {
  29. return {
  30. src
  31. }
  32. },
  33. props : {
  34. open : {
  35. type : Boolean,
  36. default : false
  37. },
  38. title : {
  39. type : String,
  40. default : ''
  41. },
  42. desc : {
  43. type : String,
  44. default : '',
  45. },
  46. num : {
  47. type : String,
  48. default : 1
  49. },
  50. url : {
  51. type : String,
  52. default : src,
  53. }
  54. },
  55. created() {
  56. },
  57. methods: {
  58. close() {
  59. this.$emit('closePanel');
  60. },
  61. definiteExecution(){
  62. this.$emit('definiteExecution')
  63. }
  64. }
  65. }
  66. </script>
  67. <style lang="scss" scoped>
  68. .order-panel {
  69. .order-panel-body{
  70. min-height: 200px;
  71. .order-panel-title{
  72. font-size: 18px;
  73. height: 45px;
  74. line-height: 45px;
  75. text-align: center;
  76. }
  77. .product-info{
  78. display: flex;
  79. justify-content: center;
  80. .img-box{
  81. position: relative;
  82. width: 200rpx;
  83. img{
  84. width: 100%;
  85. }
  86. .mask-layer{
  87. position: absolute;
  88. bottom: 0;
  89. left: 0;
  90. height: 60rpx;
  91. line-height: 60rpx;
  92. width: 100%;
  93. color: white;
  94. text-align: center;
  95. font-size: 30rpx;
  96. background: rgba(0,0,0,.5);
  97. }
  98. }
  99. }
  100. .desc{
  101. width: 490rpx;
  102. margin: 15px auto;
  103. text-align: center;
  104. font-size: 28rpx;
  105. }
  106. .btn{
  107. padding: 10px;
  108. .u-button{
  109. height: 100rpx;
  110. &::v-deep .u-button__text{
  111. font-size: 30rpx !important;
  112. }
  113. }
  114. }
  115. }
  116. }
  117. </style>