Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
sn_config
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
sn_config
Commits
b6f6d8ed
Commit
b6f6d8ed
authored
Nov 06, 2023
by
liujiangnan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 增加课前导读的配置
parent
83198a13
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
2 deletions
+35
-2
form.component.html
form/src/app/form/form.component.html
+22
-2
form.component.ts
form/src/app/form/form.component.ts
+13
-0
No files found.
form/src/app/form/form.component.html
View file @
b6f6d8ed
...
...
@@ -25,6 +25,7 @@
</div>
<div
class=
"border"
style=
"width: 1000px;"
>
<span>
课前导读
</span>
<div
*
ngFor=
"let page of item.pages; let i = index"
>
<div
class=
"border"
style=
"width: 950px;"
>
<div>
...
...
@@ -48,11 +49,30 @@
<textarea
rows=
"4"
nz-input
[(
ngModel
)]="
page
.
text
"
(
blur
)="
save
()"
></textarea>
</div>
<br>
<button
style=
"width: 900px; height: 30px; color: red;"
(
click
)="
removePage
(
i
)"
>
删除
页面
</button>
<button
style=
"width: 900px; height: 30px; color: red;"
(
click
)="
removePage
(
i
)"
>
删除
</button>
</div>
</div>
<div
class=
"border"
style=
"width: 950px;"
>
<button
style=
"width: 900px; height: 100px;"
(
click
)="
addPage
()"
>
增加页面
</button>
<button
style=
"width: 900px; height: 100px;"
(
click
)="
addPage
()"
>
增加导读
</button>
</div>
</div>
<div
class=
"border"
style=
"width: 1000px;"
>
<span>
课程简介
</span>
<div
*
ngFor=
"let page of item.introduces; let i = index"
>
<div
class=
"border"
style=
"width: 950px;"
>
<span>
图片:
</span>
<div
style=
"width: 300px;"
>
<app-upload-image-with-preview
[
picUrl
]="
page
.
image
"
(
imageUploaded
)="
onAssetUploadSuccess
($
event
,
'
introduces
',
i
,
'
image
')"
>
</app-upload-image-with-preview>
</div>
<br>
<button
style=
"width: 900px; height: 30px; color: red;"
(
click
)="
removeIntroduce
(
i
)"
>
删除
</button>
</div>
</div>
<div
class=
"border"
style=
"width: 950px;"
>
<button
style=
"width: 900px; height: 100px;"
(
click
)="
addIntroduce
()"
>
增加简介
</button>
</div>
</div>
</div>
...
...
form/src/app/form/form.component.ts
View file @
b6f6d8ed
...
...
@@ -20,6 +20,7 @@ export class FormComponent extends ComponentBase implements OnInit, OnChanges, O
sentence
:
''
,
store
:
''
,
pages
:
[],
introduces
:
[],
};
addPage
()
{
...
...
@@ -37,6 +38,18 @@ export class FormComponent extends ComponentBase implements OnInit, OnChanges, O
this
.
save
();
}
addIntroduce
()
{
this
.
item
.
introduces
.
push
({
image
:
''
});
this
.
save
();
}
removeIntroduce
(
idx
)
{
this
.
item
.
introduces
.
splice
(
idx
,
1
);
this
.
save
();
}
handle_dragover
(
e
)
{
e
.
preventDefault
();
}
...
...
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