Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Y
YM2-30
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
template admin
YM2-30
Commits
b46887f3
Commit
b46887f3
authored
Jun 29, 2020
by
范雪寒
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 表单页面上传完图片后预览页面不刷新问题
parent
21984688
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
7 deletions
+10
-7
PreviewCanvas.ts
src/app/form/PreviewCanvas.ts
+6
-3
form.component.ts
src/app/form/form.component.ts
+2
-3
Game.ts
src/app/form/game/Game.ts
+2
-1
No files found.
src/app/form/PreviewCanvas.ts
View file @
b46887f3
...
@@ -271,11 +271,14 @@ export class PreviewCanvas implements OnInit, OnDestroy {
...
@@ -271,11 +271,14 @@ export class PreviewCanvas implements OnInit, OnDestroy {
return
Promise
.
all
(
pr
);
return
Promise
.
all
(
pr
);
}
}
refresh
()
{
refresh
(
data
)
{
this
.
canvasWidth
=
this
.
wrap
.
nativeElement
.
clientWidth
;
this
.
canvasWidth
=
this
.
wrap
.
nativeElement
.
clientWidth
;
this
.
canvasHeight
=
this
.
wrap
.
nativeElement
.
clientHeight
;
this
.
canvasHeight
=
this
.
wrap
.
nativeElement
.
clientHeight
;
this
.
init
();
this
.
game
.
initData
({
this
.
game
.
refresh
();
images
:
this
.
images
,
data
:
this
.
data
,
});
this
.
load
();
}
}
preload
(
url
)
{
preload
(
url
)
{
...
...
src/app/form/form.component.ts
View file @
b46887f3
...
@@ -142,9 +142,8 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
...
@@ -142,9 +142,8 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
save
()
{
save
()
{
(
<
any
>
window
).
courseware
.
setData
(
this
.
item
,
null
,
this
.
saveKey
);
(
<
any
>
window
).
courseware
.
setData
(
this
.
item
,
null
,
this
.
saveKey
);
this
.
refresh
();
this
.
refresh
();
this
.
previewCanvas
.
refresh
();
this
.
previewCanvas
.
refresh
(
this
.
item
);
console
.
log
(
JSON
.
stringify
(
this
.
item
));
}
}
/**
/**
...
...
src/app/form/game/Game.ts
View file @
b46887f3
...
@@ -27,7 +27,8 @@ export class Game {
...
@@ -27,7 +27,8 @@ export class Game {
}
}
refresh
()
{
refresh
(
data
)
{
this
.
initData
(
data
);
this
.
removeChildren
();
this
.
removeChildren
();
this
.
initView
();
this
.
initView
();
}
}
...
...
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