Skip to content

Commit

Permalink
更新 中英文对照
Browse files Browse the repository at this point in the history
  • Loading branch information
pqs committed Dec 20, 2019
1 parent 5804cbd commit 73bfe10
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
28 changes: 14 additions & 14 deletions README.md
Expand Up @@ -3,27 +3,27 @@
<a href="https://www.npmjs.com/package/vue-qrcode-directive"><img src="https://img.shields.io/npm/l/vue-qrcode-directive.svg" alt="License"></a>
<a href="https://npmcharts.com/compare/vue-qrcode-directive?minimal=true"><img src="https://img.shields.io/npm/dm/vue-qrcode-directive.svg" alt="Downloads"></a>

> 一种使用Vue指令去解析二维码的插件
> 一种使用Vue指令去解析二维码的插件。( A plug-in that uses the Vue instruction to parse qr codes. )
# 使用
# 使用 ( Use )

## 安装
## 安装 ( Install )

```sh
npm install vue-qrcode-directive --save
or
yarn add vue-qrcode-directive
```

## 在main.js中注册
## 在main.js中注册 ( Register in main.js )

```js
import qrcode from 'vue-qrcode-directive'
Vue.use(qrcode)
```


## 在元素上使用v-qr指令
## 在元素上使用v-qr指令 ( Use the v-qr instruction on the label )
```js
<template>
<div v-qr="options" v-if="options" />
Expand All @@ -39,19 +39,19 @@ export default {
</script>
```

## options参数配置
## options参数配置 ( Parameter configuration )

### 简易配置
### 1.简易配置 ( 1.Easy configuration )

```js
options: '我是二维码的内容'
```
即直接提供二维码的数据即可

### 以对象的形式提供
### 2.以对象的形式提供 ( 2.Available as an object )
```js
options: {
text: '我是二维码的内容',
text: `我是二维码的内容(I'm the content of the QR code.)'`,
render: "canvas",
width: 256,
height: 256,
Expand All @@ -62,7 +62,7 @@ options: {
}
```

| 参数 | 含义 | 默认值 |
| 参数(params) | 含义(meaning) | 默认值(default) |
| --------------------- | ----------------------------- | ------------- |
| `text` | 二维码中的内容 | NA |
| `render` | 渲染的方式,canvas或者table | canvas |
Expand All @@ -73,10 +73,10 @@ options: {
| `background` | 背景色 | #ffffff |
| `foreground` | 前景色 | #000000 |

## qrcode核心解析器来源
## qrcode核心解析器来源 ( Core Parser Source )

> 来自jeromeetienne的jquery-qrcode中的qrcode.js
> 来自jeromeetienne的jquery-qrcode中的qrcode.js ( Qrcode.js from Jquery-qrcode from Jeromeetienne )
==> [点击前往 jquery-qrcode](https://github.com/jeromeetienne/jquery-qrcode)
==> [点击前往(Go to) jquery-qrcode](https://github.com/jeromeetienne/jquery-qrcode)

所以options的配置保持跟jquery-qrcode中的一样,可以自行前往查看。
因此options的配置保持跟jquery-qrcode中的一样,可以自行前往查看。( So options are configured to stay the same as in jquery-qrcode, and you can go to check it yourself. )
2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "vue-qrcode-directive",
"version": "1.0.1",
"version": "1.1.0",
"description": "A QR code resolver that uses the form of vue instruction",
"repository": "https://github.com/pengqiangsheng/vue-qrcode-directive",
"homepage": "https://github.com/pengqiangsheng/vue-qrcode-directive",
Expand Down

0 comments on commit 73bfe10

Please sign in to comment.