-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch '0.5.0' of https://github.com/alibaba/weex into 0.5.0
* '0.5.0' of https://github.com/alibaba/weex: * [example] rm hack `margin-bottom:1px` + [doc] Add animation document + [example] add template * [doc] add screenCapture for each ui component Fetch max-width from CSSStyle if width is undefined. This may cause potential issues as max-width is not fully implemented in css-layout. Refer to facebook/react-native#4644 * [example] rm unnecessary config
- Loading branch information
Showing
8 changed files
with
126 additions
and
46 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
## WXAnimationModule | ||
Built-in module for animaiton. One can invoke `transition(id, options, callback)` in JavaScript to activate an animaiton. | ||
|
||
* **id** the id of the element to be animatied. | ||
* **options** Property value of animaiton. The animation will start from current property to the given property. Refer the following for example. | ||
|
||
styles: { | ||
color: ‘#FF0000’, | ||
transform: ‘translate(1, 1)’ | ||
}, | ||
duration: 0, //ms | ||
timingFunction: ’ease’, | ||
transform-origin: 'center center', | ||
delay: 0 //ms | ||
|
||
* **style** the expected property value when the animation finished. | ||
* color, the color of the element when the animaiton finished. | ||
* transform, transform fuction to be applied to the element. Following value is supported. | ||
* **translate, translateX, translateY** translate the element to a new location. The value an be pixel or percent | ||
* **rotate** the unit is degree. | ||
* **scale** scale up or scale down the element. | ||
* **duration** Duration that the animation last. | ||
* **timingFuncion** can be one of *ease-in*, *ease-out*, *ease-in-out*, *linear* | ||
* **delay** Delay time before the animation starts. | ||
* **transform-origin** the center of scale and rotation. The value can be pixel or keywords(left, right, bottom, top, center). If keywords is ever given, it must be in **X,Y** order. | ||
* **callback** the callback function to be executed when the animation finished. |
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,22 @@ | ||
<template> | ||
<scroller> | ||
<ui-tip type="success" value="It's a weex example template."></ui-tip> | ||
|
||
<ui-panel title="Dialog" type="primary"> | ||
<ui-hn level="1" value="H1"></ui-hn> | ||
<ui-button type="primary" click="{{toast}}" value="Toast"></ui-button> | ||
<ui-hn level="2" value="H3"></ui-hn> | ||
<ui-button type="warning" click="{{toast}}" value="Toast"></ui-button> | ||
</ui-panel> | ||
</scroller> | ||
</template> | ||
|
||
<script> | ||
module.exports = { | ||
methods: { | ||
toast: function() { | ||
this.$call('modal', 'toast', {'message': 'a toast', 'duration': 2}); | ||
} | ||
} | ||
} | ||
</script> |
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 |
---|---|---|
|
@@ -7,7 +7,8 @@ | |
<script> | ||
module.exports = { | ||
data: { | ||
level: 1 | ||
level: 1, | ||
value: '' | ||
}, | ||
methods: {} | ||
} | ||
|
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