1.0.12 • Published 1 year ago

encrypt-input v1.0.12

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

Install

npm i -S encrypt-input

Input Attributes

参数说明类型默认值
v-model绑定值
input-style作用在输入框上的样式string / object
public-key公钥string
require-default-rules是否需要默认规则booleanfalse
require-encrypt是否需要RSA加密booleanfalse

Input Methods

事件名称说明回调参数
encryptPassword对绑定值加密,允许对传入参数加密,绑定值变为密文(val?: string)

其余参数和方法和https://element.eleme.cn/#/zh-CN/component/input 一致

Usage

<template>
  <div id="app">
    <encrypt-input
      ref="einput"
      :input-style="{ width: '250px' }"
      v-model="msg"
      :require-default-rules="true"
      :require-encrypt="true"
      public-key="xxx"
    >
    </encrypt-input>
    <p>{{ msg }}</p>
  </div>
</template>

<script>
import EncryptInput from "encrypt-input";
export default {
  name: "app",
  components: { EncryptInput },
  data() {
    return {
      msg: ""
    };
  },
  methods: {
    encrypt() {
      this.$refs['einput'].encryptPassword()
    }
  }
};
</script>

image.png

1.0.12

1 year ago

1.0.9

1 year ago

1.0.11

1 year ago

1.0.10

1 year ago

1.0.8

1 year ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

3 years ago