## 二维码

## 导入使用
```code[javascript]
import SuQrCode from "ss-universal-client-web/comp/widget/su-qr-code";
```


####  用于二维码的生成


:::demo
```html
<template>
    <el-button @click="$refs.seQrCode.downloadPng('1.png')">下载二维码</el-button>
<br/>
    <su-qr-code :option="option" ref="seQrCode"></su-qr-code>
</template>

<script>
    export default {
        components:{seQrCode},
        data() {
            return {
                option: {
                    width: 100,
                    text: "http://www.bilibili.com",
                    imgSrc: "https://www.niceloo.com/zt4ird/@qdyfb/common/js-plugin/icon/niceloo1.png"
                }
            }
        },
        methods: {}
    }
</script>
```
:::

### Attributes

| 参数      | 说明          | 类型      | 可选值                           | 默认值  |
|---------- |-------------- |---------- |--------------------------------  |-------- |
| option     |  绑定数据           | object | — | — |
| option.width     |  二维码的宽度          | number |  — | — |
| option.text      |  生成二维码的连接      | string |  — | — |
| option.imgSrc    |  二维码中间的图片      | string |  — | — |


### Methods
| 方法      | 说明          | 返回类型      | 参数                           | 
|---------- |-------------- |---------- |--------------------------------  |
| downloadPng(fileName)       | 下载二维码，fileName=downloadQr.png | void | -- |
