Commit daa0fc17 authored by liujiangnan's avatar liujiangnan

feat: 封面

parent 450f1ef0
......@@ -227,19 +227,11 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
ngOnDestroy() {
}
/**
* 储存数据
*/
save() {
this.createCover();
(window as any).courseware.setData(this.item, null, this.saveKey);
this.refresh();
}
......@@ -288,7 +280,10 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
onTitleChange() {
this.extraData.changeDirtyCount = this.extraData.changeDirtyCount+1;
this.createCover();
}
createCover() {
html2canvas(document.getElementById("canvas")).then((canvas) => {
// document.body.appendChild(canvas);
const video_preview_thumb = canvas.toDataURL();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment