diff --git a/src/style_manager/view/PropertyNumberView.js b/src/style_manager/view/PropertyNumberView.ts similarity index 77% rename from src/style_manager/view/PropertyNumberView.js rename to src/style_manager/view/PropertyNumberView.ts index df9ec19a8..dd4727e14 100644 --- a/src/style_manager/view/PropertyNumberView.js +++ b/src/style_manager/view/PropertyNumberView.ts @@ -1,6 +1,8 @@ import PropertyView from './PropertyView'; export default class PropertyNumberView extends PropertyView { + inputInst?: any; + templateInput() { return ''; } @@ -19,10 +21,10 @@ export default class PropertyNumberView extends PropertyView { const { ppfx, model, el } = this; if (!this.inputInst) { - const { input } = model; + const { input } = model as any; input.ppfx = ppfx; input.render(); - const fields = el.querySelector(`.${ppfx}fields`); + const fields = el.querySelector(`.${ppfx}fields`)!; fields.appendChild(input.el); this.input = input.inputEl.get(0); this.inputInst = input; @@ -30,7 +32,7 @@ export default class PropertyNumberView extends PropertyView { } clearCached() { - PropertyView.prototype.clearCached.apply(this, arguments); + PropertyView.prototype.clearCached.apply(this, arguments as any); this.inputInst = null; } } diff --git a/src/style_manager/view/PropertyView.ts b/src/style_manager/view/PropertyView.ts index bbef2341b..af3e6a88b 100644 --- a/src/style_manager/view/PropertyView.ts +++ b/src/style_manager/view/PropertyView.ts @@ -17,7 +17,6 @@ export default class PropertyView extends View { create?: Function; destroy?: Function; update?: Function; - onRender?: Function; emit?: Function; unset?: Function; clearEl?: HTMLElement; @@ -266,4 +265,6 @@ export default class PropertyView extends View { this.setValue(model.getValue()); return this; } + + onRender() {} }