项目
在 GitHub 查看
superman66/vue-qart
关于
用于 qart.js 的 Vue 2.x 组件
网站与应用开发实测星标增长
- 24小时
- 0
- 7天
- 0
- 15天
- 0
- 1个月
- 正在收集历史
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文vue-qart
You should read it before you using vue-qart
because of qart.js's author doesn't publish the lastest version to npm. so, the new options
size,version,background,fillTypedoesn't work in vue-qart until qart.js' author publish the lastest version.
For More Detail, seeing this issue: size option doesn't works
the Vue 2.x Component for kciter's qart.js
Check the DEMO
Installation
install with NPM
npm install vue-qart --save
Import
import VueQArt from 'vue-qart'
new Vue({
components: {VueQArt}
})
Usage
In template
<vue-q-art :config="config"></vue-q-art>
Set config value
data () {
return {
msg: 'Welcome to Your Vue.js App',
config: {
value: 'https://www.baidu.com',
imagePath: './examples/assets/logo.png',
filter: 'color'
}
}
}
for imagePath prop, you can use base64 instead of image path.
For more details you should definitely check out qart.js
download to image
passing download props, to show download button, it support:
- text - button text
- visible - setting download button visible or not
- style - setting download button style
- type - image type,such as
image/png - filename
you can download the qrcode to image by using canvas.toDataURL()
const myCanvas = this.$refs.qart.children[0];
const type = 'image/png';
let image = myCanvas.toDataURL(type).replace(type, "image/octet-stream");
window.location.href = image; // it will save locally
Build Setup
# install dependencies
npm install
# serve with hot reload at localhost:8080/demo/
npm run dev
# build demo
npm run demo
# export the directive as a library
npm run build
探索相关项目
加载中…