<!--pages/readingHistory/components/detailModal/index.wxml-->
<van-dialog
  use-slot
  title="详情"
  show="{{ visible }}"
  confirmButtonText="关闭"
  bind:close="onClose"
>
  <view class="modalContentWrapper">
    <van-field
        value="{{ detail.readAt }}"
        label="时间"
        readonly
        border="{{ false }}"
        use-button-slot
        title-width="100rpx"
    >
    </van-field>
    <van-field
        value="{{ detail.overall }}"
        placeholder="请输入读数"
        label="读数"
        readonly
        type="digit"
        border="{{ false }}"
        title-width="100rpx"
    >
    </van-field>
    <van-field
        wx:if="{{!!detail.url}}"
        value="{{ detail.overall }}"
        label="图片"
        readonly
        border="{{ false }}"
        title-width="100rpx"
        use-button-slot
    >
        <view slot="input">
            <van-image 
                width="100" 
                height="100" 
                fit="contain"
                src="{{detail.url}}" 
                bind:click="showImage"
            />
        </view>
    </van-field>
</view>
 
</van-dialog>

<van-popup 
    show="{{ show }}" 
    bind:close="onClose"
    z-index="99999"
>
    <van-image 
        width="100vw"
        height="99.1vh"
        fit="contain"
        src="{{detail.url}}" 
        bind:click="onClose"
    />
</van-popup>