Skip to content

Commit

Permalink
release: 3.5.1 -> 3.6.0
Browse files Browse the repository at this point in the history
  • Loading branch information
scopewu committed Nov 3, 2024
1 parent c19bd09 commit a483909
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 1 deletion.
43 changes: 43 additions & 0 deletions README-ja.md
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,49 @@ QRコードのグラデーション塗りつぶしを有効にします。
QRコード要素のクラス名。
## `QrcodeVue` 3.5+
`QrcodeVue` 3.5+ exports separate `QrcodeCanvas` and `QrcodeSvg` components, for which the rollup configuration has been modified:
```
// rollup.config.js

- exports: 'default',
+ exports: 'named',
```

Direct references to `QrcodeVue` in common.js and cdn now require the `default` field:

```js
const QrcodeVue = require('qrcode.vue').default
const { default: QrcodeVue, QrcodeCanvas, QrcodeSvg } = require('qrcode.vue')
```

```html
<!--With HTML-->
<div id="root">
<p class="flex space-x">
<qrcode-vue :value="test" render-as="svg"></qrcode-vue>
<qrcode-canvas :value="test"></qrcode-canvas>
</p>
<p><input v-model="test" /></p>
</div>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/vue.global.prod.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/qrcode.vue.browser.min.js"></script>

<script>
Vue.createApp({
data() { return {
test: 'Hello World',
}},
components: {
QrcodeVue: QrcodeVue.default,
QrcodeCanvas: QrcodeVue.QrcodeCanvas,
},
}).mount('#root')
</script>
```

## ライセンス

copyright &copy; 2021 @scopewu, license by [MIT](https://github.com/scopewu/qrcode.vue/blob/main/LICENSE)
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "qrcode.vue",
"version": "3.5.1",
"version": "3.6.0",
"description": "A Vue.js component to generate QRCode. Both support Vue 2 and Vue 3",
"type": "module",
"main": "./dist/qrcode.vue.cjs.js",
Expand Down

0 comments on commit a483909

Please sign in to comment.