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:50 UTC

[15/50] [abbrv] incubator-weex git commit: * [html5] fix warning.

* [html5] fix warning.


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

Branch: refs/heads/0.12-dev
Commit: 9c305ec0f19e231a1cb1f76832233323c497ece5
Parents: 7b8a6ba
Author: MrRaindrop <te...@gmail.com>
Authored: Thu Mar 23 18:40:42 2017 +0800
Committer: MrRaindrop <te...@gmail.com>
Committed: Thu Mar 23 18:40:42 2017 +0800

----------------------------------------------------------------------
 build/webpack.examples.web.config.js | 8 ++------
 html5/render/vue/mixins/base.js      | 2 +-
 html5/render/vue/mixins/style.js     | 5 ++++-
 3 files changed, 7 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/9c305ec0/build/webpack.examples.web.config.js
----------------------------------------------------------------------
diff --git a/build/webpack.examples.web.config.js b/build/webpack.examples.web.config.js
index 91ed882..e29543f 100644
--- a/build/webpack.examples.web.config.js
+++ b/build/webpack.examples.web.config.js
@@ -75,12 +75,8 @@ module.exports = {
     compilerModules: [
       {
         postTransformNode: el => {
-          if (el.staticStyle) {
-            el.staticStyle = `$processStyle(${el.staticStyle})`
-          }
-          if (el.styleBinding) {
-            el.styleBinding = `$processStyle(${el.styleBinding})`
-          }
+          el.staticStyle = `$processStyle(${el.staticStyle})`
+          el.styleBinding = `$processStyle(${el.styleBinding})`
         }
       }
     ],

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/9c305ec0/html5/render/vue/mixins/base.js
----------------------------------------------------------------------
diff --git a/html5/render/vue/mixins/base.js b/html5/render/vue/mixins/base.js
index 09b5cc9..71d9034 100644
--- a/html5/render/vue/mixins/base.js
+++ b/html5/render/vue/mixins/base.js
@@ -24,7 +24,7 @@ function watchLazyload () {
 }
 
 let warned = false
-const notePage = 'https://github.com/MrRaindrop/weex/blob/html5-feature-vue-render-process-style/build/webpack.examples.web.config.js#L70-L89'
+const notePage = 'https://gist.github.com/MrRaindrop/5a805a067146609e5cfd4d64d775d693#file-weex-vue-render-config-for-vue-loader-js-L2-L16'
 function warnProcessStyle () {
   if (!warned) {
     warned = true

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/9c305ec0/html5/render/vue/mixins/style.js
----------------------------------------------------------------------
diff --git a/html5/render/vue/mixins/style.js b/html5/render/vue/mixins/style.js
index 7338e5d..bb5bfed 100644
--- a/html5/render/vue/mixins/style.js
+++ b/html5/render/vue/mixins/style.js
@@ -71,8 +71,11 @@ export default {
   },
 
   methods: {
-    $processStyle (style, hyphenated) {
+    $processStyle (style) {
       window._style_processing_added = true
+      if (!style) {
+        return
+      }
       if (window._process_style) {
         return window._process_style(style)
       }