我正在尝试从 lit 元素 hasChanged 方法调用一个函数,但它给出了未定义的
static get properties() {
let dis=this;
return {
projeid:{type:Number},
_arr:{type:Array},
_input_obj: {type: Object},
_funksiyalar:{type:Object},
input_objectler_array:
{
type:Array,
hasChanged:function(newVal,oldVal){
console.log(dis._funksiyalar);
return true;
}
}
}
}
constructor() {
super();
this._arr = ["No:", "Aciqlama", "Vahid", "Miqdar", "Vahidin Qiymeti", "Toplam"];
this._input_obj=this._arr.reduce((o, key) => Object.assign(o, {[key]: ""},{detaylar:[]}), {});
this.input_objectler_array=[];
this._funksiyalar={
Objectler_Array_hasChanged(newVal) {
let event = new CustomEvent("array-updated", {
detail: {
array: newVal
}
});
this.dispatchEvent(event);
}
};
}
我如何从 lit-element hasChanged 方法中获取属性或方法?