LicensePlate.scss 3.21 KB
/* components/LicensePlate/LicensePlate.wxss */
.license-plate {
  width: 100vw;
  height: 100vh;
  position: fixed;
  z-index: 8;
  bottom: -100%;
  left: 0;
  &-box {
    position: absolute;
    left: 0;
    bottom: 0;
    height: 100%;
    width: 100%;
    background-color: #fff;
  }

  &-title {
    padding: 0 20rpx;
    justify-content: space-between;
  }

  .cancel {
    background-color: transparent !important;
  }

  .done {
    background-color: #f13c3d;
    color: #fff;
  }

  .btn {
    height: 60rpx;
    margin: 0 !important;
    font-size: 28rpx;
    display: flex;
    align-items: center;

    &::after {
      display: none;
    }

  }

  .btn-hover {
    opacity: .75;
  }

  &-content {
    .title {
      font-size: 40rpx;
      font-weight: 700;
      text-align: center;
      padding: 20rpx 0 40rpx;
    }

    .plate-box {
      justify-content: center;

      .item {
        width: 60rpx;
        height: 80rpx;
        background: rgba($color: #B6B6B6, $alpha: .26);
        border-radius: 8rpx;
        border: 2rpx solid rgba($color: #B6B6B6, $alpha: .26);
        margin-right: 10rpx;
        justify-content: center;
      }

      .active {
        border-color: #f13c3d;
      }

      .arc {
        width: 8rpx;
        height: 8rpx;
        border-radius: 50%;
        background-color: #000;
        margin-right: 10rpx;
      }
    }

    .paste {
      background-color: #f13c3d;
      color: #fff;
      margin: 60rpx !important;

      &::after {
        display: none;
      }
    }
  }
  &-bottom{
    position: absolute;
    width: 100%;
    min-height: 400rpx;
    left: 0;
    bottom: 0;
    background: rgba($color: #B6B6B6, $alpha: .16);
  }
  &-keyboard {
    padding: 20rpx;
    display: flex;
    .keyboard-del {
      width: 120rpx;
      height: auto;
      margin-left: auto;
      background-color: #fff;
      justify-content: center;
      border-radius: 8rpx;
      .icon {
        width: 60rpx;
        height: 60rpx;
      }
    }
    .city{
      width: calc(100% - 140rpx);
      grid-template-columns: repeat(6, 1fr);
    }
    .grid {
      display: grid;
      gap: 14rpx;
    }
    .letter {
      grid-template-columns: repeat(7, 1fr);
    }
    .number {
      grid-template-columns: repeat(10, 1fr);
      margin-bottom: 14rpx;
    }

    .suffix {
      grid-template-columns: repeat(4, 1fr);
      margin-top: 14rpx;
    }

    .item {
      height: 60rpx;
      background-color: #fff;
      display: flex;
      justify-content: center;
      align-items: center;
      padding: 0 !important;
      font-size: 24rpx;
      margin: 0 !important;

      &::after {
        display: none;
      }
    }

    .disabled {
      opacity: .2;
    }
  }
  .type-2{
    display: block;
    position: relative;
    .keyboard-left{
      width: 100%;
    }
    .number{
      width: 100%;
    }
    .letter,.suffix{
      width: calc(100% - 140rpx);
    }
    .keyboard-del{
      position: absolute;
      right: 20rpx;
      top: 94rpx;
      height: calc(100% - 114rpx);
    }
  }
}
.license-plate.true{
  animation: show-license-plate .25s forwards reverse;
}
.license-plate.show{
  animation: show-license-plate .25s forwards;
}
@keyframes show-license-plate {
  0% {
    bottom: -100%;
  }
  100% {
    bottom: 0;
  }
}