-
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.
feat(okam-core): add mixin,broadcast,ref,data,watch,filter support fo…
…r quick app
- Loading branch information
Showing
23 changed files
with
1,271 additions
and
195 deletions.
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
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 |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/** | ||
* @file Make the page component support behavior/mixin | ||
* @author [email protected] | ||
*/ | ||
|
||
'use strict'; | ||
|
||
import {initBehaviors} from '../helper'; | ||
import {getStrategyConfig} from '../strategy'; | ||
|
||
let strategyConf; | ||
|
||
export default { | ||
|
||
/** | ||
* Initialize the behavior plugin | ||
* | ||
* @param {Object} options the plugin options | ||
*/ | ||
init(options) { | ||
strategyConf = getStrategyConfig(options); | ||
}, | ||
|
||
component: { | ||
|
||
/** | ||
* The instance initialize before the instance is created. | ||
* | ||
* @private | ||
* @param {boolean} isPage whether is page component initialization | ||
*/ | ||
$init(isPage) { | ||
initBehaviors(this, isPage, strategyConf); | ||
} | ||
} | ||
}; |
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
Oops, something went wrong.