mirror of
https://github.com/openharmony/developtools_ace-ets2bundle.git
synced 2026-07-19 16:43:34 -04:00
!1053 ut适配@watch不回调
Merge pull request !1053 from yfwang6/cherry-pick-1662035553
This commit is contained in:
+2
-2
@@ -53,8 +53,8 @@ let envLang = AppStorage.Prop('languageCode');
|
||||
class MyComponent extends View {
|
||||
constructor(compilerAssignedUniqueChildId, parent, params) {
|
||||
super(compilerAssignedUniqueChildId, parent);
|
||||
this.__varA = AppStorage.GetOrCreate().setAndLink('varA', 2, this);
|
||||
this.__lang = AppStorage.GetOrCreate().setAndProp('languageCode', 'en', this);
|
||||
this.__varA = AppStorage.SetAndLink('varA', 2, this, "varA");
|
||||
this.__lang = AppStorage.SetAndProp('languageCode', 'en', this, "lang");
|
||||
this.label = 'count';
|
||||
this.updateWithValueParams(params);
|
||||
}
|
||||
|
||||
+2
-2
@@ -53,8 +53,8 @@ let envLang = AppStorage.Prop('languageCode');
|
||||
class MyComponent extends View {
|
||||
constructor(compilerAssignedUniqueChildId, parent, params) {
|
||||
super(compilerAssignedUniqueChildId, parent);
|
||||
this.__varA = AppStorage.GetOrCreate().setAndLink('varA', 2, this);
|
||||
this.__lang = AppStorage.GetOrCreate().setAndProp('languageCode', 'en', this);
|
||||
this.__varA = AppStorage.SetAndLink('varA', 2, this, "varA");
|
||||
this.__lang = AppStorage.SetAndProp('languageCode', 'en', this, "lang");
|
||||
this.label = 'count';
|
||||
this.updateWithValueParams(params);
|
||||
}
|
||||
|
||||
+2
-2
@@ -53,8 +53,8 @@ let envLang = AppStorage.Prop('languageCode');
|
||||
class MyComponent extends View {
|
||||
constructor(compilerAssignedUniqueChildId, parent, params) {
|
||||
super(compilerAssignedUniqueChildId, parent);
|
||||
this.__varA = AppStorage.GetOrCreate().setAndLink('varA', 2, this);
|
||||
this.__lang = AppStorage.GetOrCreate().setAndProp('languageCode', 'en', this);
|
||||
this.__varA = AppStorage.SetAndLink('varA', 2, this, "varA");
|
||||
this.__lang = AppStorage.SetAndProp('languageCode', 'en', this, "lang");
|
||||
this.label = 'count';
|
||||
this.updateWithValueParams(params);
|
||||
}
|
||||
|
||||
@@ -72,9 +72,9 @@ exports.expectResult =
|
||||
this.__totalPurchase = new ObservedPropertySimple(0, this, "totalPurchase");
|
||||
this.__defArray = new ObservedPropertyObject(['c', 'g', 't', 'z'], this, "defArray");
|
||||
this.__resultTip = new ObservedPropertySimple('', this, "resultTip");
|
||||
this.updateWithValueParams(params);
|
||||
this.declareWatch("shopBasket", this.onBasketUpdated);
|
||||
this.declareWatch("defArray", this.onPutItem);
|
||||
this.updateWithValueParams(params);
|
||||
}
|
||||
updateWithValueParams(params) {
|
||||
if (params.shopBasket !== undefined) {
|
||||
|
||||
Reference in New Issue
Block a user