承接 diggindata/yii2-kjua 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

diggindata/yii2-kjua

最新稳定版本:0.0.3

Composer 安装命令:

composer require diggindata/yii2-kjua

包简介

Yii2 widget to display a QRCode using the kjua library

README 文档

README

This extension provides a kjua QR Code widget for Yii framework 2.0.

The kjua library is provided by github/lrsjng.

Latest Stable Version

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist diggindata/yii2-kjua

or add

"diggindata/yii2-kjua": "@dev"

to the require section of your composer.json, then run composer update.

Usage

  1. Include the QRCode widget in a view file:
<?php
use diggindata\kjua\QrCodeWidget;
  1. Set some attributes:
<?php
$attributes = [
    'label' => 'My Label',
    'mode' => 'label',
    'fill' => 'navy',
    'text' => 'Good morning',
    'rounded' => 50,
    'ecLevel' => 'M',
    'crisp' => false,
    'mSize' => 20,
    'options'=>['style'=>'display:inline']
]; 
  1. Show the QRCode:
<?= QrCodeWidget::widget($attributes); ?>

The list of available attributes is described here: https://larsjung.de/kjua/.

On that page there is also a link to a demo page available.

Attributes List

// render method: 'canvas', 'image' or 'svg'
render: 'image',

// render pixel-perfect lines
crisp: true,

// minimum version: 1..40
minVersion: 1,

// error correction level: 'L', 'M', 'Q' or 'H'
ecLevel: 'L',

// size in pixel
size: 200,

// pixel-ratio, null for devicePixelRatio
ratio: null,

// code color
fill: '#333',

// background color
back: '#fff',

// content
text: 'no text',

// roundend corners in pc: 0..100
rounded: 0,

// quiet zone in modules
quiet: 0,

// modes: 'plain', 'label' or 'image'
mode: 'plain',

// label/image size and pos in pc: 0..100
mSize: 30,
mPosX: 50,
mPosY: 50,

// label
label: 'no label',
fontname: 'sans',
fontcolor: '#333',

// image element
image: null

统计信息

  • 总下载量: 2.54k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: BSD-3-Clause
  • 更新时间: 2021-06-09

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固