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

[23/50] [abbrv] incubator-weex git commit: * [html5] fix v-model binding for textarea.

* [html5] fix v-model binding for textarea.


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

Branch: refs/heads/0.12-dev
Commit: 7de10149906253c0c059fbdc1bcc70cb6bae595f
Parents: 43c9e65
Author: MrRaindrop <te...@gmail.com>
Authored: Sat Mar 25 14:14:44 2017 +0800
Committer: MrRaindrop <te...@gmail.com>
Committed: Sat Mar 25 14:14:44 2017 +0800

----------------------------------------------------------------------
 html5/render/vue/components/input.js    | 9 ---------
 html5/render/vue/components/textarea.js | 2 +-
 html5/render/vue/mixins/input-common.js | 6 ++++++
 3 files changed, 7 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/7de10149/html5/render/vue/components/input.js
----------------------------------------------------------------------
diff --git a/html5/render/vue/components/input.js b/html5/render/vue/components/input.js
index 828fea7..22a600c 100644
--- a/html5/render/vue/components/input.js
+++ b/html5/render/vue/components/input.js
@@ -35,15 +35,6 @@ export default {
     returnKeyType: String
   },
 
-  methods: {
-    focus () {
-      this.$el && this.$el.focus()
-    },
-    blur () {
-      this.$el && this.$el.blur()
-    }
-  },
-
   render (createElement) {
     /* istanbul ignore next */
     // if (process.env.NODE_ENV === 'development') {

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/7de10149/html5/render/vue/components/textarea.js
----------------------------------------------------------------------
diff --git a/html5/render/vue/components/textarea.js b/html5/render/vue/components/textarea.js
index 8cd101f..c419642 100644
--- a/html5/render/vue/components/textarea.js
+++ b/html5/render/vue/components/textarea.js
@@ -43,6 +43,6 @@ export default {
       },
       on: this.createKeyboardEvent(events),
       staticClass: 'weex-textarea weex-el'
-    }, this.value)
+    })
   }
 }

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/7de10149/html5/render/vue/mixins/input-common.js
----------------------------------------------------------------------
diff --git a/html5/render/vue/mixins/input-common.js b/html5/render/vue/mixins/input-common.js
index 7bd5014..b2d34eb 100644
--- a/html5/render/vue/mixins/input-common.js
+++ b/html5/render/vue/mixins/input-common.js
@@ -11,6 +11,12 @@ const findEnterKeyType = function (key) {
 
 export default {
   methods: {
+    focus () {
+      this.$el && this.$el.focus()
+    },
+    blur () {
+      this.$el && this.$el.blur()
+    },
     // support enter key envent
     createKeyboardEvent (events) {
       const customKeyType = this.returnKeyType