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/22 07:36:22 UTC
[4/5] incubator-weex git commit: * [test] update tc,
bugfix mask not supported
* [test] update tc,bugfix mask not supported
Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/55bc0911
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/55bc0911
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/55bc0911
Branch: refs/heads/0.16-dev
Commit: 55bc0911ba196666816f26a6fe49dd7f7e966dc6
Parents: 2744d66
Author: gurisxie <27...@qq.com>
Authored: Mon Aug 21 16:27:37 2017 +0800
Committer: gurisxie <27...@qq.com>
Committed: Mon Aug 21 16:27:37 2017 +0800
----------------------------------------------------------------------
test/pages/components/switch-event.vue | 7 ++++---
test/pages/include/wxc-desc.vue | 27 ++++++++++++++++++++-------
2 files changed, 24 insertions(+), 10 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/55bc0911/test/pages/components/switch-event.vue
----------------------------------------------------------------------
diff --git a/test/pages/components/switch-event.vue b/test/pages/components/switch-event.vue
index 65bbf5a..9629a6f 100644
--- a/test/pages/components/switch-event.vue
+++ b/test/pages/components/switch-event.vue
@@ -11,11 +11,12 @@
<wxc-desc>
<text class='desc'>
测试点:
- *
+ * switch组件change回调事件是否正常
测试方式:
- *
- *
+ * 默认switch组件为关闭状态,
+ * 点击switch组件,判断回调事件中组件状态
+ * 再次点击switch组件,判断回调事件中组件状态
</text>
</wxc-desc>
</div>
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/55bc0911/test/pages/include/wxc-desc.vue
----------------------------------------------------------------------
diff --git a/test/pages/include/wxc-desc.vue b/test/pages/include/wxc-desc.vue
index ccb4593..94f429f 100644
--- a/test/pages/include/wxc-desc.vue
+++ b/test/pages/include/wxc-desc.vue
@@ -3,23 +3,36 @@
<div class='desc'>
<button type="info" size="middle" value="测试描述" @click.native="show"></button>
</div>
- <mask class="mask" v-if="shown" @click="hide">
+ <div class="mask" :style='maskStyle' v-if="shown" @click="hide">
<div class="content" @click="divclick">
- <text class='h3'>测试描述:</text>
+ <text class='h3'>测试描述:{{hello}}</text>
<text class='tips'>点击遮罩层可关闭!</text>
<slot></slot>
</div>
- </mask>
+ </div>
</div>
</template>
<script>
module.exports = {
+ mounted:function(){
+ var h = weex.config.env.deviceHeight;
+ this.maskStyle.height = (h-100) +'px'
+ this.maskStyle.top = (250 - h) +'px'
+ },
components: {
button: require('./button.vue')
},
- data : {
- shown:false
+ data: function () {
+ return {
+ shown:false,
+ maskStyle:{
+ left:'-430px',
+ top:'-1100px',
+ height:'0px'
+ },
+ hello:''
+ }
},
methods : {
show : function(e) {
@@ -38,8 +51,8 @@
.mask{
background-color: #cccccc;
position:absolute;
- left:20;
- top:20;
+ left:-430;
+ top:-1100;
width:710;
}
.content{