Skip to content

Commit b1868a7

Browse files
committed
update nuxt sample and readme;
1 parent 7556adf commit b1868a7

File tree

8 files changed

+482
-40
lines changed

8 files changed

+482
-40
lines changed

1.hello-world/8.read-video-nuxtjs/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@ node_modules
66
.output
77
.env
88
dist
9+
.DS_Store

1.hello-world/8.read-video-nuxtjs/README.md

Lines changed: 459 additions & 22 deletions
Large diffs are not rendered by default.

1.hello-world/8.read-video-nuxtjs/components/HelloWorld.vue

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -33,19 +33,16 @@ const showImgDecode = () => {
3333

3434
<template>
3535
<div className="helloWorld">
36+
<h1>Hello World for Nuxt</h1>
3637
<div class="btn-group">
37-
<ClientOnly>
38-
<button :style="{ marginRight: '10px', backgroundColor: bShowScanner ? 'rgb(255,174,55)' : 'white' }"
39-
@click="showScanner">Video Decode</button>
40-
<button :style="{ backgroundColor: bShowImgDecode ? 'rgb(255,174,55)' : 'white' }" @click="showImgDecode">Image
41-
Decode</button>
42-
</ClientOnly>
38+
<button :style="{ marginRight: '10px', backgroundColor: bShowScanner ? 'rgb(255,174,55)' : 'white' }"
39+
@click="showScanner">Video Decode</button>
40+
<button :style="{ backgroundColor: bShowImgDecode ? 'rgb(255,174,55)' : 'white' }" @click="showImgDecode">Image
41+
Decode</button>
4342
</div>
4443
<div class="container">
45-
<ClientOnly>
46-
<VideoDecode v-if="bShowScanner"></VideoDecode>
47-
<ImgDecode v-if="bShowImgDecode"></ImgDecode>
48-
</ClientOnly>
44+
<VideoDecode v-if="bShowScanner"></VideoDecode>
45+
<ImgDecode v-if="bShowImgDecode"></ImgDecode>
4946
</div>
5047
</div>
5148
</template>
@@ -65,6 +62,10 @@ button {
6562
width: 80vw;
6663
}
6764
65+
.applogo {
66+
height: 25px;
67+
}
68+
6869
.helloWorld {
6970
display: flex;
7071
flex-direction: column;
@@ -75,4 +76,8 @@ button {
7576
height: 100%;
7677
color: #455a64;
7778
}
78-
</style>
79+
80+
h1 {
81+
font-size: 1.5em;
82+
}
83+
</style>

1.hello-world/8.read-video-nuxtjs/components/ImgDecode.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,4 @@ onBeforeUnmount(async () => {
4545
height: 90%;
4646
border: 1px solid black
4747
}
48-
</style>
48+
</style>

1.hello-world/8.read-video-nuxtjs/components/VideoDecode.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,4 +221,4 @@ onBeforeUnmount(async () => {
221221
top: 97%;
222222
}
223223
}
224-
</style>
224+
</style>

1.hello-world/8.read-video-nuxtjs/dbr.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ BarcodeReader.license = 'DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9';
99
/**
1010
* You can visit https://www.dynamsoft.com/customer/license/trialLicense?utm_source=github&product=dbr&package=js to get your own trial license good for 30 days.
1111
* Note that if you downloaded this sample from Dynamsoft while logged in, the above license key may already be your own 30-day trial license.
12-
* For more information, see https://www.dynamsoft.com/barcode-reader/programming/javascript/user-guide/?ver=9.6.10&utm_source=github#specify-the-license or contact [email protected].
12+
* For more information, see https://www.dynamsoft.com/barcode-reader/programming/javascript/user-guide/?ver=9.6.11&utm_source=github#specify-the-license or contact [email protected].
1313
* LICENSE ALERT - THE END
1414
*/
1515

16-
BarcodeReader.engineResourcePath = "https://cdn.jsdelivr.net/npm/[email protected].10/dist/";
16+
BarcodeReader.engineResourcePath = "https://cdn.jsdelivr.net/npm/[email protected].11/dist/";

1.hello-world/8.read-video-nuxtjs/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
"postinstall": "nuxt prepare"
99
},
1010
"devDependencies": {
11-
"nuxt": "^3.2.0"
11+
"nuxt": "^3.2.3"
1212
},
1313
"dependencies": {
14-
"dynamsoft-javascript-barcode": "9.6.10"
14+
"dynamsoft-javascript-barcode": "^9.6.11"
1515
}
1616
}

1.hello-world/README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@ Read more on the sample [here](https://www.dynamsoft.com/barcode-reader/programm
6868

6969
This sample shows how to use the SDK in a web page based on ES6 (also known as ECMAScript 2015 or ECMAScript 6).
7070

71-
7271
## Hello World with WebView
7372

7473
This sample shows how to use Mobile SDK in web pages through webview, you can read more in moblie samples repository:[Android](https://github.com/Dynamsoft/barcode-reader-mobile-samples/tree/main/android/JavaScript/WebViewBarcodeScanning)/[iOS](https://github.com/Dynamsoft/barcode-reader-mobile-samples/tree/main/ios/JavaScript/WebViewBarcodeScanning).

0 commit comments

Comments
 (0)