bigger detail popup
This commit is contained in:
@ -87,6 +87,7 @@
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
height: 61.8vh;
|
||||
z-index: 999;
|
||||
display: flex;
|
||||
position: fixed;
|
||||
|
||||
@ -41,7 +41,6 @@ interface JournalMapData {
|
||||
customCalloutMarkerIds: number[];
|
||||
selectedMarker: JournalMarker | null;
|
||||
isLoading: boolean;
|
||||
detailHeight: number;
|
||||
}
|
||||
|
||||
Page({
|
||||
@ -54,16 +53,9 @@ Page({
|
||||
customCalloutMarkerIds: [],
|
||||
selectedMarker: null,
|
||||
isLoading: true,
|
||||
detailHeight: 0
|
||||
},
|
||||
async onLoad() {
|
||||
await this.loadJournals();
|
||||
// 获取窗口高度,固定详情面板为 1/2 高度
|
||||
const windowInfo = wx.getWindowInfo();
|
||||
const windowHeight = windowInfo.windowHeight;
|
||||
this.setData({
|
||||
detailHeight: windowHeight * 0.5
|
||||
});
|
||||
},
|
||||
/** 加载所有记录 */
|
||||
async loadJournals() {
|
||||
|
||||
@ -31,11 +31,7 @@
|
||||
<cover-view wx:if="{{isLoading}}" class="loading">
|
||||
<cover-view class="loading-text">加载中...</cover-view>
|
||||
</cover-view>
|
||||
<cover-view
|
||||
wx:if="{{selectedMarker}}"
|
||||
class="marker-detail"
|
||||
style="height: {{detailHeight}}px"
|
||||
>
|
||||
<cover-view wx:if="{{selectedMarker}}" class="marker-detail">
|
||||
<cover-view class="detail-content">
|
||||
<cover-view class="header">
|
||||
<cover-view class="info">
|
||||
|
||||
Reference in New Issue
Block a user