You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@weex.apache.org by ac...@apache.org on 2017/07/28 04:27:09 UTC

[1/3] incubator-weex git commit: + [ios] add picker demo

Repository: incubator-weex
Updated Branches:
  refs/heads/0.16-dev e766955fa -> 495fc6b24


+ [ios] add picker 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/b363db8a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/b363db8a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/b363db8a

Branch: refs/heads/0.16-dev
Commit: b363db8a965d8d91ee71331024b0b14fbb46e91c
Parents: 9c3011d
Author: 齐山 <su...@163.com>
Authored: Thu Jul 27 11:24:07 2017 +0800
Committer: 齐山 <su...@163.com>
Committed: Thu Jul 27 11:24:07 2017 +0800

----------------------------------------------------------------------
 examples/vue/index.vue          |  1 +
 examples/vue/modules/picker.vue | 10 ++++++++++
 2 files changed, 11 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/b363db8a/examples/vue/index.vue
----------------------------------------------------------------------
diff --git a/examples/vue/index.vue b/examples/vue/index.vue
index ebea3ad..621488d 100644
--- a/examples/vue/index.vue
+++ b/examples/vue/index.vue
@@ -37,6 +37,7 @@
           {name: root + '/modules/webSocket', title: 'WebSocket'},
           {name: root + '/modules/stream', title: 'Stream'},
           {name: root + '/modules/storage',title:'Storage'},
+          {name: root + '/modules/picker',title:'picker'},
           // {name: 'module/clipboard', title: 'Clipboard'}, // 0.8 , developing
 
           // showcase

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/b363db8a/examples/vue/modules/picker.vue
----------------------------------------------------------------------
diff --git a/examples/vue/modules/picker.vue b/examples/vue/modules/picker.vue
new file mode 100644
index 0000000..f7e5884
--- /dev/null
+++ b/examples/vue/modules/picker.vue
@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+    <meta charset="UTF-8">
+    <title>$Title$</title>
+</head>
+<body>
+$END$
+</body>
+</html>
\ No newline at end of file


[3/3] incubator-weex git commit: Merge branch 'ios-picker-0.16-dev' of https://github.com/kfeagle/incubator-weex into wip-us-0.16-dev

Posted by ac...@apache.org.
Merge branch 'ios-picker-0.16-dev' of https://github.com/kfeagle/incubator-weex into wip-us-0.16-dev


Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/495fc6b2
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/495fc6b2
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/495fc6b2

Branch: refs/heads/0.16-dev
Commit: 495fc6b24239fc16ff0bdc4a6090f7e533d772e9
Parents: e766955 4e57f4f
Author: acton393 <zh...@gmail.com>
Authored: Fri Jul 28 12:26:25 2017 +0800
Committer: acton393 <zh...@gmail.com>
Committed: Fri Jul 28 12:26:25 2017 +0800

----------------------------------------------------------------------
 examples/vue/index.vue          |  1 +
 examples/vue/modules/picker.vue | 97 ++++++++++++++++++++++++++++++++++++
 2 files changed, 98 insertions(+)
----------------------------------------------------------------------



[2/3] incubator-weex git commit: + [ios] add picker demo

Posted by ac...@apache.org.
+ [ios] add picker 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/4e57f4f2
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/4e57f4f2
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/4e57f4f2

Branch: refs/heads/0.16-dev
Commit: 4e57f4f2e0c81a0a0fcccbb447695f2e545eea2c
Parents: b363db8
Author: 齐山 <su...@163.com>
Authored: Thu Jul 27 11:25:58 2017 +0800
Committer: 齐山 <su...@163.com>
Committed: Thu Jul 27 11:25:58 2017 +0800

----------------------------------------------------------------------
 examples/vue/modules/picker.vue | 107 +++++++++++++++++++++++++++++++----
 1 file changed, 97 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/4e57f4f2/examples/vue/modules/picker.vue
----------------------------------------------------------------------
diff --git a/examples/vue/modules/picker.vue b/examples/vue/modules/picker.vue
index f7e5884..0750fc3 100644
--- a/examples/vue/modules/picker.vue
+++ b/examples/vue/modules/picker.vue
@@ -1,10 +1,97 @@
-<!DOCTYPE html>
-<html lang="en">
-<head>
-    <meta charset="UTF-8">
-    <title>$Title$</title>
-</head>
-<body>
-$END$
-</body>
-</html>
\ No newline at end of file
+<template>
+    <scroller>
+        <div title="picker module" type="primary">
+            <text style="margin-bottom: 20px;">pick value: {{value}}</text>
+            <text type="primary" class="button" @click="pick" value="single pick" style="margin-bottom: 20px;"></text>
+            <text type="primary" class="button" @click="pickDate" value="pickDate" style="margin-bottom: 20px;"></text>
+            <text type="primary" class="button" @click="pickTime" value="pickTime"></text>
+        </div>
+
+        <div title="input component" type="primary">
+            <text>onchange: {{txtChange}}</text>
+            <input type="date" placeholder="select date" class="input" autofocus="false" value="" @change="onchange" max="2029-11-28" min="2015-11-28"/>
+            <input type="time" placeholder="select time" class="input" autofocus="false" value="" @change="onchange"/>
+        </div>
+    </scroller>
+</template>
+
+<style scoped>
+    .input {
+        font-size: 60px;
+        height: 80px;
+        width: 400px;
+    }
+    .button {
+        font-size: 36;
+        width: 200;
+        color: #41B883;
+        text-align: center;
+        padding-top: 10;
+        padding-bottom: 10;
+        border-width: 2;
+        border-style: solid;
+        margin-right: 20;
+        border-color: rgb(162, 217, 192);
+        background-color: rgba(162, 217, 192, 0.2);
+    }
+</style>
+
+<script>
+    module.exports = {
+
+        data: function () {
+            return {
+                value: '',
+                index: '',
+                txtChange: ''
+            };
+        },
+        methods: {
+            pick: function () {
+                var picker = require('@weex-module/picker');
+                var items = new Array("Saab", "Volvo", "BMW");
+                var self = this;
+                picker.pick({
+                    'items': items,
+                    'index': self.index
+                }, function (ret) {
+                    var result = ret.result;
+                    if (result == 'success') {
+                        self.value = items[ret.data];
+                        self.index = ret.data;
+                    }
+                });
+            },
+            pickDate: function () {
+                var picker = require('@weex-module/picker');
+                var self = this;
+                picker.pickDate({
+                    'value': '2016-11-28',
+                    'max': '2029-11-28',
+                    'min': '2015-11-28'
+                }, function (ret) {
+                    var result = ret.result;
+                    if (result == 'success') {
+                        self.value = ret.data;
+                    }
+                });
+            },
+            pickTime: function () {
+                var picker = require('@weex-module/picker');
+                var self = this;
+                picker.pickTime({
+                    'value': '19:24'
+                }, function (ret) {
+                    var result = ret.result;
+                    if (result == 'success') {
+                        self.value = ret.data;
+                    }
+                });
+            },
+            onchange: function (event) {
+                this.txtChange = event.value;
+                console.log('onchange', event.value);
+            }
+        }
+    };
+</script>