PasswordBeyboard.vue 1.79 KB
<template>
  <v-card flat class="PasswordKeyboard">
    <div class="keyBoardTitle" v-if="showTitle">
      借条100安全输入
      <div class="closeBtn" v-if="showClose" @click="$emit('close')">完成</div>
    </div>
    <div class="KeyboardBlock">
      <div class="keyboardBotton" v-for="(key, index) in 9" :key="index" @click="$emit('input', key.toString())">
        {{key}}
      </div>
      <div class="keyboardBotton" ></div>
      <div class="keyboardBotton" @click="$emit('input', '0')">0</div>
      <div class="keyboardBotton" @click="$emit('delete')">
        <v-icon color="gold">backspace</v-icon>
      </div>
    </div>
  </v-card>
</template>

<script>
export default {
  data: () => ({

  }),
  props: {
    showClose: {
      type: Boolean,
      default: true
    },
    showTitle: {
      type: Boolean,
      default: true
    },
  },
  methods: {
    
  }
}
</script>

<style lang="scss" scoped>
  .PasswordKeyboard {
    background-color: $background-black;
    color: $light-gold;
    
    .keyBoardTitle {
      height: 3rem;
      line-height: 3rem;
      text-align: center;
      position: relative;
      font-size: 1.5rem;

      .closeBtn {
        position: absolute;
        right: 0;
        top: 0;
        height: 3rem;
        line-height: 3rem;
        margin-right: 0.7rem;
        font-size: 1.3rem;
        color: #2196F3;
      }
    }
    .KeyboardBlock {
      width: 100%;
      height: 100%;
      display: flex;
      flex-direction: row;
      flex-wrap: wrap;
      justify-content: space-around;

      .keyboardBotton {
        width: 32.5%;
        height: 4rem;
        line-height: 4rem;
        font-size: 2.5rem;
        text-align: center;
        background-color: $toolbar-grey;
        border-radius: 0.4rem;
        margin: 0.2rem 0;
      }
    }
  }
</style>