vue写车牌号 自定义键盘

news2025/1/23 10:27:23

vue写车牌号自定义键盘

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

<template>
  <div>
    <div class="content-wrapper">
      <div class="content-top-wrapper">
        <van-radio-group v-model="radioCarType">
          <van-radio name="1">
            蓝牌
            <img
              slot="icon"
              slot-scope="props"
              :src="props.checked ? radioImg[1] : radioImg[0]"
            />
          </van-radio>
          <van-radio name="2">
            绿牌
            <img
              slot="icon"
              slot-scope="props"
              :src="props.checked ? radioImg[1] : radioImg[0]"
            />
          </van-radio>
          <van-radio name="3">
            黄牌
            <img
              slot="icon"
              slot-scope="props"
              :src="props.checked ? radioImg[1] : radioImg[0]"
            />
          </van-radio>
        </van-radio-group>
      </div>
      <div class="content-middle-wrapper">
        <div class="content-car-number">
          <div class="content-section">
            <div class="content-section-flex flex-card">
              <div class="content-section-flex flex-card-border">
                <button
                  id="font"
                  class="flex-btn"
                  @click="btnClickYue"
                  v-bind:class="{ isClick: isYue }"
                >
                  {{ areaName }}
                </button>
                <span class="blank-border blank-border-first"></span>
                <button
                  id="letter"
                  class="flex-btn"
                  @click="btnClickA"
                  v-bind:class="{ isClick: isA }"
                >
                  {{ areaLetter }}
                </button>
                <div class="flex-mid"><span></span></div>
                <div class="flex-btns">
                  <button
                    id="numOne"
                    @click="btnClickNum('one')"
                    v-bind:class="{ isNumClick: isNumOne }"
                  >
                    {{ numOne }}
                  </button>
                  <span class="blank-border"></span>
                  <button
                    id="numTwo"
                    @click="btnClickNum('two')"
                    v-bind:class="{ isNumClick: isNumTwo }"
                  >
                    {{ numTwo }}
                  </button>
                  <span class="blank-border"></span>
                  <button
                    id="numThree"
                    @click="btnClickNum('three')"
                    v-bind:class="{ isNumClick: isNumThree }"
                  >
                    {{ numThree }}
                  </button>
                  <span class="blank-border"></span>
                  <button
                    id="numFour"
                    @click="btnClickNum('four')"
                    v-bind:class="{ isNumClick: isNumFour }"
                  >
                    {{ numFour }}
                  </button>
                  <span class="blank-border"></span>
                  <button
                    id="numFive"
                    @click="btnClickNum('five')"
                    v-bind:class="{ isNumClick: isNumFive }"
                  >
                    {{ numFive }}
                  </button>
                  <span class="blank-border" v-if="radioCarType == '2'"></span>
                  <button
                    v-if="radioCarType == '2'"
                    id="numSix"
                    @click="btnClickNum('six')"
                    v-bind:class="{ isNumClick: isNumSix }"
                  >
                    {{ numSix }}
                  </button>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>
    <button class="band-btn" :disabled="!checked" @click="bindCar">
      立即绑定
    </button>
    <div class="shadow" v-if="keyboardShow" @click="completeClick"></div>
    <div
      class="keyboard"
      v-if="keyboardShow"
      :class="{ animationDown: isDown, animationUp: isUp }"
    >
      <button class="btn-complete" @click="completeClick">
        <span>完成</span>
      </button>
      <div v-if="keyboard == 'txt'">
        <div class="keyboard-row" v-for="(item, rows) in carTxt" :key="rows">
          <button
            class="keyboard-row-item"
            v-for="(i, index) in item.name"
            :key="index"
            @click="btnWordClick(rows, index, i)"
          >
            {{ i }}
          </button>
        </div>
        <div class="keyboard-row">
          <button
            class="keyboard-row-item bottom"
            @click="btnBottomClick('新')"
          >
            新
          </button>
          <button
            class="keyboard-row-item bottom"
            @click="btnBottomClick('使')"
          >
            使
          </button>
          <button v-for="j in noneBottomtxt" :key="j" class="none-botton">
            {{ j }}
          </button>
          <div class="keyboard-row-item clear" @click="clearClick">
            <img src="./images/icon_input_delete.png" alt="删除" />
          </div>
        </div>
      </div>
      <div v-if="keyboard == 'num'">
        <div class="keyboard-row" v-for="(item, rows) in carNum" :key="rows">
          <button
            :disabled="
              !isSelectl ? isDisable && i < 10 : isDisable && rows != 0
            "
            class="keyboard-row-item"
            v-for="(i, index) in item.name"
            :key="index"
            @click="btnWordClick(rows, index, i)"
          >
            {{ i }}
          </button>
        </div>
        <div class="keyboard-row">
          <button
            :disabled="isSelectl"
            v-for="(item, index) in carNumBottom"
            :key="index"
            class="keyboard-row-item bottom"
            @click="btnBottomNumClick(item)"
          >
            {{ item }}
          </button>
          <button v-for="j in noneBottom" :key="j" class="none-botton">
            {{ j }}
          </button>
          <div class="keyboard-row-item clear" @click="clearClick">
            <img src="./images/icon_input_delete.png" alt="删除" />
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      num: "",
      radioCarType: "1", // 单选
      radioImg: [
        require("./images/radio0.png"),
        require("./images/radio1.png"),
        require("./images/checked1.png"),
        require("./images/checked0.png"),
      ], //单选图标
      checked: true, //协议复选框
      isAble: false, //发送控制,
      province: "浙", //省份简称
      plateNumber: "", //默认显示E
      checkbox: false,
      isDown: false,
      isUp: false,
      selected: null,
      isSelectx: false,
      isSelectl: false,
      key: "1",
      areaName: "",
      areaLetter: "",
      numOne: "",
      numTwo: "",
      numThree: "",
      numFour: "",
      numFive: "",
      numSix: "",
      isYue: false,
      keyboardShow: false,
      keyboard: false,
      isA: false,
      isNumOne: false,
      isNumTwo: false,
      isNumThree: false,
      isNumFour: false,
      isNumFive: false,
      isNumSix: false,
      isDisable: false,
      carTxt: [
        {
          name: ["粤", "京", "冀", "沪", "津", "晋", "蒙", "辽", "吉", "黑"],
        },
        {
          name: ["苏", "浙", "皖", "闽", "赣", "鲁", "豫", "鄂", "湘", "桂"],
        },
        {
          name: ["琼", "渝", "川", "贵", "云", "藏", "陕", "甘", "青", "宁"],
        },
      ],
      carNumBottom: ["W", "X", "Y", "Z"],
      noneBottom: ["", "", "", ""],
      noneBottomtxt: ["", "", "", "", "", ""],
      carNum: [
        {
          name: ["1", "2", "3", "4", "5", "6", "7", "8", "9", "0"],
        },
        {
          name: ["A", "B", "C", "D", "E", "F", "G", "H", "J", "K"],
        },
        {
          name: ["L", "M", "N", "P", "Q", "R", "S", "T", "U", "V"],
        },
      ],
    };
  },
  beforeCreate() {
    document
      .querySelector("body")
      .setAttribute("style", "background: #f5f5f5 !important");
  },
  destroyed() {
    document.querySelector("body").setAttribute("style", "background: #fff");
  },
  mounted() {
    this.isYue = true;
    this.isA = false;
    this.isUp = true;
    this.isNumOne = false;
    this.isNumTwo = false;
    this.isNumThree = false;
    this.isNumFour = false;
    this.isNumFive = false;
    this.isNumSix = false;
    this.keyboardShow = true;
    this.keyboard = "txt";
    this.key = 1;
  },
  watch: {
    radioCarType(news) {
      if (news) {
        this.isYue = false;
        this.keyboardShow = false;
        this.keyboard = false;
        this.key = "1";
        this.areaName = "";
        this.areaLetter = "";
        this.numOne = "";
        this.numTwo = "";
        this.numThree = "";
        this.numFour = "";
        this.numFive = "";
        this.numSix = "";
        this.isNumOne = false;
        this.isNumTwo = false;
        this.isNumThree = false;
        this.isNumFour = false;
        this.isNumFive = false;
        this.isNumSix = false;
      }
    },
  },
  methods: {
    // 车牌号第一位输入框选择
    btnClickYue() {
      this.isYue = true;
      this.isA = false;
      this.isUp = true;
      this.isNumOne = false;
      this.isNumTwo = false;
      this.isNumThree = false;
      this.isNumFour = false;
      this.isNumFive = false;
      this.isNumSix = false;
      this.keyboardShow = true;
      this.keyboard = "txt";
      this.key = 1;
    },
    // 键盘选择显示
    btnWordClick(rows, index, i) {
      this.selected = i;
      if (this.key === 1) {
        this.areaName = i;
        this.isSelectl = false;
        document.getElementById("letter").click();
      } else if (this.key === 2) {
        this.areaLetter = i;
        document.getElementById("numOne").click();
      } else if (this.key === 3) {
        this.numOne = i;
        document.getElementById("numTwo").click();
      } else if (this.key === 4) {
        this.numTwo = i;
        document.getElementById("numThree").click();
      } else if (this.key === 5) {
        this.numThree = i;
        document.getElementById("numFour").click();
      } else if (this.key === 6) {
        this.numFour = i;
        document.getElementById("numFive").click();
      } else if (this.key === 7) {
        this.numFive = i;
        if (this.radioCarType == "2") {
          document.getElementById("numSix").click();
        }
      } else if (this.key === 8) {
        this.numSix = i;
      }
      if ((this.key === 7 || this.key === 8) && this.radioCarType != "2") {
        this.carNumBottom = ["W", "X", "Y", "Z", "港", "澳", "学", "警", "领"];
        this.noneBottom = [];
      } else if (
        this.key === 3 ||
        this.key === 4 ||
        this.key === 5 ||
        this.key === 6
      ) {
        this.carNumBottom = ["W", "X", "Y", "Z"];
        this.noneBottom = ["", "", "", ""];
      } else if (this.radioCarType == "2" && this.key === 2) {
        this.carNumBottom = ["W", "X", "Y", "Z"];
        this.noneBottom = ["", "", "", ""];
      }
    },
    // 车牌第一位选择‘临’,’新‘后的键盘显示
    btnBottomClick(val) {
      this.areaName = val;
      this.isSelectx = true;
      this.isSelectl = false;
      document.getElementById("letter").click();
    },
    // 键盘最后一行字母点击事件
    btnBottomNumClick(i) {
      this.selected = i;
      if (this.key === 2) {
        this.areaLetter = i;
        document.getElementById("numOne").click();
      } else if (this.key === 3) {
        this.numOne = i;
        document.getElementById("numTwo").click();
      } else if (this.key === 4) {
        this.numTwo = i;
        document.getElementById("numThree").click();
      } else if (this.key === 5) {
        this.numThree = i;
        document.getElementById("numFour").click();
      } else if (this.key === 6) {
        this.numFour = i;
        document.getElementById("numFive").click();
      } else if (this.key === 7) {
        this.numFive = i;
        if (this.radioCarType == "2") {
          document.getElementById("numSix").click();
        }
      } else if (this.key === 8) {
        this.numSix = i;
      }
    },
    // 车牌号第二位输入框选择
    btnClickA() {
      this.isDisable = true;
      this.isA = true;
      this.isYue = false;
      this.isUp = true;
      this.isNumOne = false;
      this.isNumTwo = false;
      this.isNumThree = false;
      this.isNumFour = false;
      this.isNumFive = false;
      this.isNumSix = false;
      this.keyboardShow = true;
      this.keyboard = "num";
      this.key = 2;
    },
    // 车牌号后五位或六位输入框选择
    btnClickNum(name) {
      if (this.isSelectl) {
        this.isDisable = true;
      } else {
        this.isDisable = false;
      }
      this.keyboard = "num";
      this.keyboardShow = true;
      this.isYue = false;
      this.isA = false;
      this.isNumOne = false;
      this.isNumTwo = false;
      this.isNumThree = false;
      this.isNumFour = false;
      this.isNumFive = false;
      this.isNumSix = false;
      this.isUp = true;
      if (name === "one") {
        this.isNumOne = true;
        this.key = 3;
      } else if (name === "two") {
        this.isNumTwo = true;
        this.key = 4;
      } else if (name === "three") {
        this.isNumThree = true;
        this.key = 5;
      } else if (name === "four") {
        this.isNumFour = true;
        this.key = 6;
      } else if (name === "five") {
        this.isNumFive = true;
        this.key = 7;
      } else if (name === "six") {
        this.isNumSix = true;
        this.key = 8;
      }
      if ((name === "five" || name === "six") && this.radioCarType != "2") {
        this.carNumBottom = ["W", "X", "Y", "Z", "港", "澳", "学", "警", "领"];
        this.noneBottom = [];
      } else {
        this.carNumBottom = ["W", "X", "Y", "Z"];
        this.noneBottom = ["", "", "", ""];
      }
    },
    // 键盘点击‘完成’
    completeClick() {
      this.isYue = false;
      this.isA = false;
      this.isNumOne = false;
      this.isNumTwo = false;
      this.isNumThree = false;
      this.isNumFour = false;
      this.isNumFive = false;
      this.isNumSix = false;
      this.isUp = false;
      this.isDown = true;
      this.keyboardShow = false;
    },
    // 键盘点击‘删除图标’
    clearClick() {
      if (this.key === 1) {
        this.areaName = "";
      } else if (this.key === 2) {
        document.getElementById("font").click();
        this.areaLetter = "";
      } else if (this.key === 3) {
        document.getElementById("letter").click();
        this.numOne = "";
      } else if (this.key === 4) {
        document.getElementById("numOne").click();
        this.numTwo = "";
      } else if (this.key === 5) {
        document.getElementById("numTwo").click();
        this.numThree = "";
      } else if (this.key === 6) {
        document.getElementById("numThree").click();
        this.numFour = "";
      } else if (this.key === 7) {
        document.getElementById("numFour").click();
        this.numFive = "";
      } else if (this.key === 8) {
        document.getElementById("numFive").click();
        this.numSix = "";
      }
    },
    // 绑定车牌
    bindCar() {
      if (this.radioCarType != "2") {
        if (
          this.areaName === "" ||
          this.areaLetter === "" ||
          this.numOne === "" ||
          this.numTwo === "" ||
          this.numThree === "" ||
          this.numFour === "" ||
          this.numFive === ""
        ) {
          this.$toast("请输入完整车牌");
          return false;
        }
        this.num =
          this.areaName +
          this.areaLetter +
          this.numOne +
          this.numTwo +
          this.numThree +
          this.numFour +
          this.numFive;
      } else {
        if (
          this.areaName === "" ||
          this.areaLetter === "" ||
          this.numOne === "" ||
          this.numTwo === "" ||
          this.numThree === "" ||
          this.numFour === "" ||
          this.numFive === "" ||
          this.numSix === ""
        ) {
          this.$toast("请输入完整车牌");
          return false;
        }
        this.num =
          this.areaName +
          this.areaLetter +
          this.numOne +
          this.numTwo +
          this.numThree +
          this.numFour +
          this.numFive +
          this.numSix;
      }
    },
  },
};
</script>

<style lang="scss" scoped>
.content-wrapper {
  width: 100%;
  height: auto;
  background-color: #fff;
  margin-top: 0.2rem;
}

.content-top-wrapper {
  height: 0.96rem;
  padding: 0 0.3rem;
  font-size: 0.32rem;
  color: #212121;
  border-bottom: 1px solid #f5f5f5;
}

.content-top-wrapper img {
  width: 0.34rem;
  height: 0.34rem;
  vertical-align: initial;
}

.van-radio-group {
  width: 80%;
  height: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.shadow {
  width: 100vw;
  height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9;
  background: rgba(000,000,000,0);
}
.content-middle-wrapper {
  width: 100%;
  height: 1.4rem;
  border-bottom: 10px solid #f5f5f5;
  padding: 0 0.15rem;
}

.plate-number-box {
  width: 100%;
  height: 1rem;
  padding-top: 0.4rem;
}

.province-box {
  width: 0.6rem;
  height: 0.6rem;
  position: relative;
}

.province-box .province-show {
  width: 100%;
  height: 100%;
  position: absolute;
  border-bottom: 1px solid #c7c7c7;
  top: 0;
  left: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 0.36rem;
}

.province-box input {
  width: 100%;
  height: 100%;
  opacity: 0;
}

.plateNumber-box {
  width: calc(100% - 0.7rem);
  height: 0.6rem;
  position: relative;
  overflow: hidden;
}

.plateNumber-box input {
  width: 200%;
  height: 100%;
  opacity: 0;
  color: transparent;
  text-indent: -999em;
  margin-left: -100%;
}

.plateNumber-box .plateNumber-show {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  justify-content: space-around;
  align-items: center;
}

.plateNumber-show div {
  width: 10%;
  height: 0.6rem;
  border-bottom: 1px solid #c7c7c7;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 0.3rem;
}

.plateNumber-show div.new-powwer {
  width: 0.85rem;
  font-size: 0.24rem;
  color: #999;
}

.van-checkbox__label {
  margin-left: 2px !important;
}

.band-btn {
  width: 7rem;
  height: 0.88rem;
  background-color: #12b7f5;
  color: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0.5rem auto;
  font-size: 0.32rem;
  border: none;
  border-radius: 0.04rem;
}

.band-btn:disabled {
  background-color: #bbb;
}

.auth-code {
  width: 4rem;
  height: 100%;
  font-size: 0.28rem;
}

.send-btn {
  width: 1.52rem;
  height: 0.6rem;
  border-radius: 0.04rem;
  border: 0.02rem solid #12b7f5;
  position: absolute;
  right: 0.3rem;
  top: 0;
  bottom: 0;
  margin: auto;
  font-size: 0.24rem;
  color: #12b7f5;
  display: flex;
  justify-content: center;
  align-items: center;
}

.send-btn:disabled {
  border-color: #999;
  color: #999999;
}

.provinceData-wrapper {
  width: 7rem;
  height: 4rem;
}

.provinceData {
  width: 100%;
  height: 100%;
  padding: 0.33rem 0.1rem 0.2rem 0.14rem;
}

.province-btn {
  width: 0.6rem;
  height: 0.7rem;
  display: flex;
  justify-content: center;
  align-items: center;
  border: 1px solid #b5b5b5;
  border-radius: 0.04rem;
  font-size: 0.28rem;
  margin-left: 0.11rem;
  margin-bottom: 0.15rem;
  border-radius: 0.1rem;
}

.area-wrapper {
  width: 100%;
  height: auto;
  padding: 0.3rem;
  background-color: #fff;
  margin-top: 0.2rem;
}

.area-wrapper .title {
  font-size: 0.26rem;
  margin-bottom: 0.3rem;
}

.menu-wrapper {
  width: 76%;
  height: 0.68rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.menu-wrapper .menu {
  width: 2.16rem;
  height: 0.68rem;
  color: #333333;
  border: 1px solid #cecccc;
  border-radius: 0.08rem;
  font-size: 0.24rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.menu-wrapper .menu.active {
  border-color: #12b7f5;
  background-color: #ebf9fe;
  color: #12b7f5;
}
.content-car-number {
  padding-top: 0.1rem;
}

.content-car-number .car-content-title {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: justify;
  -ms-flex-pack: justify;
  justify-content: space-between;
  padding: 0 0.32rem;
  margin-bottom: 0.16rem;
}

.content-car-number .car-content-title span {
  font-size: 0.34rem;
}

.content-car-number .car-content-title .ze-checkbox {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
}

.content-car-number .car-content-title .ze-radio-text {
  font-size: 0.28rem;
}

.content-car-number .car-content-title .ze-checkbox-icon {
  color: #ffedb1 !important;
  margin-right: 0.08rem;
}

.content-car-number .content-section .content-section-flex {
  width: 100%;
  height: 100%;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  justify-content: space-evenly;
  align-items: center;
  font-size: 0.32rem;
}

.content-car-number .content-section .content-section-flex .blank-border {
  height: 0.44rem;
  width: 1px;
  /*no*/
  border-right: 1px solid #ddd;
  /*no*/
  margin-top: 0.22rem;
  /* margin-left: -0.15rem; */
  z-index: 1;
}

.content-car-number
  .content-section
  .content-section-flex
  .blank-border.blank-border-first {
  margin-top: 0;
}

.content-car-number .content-section .content-section-flex.flex-card {
  color: #000;
}

.content-car-number .content-section .content-section-flex.flex-card .flex-btn {
  width: 0.88rem;
  height: 0.88rem;
  border: none;
  text-align: center;
  background: #fff;
  font-size: 0.32rem;
  color: #000;
}

.content-car-number
  .content-section
  .content-section-flex.flex-card
  .flex-btns {
  display: flex;
  background: #fff;
  position: relative;
  height: 0.88rem;
}

.content-car-number
  .content-section
  .content-section-flex.flex-card
  .flex-btns
  button {
  width: 0.78rem;
  height: 0.88rem;
  border: none;
  font-size: 0.32rem;
  color: #000;
  border-radius: 50%;
  background: transparent;
  z-index: 2;
  position: relative;
}

.content-car-number
  .content-section
  .content-section-flex.flex-card
  .flex-btns
  button:first-child {
  margin-left: 0;
}

.content-car-number .content-section .content-section-flex.flex-card .flex-mid {
  margin: 0 0.05rem;
}

.content-car-number
  .content-section
  .content-section-flex.flex-card
  .flex-mid
  span {
  display: block;
  width: 0.1rem;
  height: 0.1rem;
  border-radius: 20rem;
  background: #ddd;
}

.content-car-number .content-section .content-section-flex.flex-card .isClick {
  border: 1px solid #12b7f5;
  /*no*/
  z-index: 50;
  border-radius: 0.08rem;
}

.content-car-number
  .content-section
  .content-section-flex.flex-card
  .isNumClick {
  border-radius: 0.08rem !important;
  border: 1px solid #12b7f5 !important;
  /*no*/
  z-index: 10;
  background-color: #fff !important;
}

.content-car-number .content-section .content-section-flex .flex-card-border {
  border: 1px solid #ddd;
  /*no*/
  border-radius: 0.08rem;
}

.keyboard {
  width: 100%;
  height: 5.3rem;
  position: fixed;
  bottom: -5rem;
  background: #eeeeee;
  z-index: 10;
}

.keyboard.animationDown {
  -webkit-animation: slide_dowms 0.3s ease-out;
  animation: slide_dowms 0.3s ease-out;
  -webkit-animation-fill-mode: forwards;
  animation-fill-mode: forwards;
}

.keyboard.animationUp {
  -webkit-animation: slide_ups 0.3s ease-out;
  animation: slide_ups 0.3s ease-out;
  -webkit-animation-fill-mode: forwards;
  animation-fill-mode: forwards;
  box-shadow: 1px 0 5px #cccccc;
}

.keyboard .btn-complete {
  height: 0.9rem;
  text-align: center;
  color: #12b7f5;
  font-size: 0.3rem;
  width: 100%;
  background: #fff;
  border: none;
  border-top: 1px solid #eee;
  margin-bottom: 0.3rem;
}

.keyboard .keyboard-row {
  margin-top: 0.2rem;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: justify;
  -ms-flex-pack: justify;
  justify-content: space-between;
  padding: 0 0.08rem;
  color: #333;
}

.keyboard .keyboard-row:first-child {
  margin-top: 0;
}

.keyboard .keyboard-row .keyboard-row-items {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: left;
  -ms-flex-pack: left;
  justify-content: left;
}

.keyboard .keyboard-row .keyboard-row-bottom {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: justify;
  -ms-flex-pack: justify;
  justify-content: space-between;
}

.keyboard .keyboard-row .keyboard-row-item {
  width: 0.66rem;
  height: 0.8rem;
  background: #fff;
  font-size: 0.34rem;
  border: 1px solid #ccc;
  line-height: 0.8rem;
  border-radius: 0.1rem;
  color: #333;
}

.keyboard-row-item:disabled {
  opacity: 0.7;
}

.keyboard .keyboard-row .keyboard-row-item.bottom {
  height: 0.8rem;
  width: 0.66rem;
  line-height: 0.8rem;
  background: #fff;
  color: #333;
  /*margin-right: 0.08rem;*/
}

.keyboard .keyboard-row .keyboard-row-item.clear {
  width: 1rem;
  height: 0.8rem;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
}

.keyboard .keyboard-row .keyboard-row-item.clear img {
  width: 0.62rem;
}

.keyboard .keyboard-row .none-botton {
  border: none;
  height: 0.8rem;
  width: 0.66rem;
  visibility: hidden;
}

.keyboard button:active {
  background: #f4f4f4 !important;
  color: #999 !important;
}

@-webkit-keyframes slide_ups {
  from {
    bottom: -5rem;
  }

  to {
    bottom: 0;
  }
}

@keyframes slide_ups {
  from {
    bottom: -5rem;
  }

  to {
    bottom: 0;
  }
}

@-webkit-keyframes slide_dowms {
  from {
    bottom: 0;
  }

  to {
    bottom: -5rem;
  }
}

@keyframes slide_dowms {
  from {
    bottom: 0;
  }

  to {
    bottom: -5rem;
  }
}
</style>

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/767721.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

COC 深圳城市开发者社区【职言职语】第1季活动来袭。。。

文章目录 活动介绍活动议程活动奖品参与方式活动时间活动费用活动地点 活动介绍 &#x1f389;&#x1f465; 欢迎加入职言职语活动&#xff01;与我们一起探索职场的智慧和灵感&#xff01; &#x1f454;&#x1f4bc; 在这个快节奏的职业世界中&#xff0c;职场话题 是我们…

【实战总结】SpringMVC架构升级SpringCloudAlibaba

升级目标 SpringMVCDubboZookeeper分布式架构改为Spring Cloud Alibaba微服务 技术框架:Spring Boot 2.7.2、Spring Cloud 2021.0.3 & Alibaba 2021.0.1.0 容器:Tomcat 9.0.65 JDK:1.8 配置中心:Nacos 2.0.4 消息队列:RocetMQ 4.9.3 配置中心:Apollo 11.0 缓存: Redis 4.0…

大华智慧园区综合管理平台存在任意文件上传漏洞

大华智慧园区综合管理平台存在任意文件上传漏洞 免责声明&#xff1a;请勿利用文章内的相关技术从事非法测试&#xff0c;由于传播、利用此文所提供的信息或者工具而造成的任何直接或者间接的后果及损失&#xff0c;均由使用者本人负责&#xff0c;所产生的一切不良后果与文章作…

Ceph

Ceph简介 Ceph使用C语言开发&#xff0c;是一个开放、自我修复和自我管理的开源分布式存储系统。具有高扩展性、高性能、高可靠性的优点。Ceph目前已得到众多云计算厂商的支持并被广泛应用。RedHat及OpenStack&#xff0c;Kubernetes都可与Ceph整合以支持虚拟机镜像的后端存储…

CMake:设置语言标准(一)

CMake:设置语言标准&#xff08;一&#xff09; 导言C标准历史C11版本特性介绍类型推导之auto和decltypeC返回值类型后置对模板实例化中连续尖括号>>的改进使用using定义别名&#xff08;替代typedef&#xff09;支持函数模板的默认参数在函数模板和类模板中使用可变参数…

接下来讲一讲Vue的数据代理

首先讲一下原生js的数据代理 原生的 Object.defineProperty() let aa wewewlet person {name: "王李斌",age: 12} Object.defineProperty(person, "address", {// value: 14&#xff0c; 给字段设置值//enumerable:true, 设置动态设置的字段为可以遍历/…

Docker 镜像解密:分层存储与构建原理多角度解析

&#x1f337;&#x1f341; 博主 libin9iOak带您 Go to New World.✨&#x1f341; &#x1f984; 个人主页——libin9iOak的博客&#x1f390; &#x1f433; 《面试题大全》 文章图文并茂&#x1f995;生动形象&#x1f996;简单易学&#xff01;欢迎大家来踩踩~&#x1f33…

超声波水表的优势

超声波水表是一种新型的水表&#xff0c;它采用超声波测流技术&#xff0c;能够实现对水流的非接触式测量&#xff0c;具有许多优势。下面将从多个方面来介绍超声波水表的优势。 一、高精度 由于超声波测流技术采用的是非接触式测量&#xff0c;因此不会受到水流的摩擦、涡流等…

【C++】C++11 (3): lambda表达式和包装器

一、lambda表达式 C98中的一个例子 在C98中&#xff0c;如果想要对一个数据集合中的元素进行排序&#xff0c;可以使用std::sort方法。 #include <algorithm> #include <functional> int main() {int a[] { 4,1,8,5,3,7,0,9,2,6 };// 默认按照小于比较&#xff…

S32 Design Studio for ARM(S32DS)下载和安装

1. S32 Design Studio for ARM 介绍 S32 Design Studio for ARM&#xff08;下面简称S32DS&#xff09;&#xff0c;是 NXP 官方在 2014 年官方推出的&#xff0c;专门面向 S32K、KEA、MAC57D54H等系列微控制器的集成开发环境。 S32DS是由Eclipse和一些插件集成而来的开发平台…

自来水收费系统适合应用于哪些场景?

自来水收费系统是一种用于自来水公司或供水管理部门的软件系统&#xff0c;旨在帮助自动化自来水的收费和管理过程。该系统可以帮助自来水公司更好地管理水资源&#xff0c;提高供水质量和效率&#xff0c;同时也可以为用户提供更加便捷和安全的用水服务。下面将从多个方面来介…

centos7通过epel源安装redis

目录 一、下载epel源 二、下载并且启动 一、下载epel源 wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo 二、下载并且启动 yum install redis systemctl enable --now redis

c代码和c++代码互相调用

note 不管是c代码调用c代码&#xff0c;还是c代码调用c代码&#xff0c;本质上都是g兼容gcc的功能 c代码调用c代码 lib.h #ifndef _LIB_H_void libfun(void);#endif lib.c #include <stdio.h> #include "lib.h"void libfun(void) {printf("this is i…

Intel nuc 清除cmos密码

设备为intel nuc7&#xff0c;其他版本可以参考&#xff0c;步骤如下 1、找到主板上的bios_sec的三针跳线 2、将跳线开关取下 3、按住电源键3秒&#xff0c;电源指示灯变为橙色后松手 4、耐心等待显示器显示bios recovery倒计时画面 5、按esc取消bios recovery 6、显示器显…

Oss文件上传-简化版

这里使用的是element的上传组件&#xff0c;相关上传钩子看官网 一、获取到oss后台相关的签名数据 建议通过接口获取 二、上传 //获取oss相关参数// getOsstokenasync beforeUploadMasterImg(file) {console.log("点击上传");await this.getOssSingnature(file);},…

这7款UI设计工具值得一试!

在设计工作中&#xff0c;UI设计更注重于人和产品互动式时的交互效果&#xff0c;也就是页面内容丰富程度。无论是想打造哪种风格的UI设计界面&#xff0c;这个过程都离不开好用的UI设计工具&#xff0c;本文总结了7款年度好用的UI设计工具&#xff0c;能帮助设计师更轻松地创作…

压裂工艺原理简述

一、压裂程序 1. 压裂概念 在石油领域&#xff0c;压裂是指采油或采气过程中&#xff0c;利用水力作用&#xff0c;使油气层形成裂缝的一种方法&#xff0c;又称水力压裂。压裂是人为地使地层产生裂缝&#xff0c;改善油在地下的流动环境&#xff0c;使油井产量增加&#xff…

【kubernetes系列】kubernetes之计算资源管理

资源类型 在 Kubernetes 中&#xff0c;Node 提供资源&#xff0c;而 Pod 使用资源。其中资源分为计算&#xff08;CPU、Memory、GPU&#xff09;、存储&#xff08;Disk、SSD&#xff09;、网络&#xff08;Network Bandwidth、IP、Ports&#xff09;。这些资源提供了应用运行…

DIN - 序列模型之深度兴趣网络(阿里)

&#x1f525; DIN来自于 阿里 盖坤团队 在 KDD-2018 发的论文《Deep Interest Network for Click-Through Rate Prediction》。该模型在当时已经应用于阿里的电商广告推荐业务&#xff0c;效果不错。 文章目录 1、介绍&#xff1a;2、单值特征 & 多值特征&#xff1a;3、动…

共筑信创生态!亚信科技AntDB数据库与用友、东方通、星辰天合达成兼容互认

近日&#xff0c;亚信科技AntDB数据库与用友U8 cloud、东方通应用服务器TongWeb V7.0、星辰天合全产品体系完成兼容适配。经测试&#xff0c;AntDB数据库与U8 cloud产品&#xff0c;TongWeb V7.0服务器&#xff0c;星辰天合天合翔宇分布式存储系统、统一数据平台XEDP、超融合平…