diningList.vue 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. <template>
  2. <view class="mt20px">
  3. <view class="contain">
  4. <view class="box" style="height: 80px;">
  5. <view class="container">
  6. <view class="text-container">
  7. <view>当前餐车名称</view>
  8. </view>
  9. <view class="icon-container">
  10. <u-icon name="plus-circle" size="24"></u-icon>
  11. <u-icon name="info-circle" size="24" @click="btnIC"></u-icon>
  12. </view>
  13. </view>
  14. <view style="width: 50px;">
  15. <u-tag plain text="营业中" type="success" size="mini"></u-tag>
  16. </view>
  17. </view>
  18. </view>
  19. </view>
  20. </template>
  21. <script>
  22. export default {
  23. data() {
  24. return {
  25. }
  26. },
  27. methods: {
  28. btnIC() {
  29. uni.navigateTo({
  30. url: `/pages/diningCar/diningCar`
  31. })
  32. }
  33. }
  34. }
  35. </script>
  36. <style scoped lang="scss">
  37. .box {
  38. padding: 20rpx 20rpx 0;
  39. // background-image: linear-gradient(#00a551 10%, #fff 30%);
  40. border-bottom-left-radius: 30rpx;
  41. border-bottom-right-radius: 30rpx;
  42. background-position: top;
  43. box-shadow: 0 0 5px 2px #ebebeb;
  44. background-repeat: no-repeat;
  45. border-radius: 20rpx;
  46. background-color: #fff;
  47. }
  48. .box:hover {
  49. border: 1px solid #2979ff; /* 鼠标悬停时显示边框 */
  50. }
  51. .box:active {
  52. border: 1px solid #0056b3; /* 鼠标按下时显示另一种边框颜色 */
  53. }
  54. .container {
  55. display: flex;
  56. /* 使用 Flexbox 布局 */
  57. justify-content: space-between;
  58. /* 子元素之间留有空白 */
  59. }
  60. .text-container {
  61. flex: 1;
  62. /* 文本占满剩余空间 */
  63. }
  64. .icon-container {
  65. display: flex;
  66. /* 使用 Flexbox 布局 */
  67. flex-direction: row;
  68. /* 水平排列子元素 */
  69. justify-content: flex-end;
  70. /* 子元素右对齐 */
  71. }
  72. .icon-container u-icon {
  73. margin-right: 15px;
  74. /* 设置图标之间的间距 */
  75. }
  76. </style>