Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
B
byq_pc
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
张伯涛
byq_pc
Commits
389685a4
Commit
389685a4
authored
Apr 29, 2025
by
jiaxu.yan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改背景
parent
e7d5bdbe
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
11 deletions
+30
-11
index.vue
src/views/makePie/index.vue
+30
-11
No files found.
src/views/makePie/index.vue
View file @
389685a4
...
...
@@ -14,13 +14,22 @@
第二视角
</button>
</div>
<CanvasWithExternalBackground
:width=
"800"
:height=
"600"
:background-image-url=
"backgroundUrl"
@
background-updated=
"handleBackgroundUpdate"
/>
<div
v-if=
"type == 1"
>
<CanvasWithExternalBackground
:width=
"800"
:height=
"600"
:background-image-url=
"backgroundUrl"
@
background-updated=
"handleBackgroundUpdate"
/>
</div>
<div
v-if=
"type == 2"
>
<CanvasWithExternalBackground
:width=
"800"
:height=
"600"
:background-image-url=
"backgroundUrl"
@
background-updated=
"handleBackgroundUpdate"
/>
</div>
<div
class=
"controls"
>
<button
@
click=
"changeBackground"
>
更换背景图
</button>
<input
...
...
@@ -51,7 +60,10 @@ export default {
},
data
()
{
return
{
backgroundUrl
:
pic1
// 默认背景图URL
backgroundUrl
:
pic1
,
// 默认背景图URL
type
:
1
,
pic1
,
pic2
}
},
mounted
()
{
...
...
@@ -64,6 +76,14 @@ export default {
loadBackgroundImage
(
url
)
{
this
.
backgroundUrl
=
url
},
getType
(
e
)
{
this
.
type
=
e
if
(
e
===
1
)
{
this
.
loadBackgroundImage
(
pic1
)
}
else
{
this
.
loadBackgroundImage
(
pic2
)
}
},
handleBgChange
(
e
)
{
const
file
=
e
.
target
.
files
[
0
]
if
(
!
file
)
return
...
...
@@ -83,9 +103,8 @@ export default {
</
script
>
<
style
>
.left-bar
{
padding
:
0
20px
;
.left-bar
{
padding
:
0
20px
;
}
.default-btn
{
width
:
145px
;
...
...
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