Skip to content

Commit

Permalink
fix(vue-next): fix element do not use beforeLoadStyle hooks issue
Browse files Browse the repository at this point in the history
  • Loading branch information
gguoyu authored and zealotchen0 committed Jul 25, 2023
1 parent 3463362 commit 604a231
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ import {
isStyleMatched,
whitespaceFilter,
getBeforeRenderToNative,
getBeforeLoadStyle,
} from '../../util';
import { isRTL } from '../../util/i18n';
import { EventHandlerType, EventMethod } from '../../util/event';
Expand Down Expand Up @@ -231,6 +232,9 @@ export class HippyElement extends HippyNode {
// additional processing of properties
public filterAttribute?: CallbackType;

// style preprocessor
public beforeLoadStyle: CallbackType;

// polyFill of native event
protected polyfillNativeEvents?: (
method: string,
Expand All @@ -255,13 +259,11 @@ export class HippyElement extends HippyNode {
this.attributes = {};
this.style = {};
this.events = {};
this.beforeLoadStyle = getBeforeLoadStyle();
// hack special problems
this.hackSpecialIssue();
}

// style preprocessor
public beforeLoadStyle: CallbackType = val => val;

/**
* get component info
*/
Expand Down

0 comments on commit 604a231

Please sign in to comment.