Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
connector-admin
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
sunshine.wang@elitesland.com
connector-admin
Commits
e593a123
Commit
e593a123
authored
Jun 17, 2022
by
sunshine.wang@elitesland.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
条码生成页面样式完善
parent
cbc73c17
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
74 additions
and
18 deletions
+74
-18
QrCodeDemo.vue
src/views/components/QrCodeDemo.vue
+74
-18
No files found.
src/views/components/QrCodeDemo.vue
View file @
e593a123
...
...
@@ -14,7 +14,7 @@
v-model=
"nowBarCode"
clearable
placeholder=
"请选择条码类型"
style=
"width: 185px;"
style=
"width: 185px;
top:-5px
"
>
<el-option
v-for=
"item in options"
...
...
@@ -23,22 +23,48 @@
:value=
"item.value"
/>
</el-select>
<el-button
@
click=
"firstButton"
>
二维码
</el-button>
<el-button
@
click=
"SecButton"
>
条形码
</el-button>
<div
v-if=
"(qrDisplay = true)"
>
<qrcode-vue
:value=
"qrCode"
:size=
"size"
level=
"H"
/>
</div>
<div
class=
"body-container"
>
<div
class=
"cardOne"
style=
"margin-top:40px; margin-left:40px "
>
<el-card
class=
"box-card"
>
<div
slot=
"header"
class=
"clearfix"
>
<el-button
type=
"primary"
@
click=
"firstButton"
>
点击生成二维码
</el-button>
<el-button
style=
"float: right; padding: 3px 0"
type=
"text"
>
导出二维码
</el-button>
</div>
<div
class=
"item1"
>
<div>
<qrcode-vue
:value=
"qrCode"
:size=
"size"
level=
"H"
/>
</div>
</div>
</el-card>
</div>
<div>
<barcode
:value=
"qrCode"
:format=
"barcodeFormat"
/>
<div
class=
"cardTwo"
style=
"margin-left:52%; margin-top:-38%"
>
<el-card
class=
"box-card"
>
<div
slot=
"header"
class=
"clearfix"
>
<el-button
type=
"primary"
@
click=
"SecButton"
>
点击生成条形码
</el-button>
<el-button
style=
"float: right; padding: 3px 0"
type=
"text"
>
导出条形码
</el-button>
</div>
<div
class=
"item2"
>
<div>
<barcode
:value=
"qrCode"
:format=
"barcodeFormat"
/>
</div>
</div>
</el-card>
</div>
</div>
</div>
<!--
<div>
<qrcode-vue
:value=
"value"
:size=
"size"
level=
"H"
/>
<input
v-model=
"barcodeValue"
/><br
/>
<barcode
:value=
"barcodeValue"
:format=
"barcodeFormat"
/>
</div>
-->
</
template
>
<
script
>
import
QrcodeVue
from
'
qrcode.vue
'
...
...
@@ -50,12 +76,10 @@ export default {
},
data
()
{
return
{
// value: "https://www.baidu.com",
nowBarCode
:
''
,
size
:
300
,
barcodeValue
:
'
test
'
,
barcodeFormat
:
''
,
qrDisplay
:
false
,
qrCode
:
''
,
materialCode
:
''
,
options
:
[
...
...
@@ -114,7 +138,6 @@ export default {
mounted
()
{},
methods
:
{
firstButton
()
{
this
.
qrDisplay
=
true
this
.
qrCode
=
this
.
materialCode
console
.
log
(
this
.
materialCode
)
this
.
$message
({
...
...
@@ -123,7 +146,6 @@ export default {
})
},
SecButton
()
{
this
.
qrCode
=
this
.
materialCode
if
(
this
.
nowBarCode
===
''
)
{
this
.
$message
({
message
:
'
请先选择条形码类型
'
,
...
...
@@ -131,6 +153,7 @@ export default {
})
return
}
this
.
qrCode
=
this
.
materialCode
console
.
log
(
'
nowBarCode
'
,
this
.
nowBarCode
)
this
.
barcodeFormat
=
this
.
nowBarCode
.
value
}
...
...
@@ -138,4 +161,37 @@ export default {
}
</
script
>
<
style
scoped
></
style
>
<
style
scoped
>
.app-container
.body-container
{
padding
:
20px
20px
20px
20px
;
}
.head-container
{
margin-top
:
0px
;
}
.text
{
font-size
:
14px
;
}
.item1
{
margin-bottom
:
24px
;
margin-left
:
64px
;
}
.item2
{
margin-bottom
:
24px
;
margin-left
:
64px
;
height
:
300px
;
}
.clearfix
:before
,
.clearfix
:after
{
display
:
table
;
content
:
""
;
}
.clearfix
:after
{
clear
:
both
;
}
.box-card
{
width
:
480px
;
}
</
style
>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment