1.在VS2022中的cs文件中设置新属性(公式选择)
[DisplayName("目标文件夹")]
[FormulaProperty]
public object DestinationFolder
{
get; set;
}
问:如何在js文件中取到DestinationFolder的值?
我试着这么做
var element = this.CellElement;
var cellTypeMetaData = element.CellType;
console.log(this.evaluateFormula(cellTypeMetaData.DestinationFolder));
但运行显示null.
2.我想在js文件中设置单元格的值
testCellStyle.prototype.onLoad = function () {
let inp = document.getElementById('fileInp');
inp.onchange = function (e) {
this.setValueToElement(this ,'aaaaaa')
}
}
但出错
Uncaught TypeError: this.setValueToElement is not a function.