* [html5] fix updating rendering without processing children's render function.


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

Branch: refs/heads/0.12-dev
Commit: 944e9b18ac2322e3c23e0f5148626d0d2fae90e1
Parents: 91468cf
Author: MrRaindrop <tekk...@gmail.com>
Authored: Tue Apr 18 16:18:58 2017 +0800
Committer: MrRaindrop <tekk...@gmail.com>
Committed: Tue Apr 18 16:18:58 2017 +0800

----------------------------------------------------------------------
 html5/render/vue/mixins/base.js | 25 +++++++++++++++++++++++--
 1 file changed, 23 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/944e9b18/html5/render/vue/mixins/base.js
----------------------------------------------------------------------
diff --git a/html5/render/vue/mixins/base.js b/html5/render/vue/mixins/base.js
index 0bfd2ad..c8185d5 100644
--- a/html5/render/vue/mixins/base.js
+++ b/html5/render/vue/mixins/base.js
@@ -16,8 +16,22 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-import { getThrottleLazyload, watchAppear } from '../utils'
-import { tagBeforeCreate, tagMounted, tagBeforeUpdate, tagUpdated, tagBegin, 
tagEnd } from '../utils/perf'
+import {
+  getThrottleLazyload,
+  watchAppear,
+  toCSSText
+} from '../utils'
+
+import {
+  tagBeforeCreate,
+  tagMounted,
+  tagBeforeUpdate,
+  tagUpdated,
+  tagBegin,
+  tagEnd
+} from '../utils/perf'
+
+import { extractComponentStyle } from '../core'
 
 const scrollableTypes = ['scroller', 'list']
 
@@ -67,6 +81,13 @@ export default {
     if (process.env.NODE_ENV === 'development') {
       tagUpdated()
     }
+    if (this.$vnode && this.$vnode.data) {
+      const style = extractComponentStyle(this)
+      const el = this.$el
+      if (style && el && el.nodeType !== 8) {
+        this.$el.style.cssText += toCSSText(style)
+      }
+    }
     watchAppear(this)
   },
 

Reply via email to