-
Notifications
You must be signed in to change notification settings - Fork 65
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(okam-core): fix baidu swan app custom component event object argu…
…ment
- Loading branch information
Showing
4 changed files
with
38 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,14 @@ | ||
/** | ||
* @file Create swan component instance | ||
* Notice: Using swan custom component, suggest swan-core version `>=1.12` | ||
* @author [email protected] | ||
*/ | ||
|
||
'use strict'; | ||
|
||
import {createComponent} from '../helper/factory'; | ||
import {normalizeComponent} from '../helper/component'; | ||
import {normalizeEventArgs} from './helper/triggerEvent'; | ||
import {normalizeEventArgs, fixEventObject} from './helper/triggerEvent'; | ||
import componentBase from '../base/component'; | ||
|
||
/** | ||
|
@@ -20,6 +21,14 @@ componentBase.methods.__beforeEmit = function (args) { | |
return normalizeEventArgs(this, args); | ||
}; | ||
|
||
/** | ||
* Fix swan 1.12 event arguments upgrade | ||
* | ||
* @param {Object} event the event object | ||
* @return {Object} the new event object | ||
*/ | ||
componentBase.methods.__beforeEventProxy = fixEventObject; | ||
|
||
/** | ||
* Create component instance | ||
* | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters