@@ -1,8 +1,7 @@
Component({
//使用在自定义头部 导航 沉浸式 显示后退按钮
properties: {
- ticketInfo:Object,
- price:String
+ title: String
},
data: {
backTop: wx.getMenuButtonBoundingClientRect().bottom - wx.getMenuButtonBoundingClientRect().height,
@@ -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}}
@@ -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;
+}
@@ -0,0 +1,13 @@
+Component({
+ properties: {},
+ data: {
+ expand: false
+ },
+ methods: {
+ toggle() {
+ this.setData({
+ expand: !this.data.expand
+ })
+ }
+});
@@ -0,0 +1,5 @@
+{
+ "component": true,
+ "usingComponents": {
@@ -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 class="more" bindtap="toggle" wx:else>
+ 收起
+ <van-icon name="arrow-up" style="margin-left:15rpx"/>
@@ -0,0 +1,11 @@
+.more {
+ font-size: 30rpx;
+ color: #BEBEBE;
+ margin-top: 40rpx;
+ padding: 15rpx;