Browse Source

Merge remote-tracking branch 'origin/master'

yindan 2 năm trước cách đây
mục cha
commit
202767fc56

+ 1 - 2
components/back/back.js

@@ -1,8 +1,7 @@
 Component({
     //使用在自定义头部 导航 沉浸式 显示后退按钮
     properties: {
-        ticketInfo:Object,
-        price:String
+        title: String
     },
     data: {
         backTop: wx.getMenuButtonBoundingClientRect().bottom - wx.getMenuButtonBoundingClientRect().height,

+ 6 - 1
components/back/back.wxml

@@ -1,4 +1,9 @@
 <view class="back" bind:tap="back"
       style="{{'top:'+backTop+'px;height:'+backHeight+'px;'}}">
     <van-icon name="arrow-left" color="black" size="40rpx"/>
-</view>
+</view>
+
+<view class="title" wx:if="{{title}}"
+      style="{{'top:'+backTop+'px;height:'+backHeight+'px;'}}">
+    {{title}}
+</view>

+ 14 - 0
components/back/back.wxss

@@ -8,3 +8,17 @@
     align-items: center;
     z-index: 99;
 }
+
+.title {
+    position: fixed;
+    left: 50%;
+    transform: translateX(-50%);
+    z-index: 99;
+    font-size: 32rpx;
+    font-family: Microsoft YaHei;
+    font-weight: 400;
+    color: #000;
+    display: flex;
+    justify-content: center;
+    align-items: center;
+}

+ 13 - 0
components/expand/expand.js

@@ -0,0 +1,13 @@
+Component({
+    properties: {},
+    data: {
+        expand: false
+    },
+    methods: {
+        toggle() {
+            this.setData({
+                expand: !this.data.expand
+            })
+        }
+    }
+});

+ 5 - 0
components/expand/expand.json

@@ -0,0 +1,5 @@
+{
+  "component": true,
+  "usingComponents": {
+  }
+}

+ 12 - 0
components/expand/expand.wxml

@@ -0,0 +1,12 @@
+<van-transition show="{{ expand }}">
+    <slot></slot>
+</van-transition>
+<view class="more" bindtap="toggle" wx:if="{{!expand}}">
+    展开更多消息
+    <van-icon name="arrow-down" style="margin-left:15rpx"/>
+</view>
+
+<view class="more" bindtap="toggle" wx:else>
+    收起
+    <van-icon name="arrow-up" style="margin-left:15rpx"/>
+</view>

+ 11 - 0
components/expand/expand.wxss

@@ -0,0 +1,11 @@
+.more {
+    display: flex;
+    align-items: center;
+    justify-content: center;
+    font-size: 30rpx;
+    font-family: Microsoft YaHei;
+    font-weight: 400;
+    color: #BEBEBE;
+    margin-top: 40rpx;
+    padding: 15rpx;
+}