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/08/31 14:41:30 UTC

[4/6] incubator-weex git commit: * [test] image tc update

* [test] image tc update


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

Branch: refs/heads/0.16-dev
Commit: c8814a544c775897182b5a76d05430357c8d1b2e
Parents: 9c63033
Author: gurisxie <27...@qq.com>
Authored: Thu Aug 31 17:05:41 2017 +0800
Committer: gurisxie <27...@qq.com>
Committed: Thu Aug 31 17:05:41 2017 +0800

----------------------------------------------------------------------
 test/pages/components/image-resize.vue | 23 +++++++++++++++++------
 1 file changed, 17 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/c8814a54/test/pages/components/image-resize.vue
----------------------------------------------------------------------
diff --git a/test/pages/components/image-resize.vue b/test/pages/components/image-resize.vue
index 69981f3..7ab2dda 100644
--- a/test/pages/components/image-resize.vue
+++ b/test/pages/components/image-resize.vue
@@ -4,13 +4,13 @@
     	<text value='width>height'></text>
     	<div style="flex-direction: row;">
 	      <div class="cell">
-	        <image class="wh200x100 border margin" :src='imgSrc'></image>
+	        <image class="wh200x100 border margin" :src='imgSrc' quality='original' :placeholder='imgSrc' ></image>
 	      </div>
 	      <div class="cell">
-	        <image class="wh200x100 border margin" resize="cover" :src='imgSrc' ></image>
+	        <image class="wh200x100 border margin" :resize="cover" :src='imgSrc' ></image>
 	      </div>
 	      <div class="cell">
-	        <image class="wh200x100 border margin" resize="contain" :src='imgSrc'></image>
+	        <image class="wh200x100 border margin" :resize="contain" :src='imgSrc'></image>
 	      </div>
       </div>
       <text value='width=height'></text>
@@ -52,9 +52,13 @@
 </template>
 <script>
   module.exports = {
-    data : {
-    	imgSrc:"http://gw.alicdn.com/tps/i2/TB1DpsmMpXXXXabaXXX20ySQVXX-512-512.png_200x200.jpg"
-    },
+    data :function(){
+    	return {
+	    	imgSrc:"http://img.alicdn.com/tps/TB1zBLaPXXXXXXeXXXXXXXXXXXX-121-59.svg",
+	    	cover:'stretch',
+	    	contain:'stretch',
+	    }
+    } ,
     components: {
       "wxc-desc":require('../include/wxc-desc.vue'),
       panel: require('../include/panel.vue'),
@@ -62,6 +66,13 @@
       h3: require('../include/h3.vue'),
     },
     methods : {
+    },
+    created:function(){
+    	setTimeout(()=>{
+    		this.cover='cover';
+    		this.contain = 'contain';
+    		this.imgSrc='http://gw.alicdn.com/tps/i2/TB1DpsmMpXXXXabaXXX20ySQVXX-512-512.png_200x200.jpg';
+    	},0);
     }
   }
 </script>