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 committed Jun 29, 2023
1 parent 773b30f commit 5560421
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions packages/hippy-vue-next/src/runtime/element/hippy-element.ts
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 { EventMethod } from '../../util/event';
Expand Down Expand Up @@ -203,6 +204,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 @@ -226,13 +230,11 @@ export class HippyElement extends HippyNode {
this.classList = new Set();
this.attributes = {};
this.style = {};
this.beforeLoadStyle = getBeforeLoadStyle();
// hack special problems
this.hackSpecialIssue();
}

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

/**
* get component info
*/
Expand Down

0 comments on commit 5560421

Please sign in to comment.