You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@weex.apache.org by cx...@apache.org on 2017/03/08 09:56:14 UTC
[4/8] incubator-weex git commit: * [ios] update websocket demo
* [ios] update websocket demo
Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/39ea2f3b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/39ea2f3b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/39ea2f3b
Branch: refs/heads/0.11-dev
Commit: 39ea2f3bb6630c6e8c41c19bb568743c7c01c315
Parents: 56443c1
Author: kfeagle <su...@163.com>
Authored: Wed Mar 8 02:36:44 2017 +0800
Committer: kfeagle <su...@163.com>
Committed: Wed Mar 8 02:36:44 2017 +0800
----------------------------------------------------------------------
examples/module/websocket-demo.we | 57 +++++++++++++++++-----------------
1 file changed, 29 insertions(+), 28 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/39ea2f3b/examples/module/websocket-demo.we
----------------------------------------------------------------------
diff --git a/examples/module/websocket-demo.we b/examples/module/websocket-demo.we
index 4fa338c..be58cc2 100644
--- a/examples/module/websocket-demo.we
+++ b/examples/module/websocket-demo.we
@@ -2,7 +2,7 @@
<scroller>
<div>
<div style="background-color: #286090">
- <text class="title" style="height: 80 ;padding: 20;color: #FFFFFF">websocket</text>
+ <text class="title" style="height: 80px ;padding: 20px;color: white">websocket</text>
</div>
<input
type="text"
@@ -19,56 +19,57 @@
<text class="button" onclick="{{send}}">send</text>
<text class="button" onclick="{{close}}">close</text>
</div>
- <div style="background-color: #D3D3D3;margin-top: 20">
- <text class="title" style="height: 80 ;padding: 20;color: #000000">method = send</text>
+ <div style="background-color: lightgray;margin-top: 20px">
+ <text class="title" style="height: 80px ;padding: 20px;color: black">method = send</text>
</div>
- <text style="color: #000000;height: 80">{{sendinfo}}</text>
- <div style="background-color: #D3D3D3">
- <text class="title" style="height: 80 ;padding: 20;color: #000000">method = onopen</text>
+ <text style="color: black;height: 80px">{{sendinfo}}</text>
+ <div style="background-color: lightgray">
+ <text class="title" style="height: 80px ;padding: 20px;color: black">method = onopen</text>
</div>
- <text style="color: #000000;height: 80">{{onopeninfo}}</text>
- <div style="background-color: #D3D3D3">
- <text class="title" style="height: 80 ;padding: 20;color: #000000">method = onmessage</text>
+ <text style="color: black;height: 80px">{{onopeninfo}}</text>
+ <div style="background-color: lightgray">
+ <text class="title" style="height: 80px ;padding: 20px;color: black">method = onmessage</text>
</div>
- <text style="color: #000000;height: 100">{{onmessage}}</text>
- <div style="background-color: #D3D3D3">
- <text class="title" style="height: 80 ;padding: 20;color: #000000">method = onclose</text>
+ <text style="color: black;height: 100px">{{onmessage}}</text>
+ <div style="background-color: lightgray">
+ <text class="title" style="height: 80px ;padding: 20px;color: black">method = onclose</text>
</div>
- <text style="color: #000000;height: 80">{{oncloseinfo}}</text>
- <div style="background-color: #D3D3D3">
- <text class="title" style="height: 80 ;padding: 20;color: #000000">method = onerror</text>
+ <text style="color: black;height: 80px">{{oncloseinfo}}</text>
+ <div style="background-color: lightgray">
+ <text class="title" style="height: 80px ;padding: 20px;color: black">method = onerror</text>
</div>
- <text style="color: #000000;height: 80">{{onerrorinfo}}</text>
- <div style="background-color: #D3D3D3">
- <text class="title" style="height: 80 ;padding: 20;color: #000000">method = close</text>
+ <text style="color: black;height: 80px">{{onerrorinfo}}</text>
+ <div style="background-color: lightgray">
+ <text class="title" style="height: 80px ;padding: 20px;color: black">method = close</text>
</div>
- <text style="color: #000000;height: 80">{{closeinfo}}</text>
+ <text style="color: black;height: 80px">{{closeinfo}}</text>
</div>
</div>
</scroller>
</template>
<style>
.input {
- font-size: 40;
- height: 80;
- width: 600;
+ font-size: 40px;
+ height: 80px;
+ width: 600px;
}
.button {
- font-size: 36;
- width: 150;
+ font-size: 36px;
+ width: 150px;
color: #41B883;
text-align: center;
- padding-top: 10;
- padding-bottom: 10;
- border-width: 2;
+ padding-top: 10px;
+ padding-bottom: 10px;
+ border-width: 2px;
border-style: solid;
- margin-right: 20;
+ margin-right: 20px;
border-color: rgb(162, 217, 192);
background-color: rgba(162, 217, 192, 0.2);
}
</style>
<script>
var websocket = require('@weex-module/webSocket');
+ var navigator = require('@weex-module/navigator');
module.exports = {
data: {
connectinfo: '',