-
Notifications
You must be signed in to change notification settings - Fork 88
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
44 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 © 2021 @scopewu, license by [MIT](https://github.com/scopewu/qrcode.vue/blob/main/LICENSE) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters