mirror of
https://github.com/openharmony/developtools_ace-ets2bundle.git
synced 2026-07-21 03:55:23 -04:00
fixed a48de73 from https://gitee.com/yfwang6/developtools_ace-ets2bundle/pulls/1042
fixed 36835b2 from https://gitee.com/yfwang6/developtools_ace-ets2bundle/pulls/1024
wangyongfei6@huawei.com
watch callback do not trigger
Signed-off-by: yfwang6 <wangyongfei6@huawei.com>
Change-Id: I638e4b1cf0c4c8af9f41071a4e8f5feee4c788c0
This commit is contained in:
@@ -68,9 +68,8 @@ export const INITIALIZE_CONSUME_FUNCTION: string = 'initializeConsume';
|
||||
export const ADD_PROVIDED_VAR: string = 'addProvidedVar';
|
||||
|
||||
export const APP_STORAGE: string = 'AppStorage';
|
||||
export const APP_STORAGE_SET_AND_PROP: string = 'setAndProp';
|
||||
export const APP_STORAGE_SET_AND_LINK: string = 'setAndLink';
|
||||
export const APP_STORAGE_GET_OR_SET: string = 'GetOrCreate';
|
||||
export const APP_STORAGE_SET_AND_PROP: string = 'SetAndProp';
|
||||
export const APP_STORAGE_SET_AND_LINK: string = 'SetAndLink';
|
||||
|
||||
export const PAGE_ENTRY_FUNCTION_NAME: string = 'loadDocument';
|
||||
export const STORE_PREVIEW_COMPONENTS: string = 'storePreviewComponents';
|
||||
|
||||
@@ -168,5 +168,5 @@ export function addConstructor(ctorNode: any, watchMap: Map<string, ts.Node>,
|
||||
ts.factory.createThis(), ts.factory.createIdentifier(COMPONENT_CONSTRUCTOR_UPDATE_PARAMS)),
|
||||
undefined, [ts.factory.createIdentifier(COMPONENT_CONSTRUCTOR_PARAMS)]));
|
||||
return updateConstructor(updateConstructor(ctorNode, [], [callSuperStatement], true), [],
|
||||
[updateWithValueParamsStatement, ...watchStatements], false, true, parentComponentName);
|
||||
[...watchStatements, updateWithValueParamsStatement], false, true, parentComponentName);
|
||||
}
|
||||
|
||||
@@ -43,7 +43,6 @@ import {
|
||||
APP_STORAGE,
|
||||
APP_STORAGE_SET_AND_PROP,
|
||||
APP_STORAGE_SET_AND_LINK,
|
||||
APP_STORAGE_GET_OR_SET,
|
||||
COMPONENT_CONSTRUCTOR_UNDEFINED,
|
||||
SET_CONTROLLER_METHOD,
|
||||
SET_CONTROLLER_CTR,
|
||||
@@ -504,11 +503,9 @@ function updateStoragePropAndLinkProperty(node: ts.PropertyDeclaration, name: ts
|
||||
return ts.factory.createExpressionStatement(ts.factory.createBinaryExpression(
|
||||
createPropertyAccessExpressionWithThis(`__${name.getText()}`),
|
||||
ts.factory.createToken(ts.SyntaxKind.EqualsToken), ts.factory.createCallExpression(
|
||||
ts.factory.createPropertyAccessExpression(ts.factory.createCallExpression(
|
||||
ts.factory.createPropertyAccessExpression(ts.factory.createIdentifier(APP_STORAGE),
|
||||
ts.factory.createIdentifier(APP_STORAGE_GET_OR_SET)), undefined, []),
|
||||
ts.factory.createIdentifier(setFuncName)), undefined, [node.decorators[0].expression.arguments[0],
|
||||
node.initializer, ts.factory.createThis()])));
|
||||
ts.factory.createPropertyAccessExpression(ts.factory.createIdentifier(APP_STORAGE),
|
||||
ts.factory.createIdentifier(setFuncName)), undefined, [node.decorators[0].expression.arguments[0],
|
||||
node.initializer, ts.factory.createThis(), ts.factory.createStringLiteral(name.getText())])));
|
||||
} else {
|
||||
validateAppStorageDecoractorsNonSingleKey(node, log);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user