本帖最后由 tiansfather 于 2020-8-27 08:46 编辑
var AutocompleteCellType =function(){}
AutocompleteCellType .prototype=new GC.Spread.Sheets.CellTypes.Base();
AutocompleteCellType .prototype.deactivateEditor=fn
> 我用的vue的element的组件
createEditorElement() {
let input = document.createElement("input");
input.id = "Autocomplete" + Vue.prototype.$$.newid();
return input;
}
handleInput() {
console.log(arguments);
}
activateEditor(editorContext) {
this.vm = new ColReferenceIns({
propsData: {
column: this.column,
value: "",
handleInput: this.handleInput,
},
}).$mount(editorContext);
}
deactivateEditor(editorContext, context) {
console.log(this.vm.$destroy);
this.vm.$destroy();
spreadNS.CellTypes.Base.prototype.deactivateEditor.call(this, editorContext, context);
}
-----------------------------------
这个deactivateEditor的触发时机什么时候
如图所见,我无法销毁这个select,这个console.log也不会触发
示例可见 http://jsrun.net/BELKp/edit 的js部分 |
|