Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/myopenresources/cc-qrcode-demo


https://github.com/myopenresources/cc-qrcode-demo

angular angular8 qrcode

Last synced: about 1 month ago
JSON representation

Awesome Lists containing this project

README

        

# angular版 二维码组件cc-qrcode

## 安装
npm install cc-qrcode --save 或 yarn add cc-qrcode

## 使用
```javascript
// 业务模块
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { QrcodeModule } from 'cc-qrcode';

import { AppComponent } from './app.component';

@NgModule({
declarations: [
AppComponent
],
imports: [
BrowserModule,
QrcodeModule
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule { }

//业务html



```

## 参数
1. value:二维码值

2. background:背景颜色,默认白色

3. foreground:前景颜色,默认黑色

4. backgroundAlpha:背景透明度

5. foregroundAlpha:前景透明度

6. level:二维码级别,默认L

7. mime:生成的图片类型,默认image/png

8. padding:内边距

9. size:二维码大小(宽高)

10. canvas:是否使用画布生成,默认为false,图片方式