fix(view): nodeid call init

This commit is contained in:
yanmao 2021-11-04 10:23:20 +08:00
parent 448e33810f
commit 1f28faf858
1 changed files with 4 additions and 2 deletions

View File

@ -94,6 +94,7 @@ class View implements ViewInterface {
this.list.init(); this.list.init();
this.card.init(this.options.cards || []); this.card.init(this.options.cards || []);
this.plugin.init(this.options.plugins || [], this.options.config || {}); this.plugin.init(this.options.plugins || [], this.options.config || {});
this.nodeId.init();
} }
on(eventType: string, listener: EventListener, rewrite?: boolean) { on(eventType: string, listener: EventListener, rewrite?: boolean) {
@ -114,8 +115,9 @@ class View implements ViewInterface {
const parser = new Parser(content, this); const parser = new Parser(content, this);
const value = parser.toValue(this.schema, this.conversion, false, true); const value = parser.toValue(this.schema, this.conversion, false, true);
this.container.html(value); this.container.html(value);
this.card.render(); this.card.render(this.container, () => {
if (trigger) this.trigger('render', this.container); if (trigger) this.trigger('render', this.container);
});
} }
messageSuccess(message: string) { messageSuccess(message: string) {