- cellType.setEditorValue = function (editorContext, value, cell) {
- if (editorContext && editorContext.children.length === 1) {
- if (value || value === 0) {
- var input1 = editorContext.children[0];
- var row = cell.row, col = cell.col;
- var sheet = cell.sheet;
- var text = sheet.getText(row, col);
- input1.value = text;
- var formula = sheet.getFormula(row, col);
- if(formula){
- input1.formula = formula;
- }
- }
- }
- };
复制代码
我用这个确实可以改变编辑的值,但是除非我点进去,真实值在我移出单元格的时候才会发生变化,我用setValue()改变值后;然后输出他的getText(),和getValue(),还是不一样 |