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