refactor: lint检查
This commit is contained in:
@@ -5,7 +5,7 @@ import {AdminTagComponent} from './admin-tag.component';
|
|||||||
import {FormsModule} from '@angular/forms';
|
import {FormsModule} from '@angular/forms';
|
||||||
import {CommonTableModule} from '../components/common-table/common-table.module';
|
import {CommonTableModule} from '../components/common-table/common-table.module';
|
||||||
import {EditableTagModule} from '../components/editable-tag/editable-tag.module';
|
import {EditableTagModule} from '../components/editable-tag/editable-tag.module';
|
||||||
import {NzButtonModule, NzCardModule, NzIconModule, NzTabsModule} from "ng-zorro-antd";
|
import {NzButtonModule, NzCardModule, NzIconModule, NzTabsModule} from 'ng-zorro-antd';
|
||||||
|
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ declare var $: any;
|
|||||||
export class EditorMdDirective implements AfterViewInit {
|
export class EditorMdDirective implements AfterViewInit {
|
||||||
|
|
||||||
@Input() editormdConfig: EditorConfig; // 配置选项
|
@Input() editormdConfig: EditorConfig; // 配置选项
|
||||||
@Output() onEditorChange: EventEmitter<string> = new EventEmitter<string>(); // 发射器
|
@Output() editorChange: EventEmitter<string> = new EventEmitter<string>(); // 发射器
|
||||||
editor: any; // editormd编辑器
|
editor: any; // editormd编辑器
|
||||||
|
|
||||||
constructor(@Attribute('id') private id: string) {
|
constructor(@Attribute('id') private id: string) {
|
||||||
@@ -19,7 +19,7 @@ export class EditorMdDirective implements AfterViewInit {
|
|||||||
ngAfterViewInit(): void {
|
ngAfterViewInit(): void {
|
||||||
this.editor = editormd(this.id, this.editormdConfig); // 创建编辑器
|
this.editor = editormd(this.id, this.editormdConfig); // 创建编辑器
|
||||||
|
|
||||||
const out = this.onEditorChange;
|
const out = this.editorChange;
|
||||||
const textarea = $('#' + this.id + ' :first'); // 获取textarea元素
|
const textarea = $('#' + this.id + ' :first'); // 获取textarea元素
|
||||||
|
|
||||||
// 当编辑器内容改变时,触发textarea的change事件
|
// 当编辑器内容改变时,触发textarea的change事件
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<button nz-button nzType="primary" id="submit" (click)="articleSubmit()">提交</button>
|
<button nz-button nzType="primary" id="submit" (click)="articleSubmit()">提交</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="md" appEditorMd [editormdConfig]="conf" (onEditorChange)="syncModel($event)">
|
<div id="md" appEditorMd [editormdConfig]="conf" (editorChange)="syncModel($event)">
|
||||||
<textarea style="display: block;" [(ngModel)]="article.mdContent"></textarea>
|
<textarea style="display: block;" [(ngModel)]="article.mdContent"></textarea>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -22,4 +22,4 @@
|
|||||||
</c-publish-form>
|
</c-publish-form>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
|
|
||||||
</nz-modal>
|
</nz-modal>
|
||||||
|
|||||||
Reference in New Issue
Block a user