init project
This commit is contained in:
104
miniprogram/pages/main/journal-creater/index.wxml
Normal file
104
miniprogram/pages/main/journal-creater/index.wxml
Normal file
@ -0,0 +1,104 @@
|
||||
<!--pages/main/journal-creater/index.wxml-->
|
||||
<t-navbar title="新纪录">
|
||||
<text slot="left" bindtap="cancel">取消</text>
|
||||
</t-navbar>
|
||||
<scroll-view
|
||||
class="container"
|
||||
type="custom"
|
||||
scroll-y
|
||||
show-scrollbar="{{false}}"
|
||||
scroll-into-view="{{intoView}}"
|
||||
>
|
||||
<view class="content">
|
||||
<view class="section">
|
||||
<textarea
|
||||
class="idea"
|
||||
placeholder="这一刻的想法..."
|
||||
model:value="{{idea}}"
|
||||
/>
|
||||
</view>
|
||||
<view class="section time">
|
||||
<text class="label">时间:</text>
|
||||
<picker class="picker" mode="date" model:value="{{date}}">
|
||||
<view class="picker">
|
||||
{{date}}
|
||||
</view>
|
||||
</picker>
|
||||
<picker class="picker" mode="time" model:value="{{time}}">
|
||||
<view class="picker">
|
||||
{{time}}
|
||||
</view>
|
||||
</picker>
|
||||
</view>
|
||||
<view class="section location">
|
||||
<text class="label">位置:</text>
|
||||
<text wx:if="{{location}}" bind:tap="chooseLocation">{{location.text}}</text>
|
||||
<text wx:else bind:tap="chooseLocation">选择位置..</text>
|
||||
</view>
|
||||
<view class="section media">
|
||||
<view class="ctrl">
|
||||
<t-button
|
||||
class="select"
|
||||
theme="primary"
|
||||
plain="true"
|
||||
disabled="{{isSubmitting}}"
|
||||
bind:tap="addMedia"
|
||||
>选择照片/视频</t-button>
|
||||
<t-button
|
||||
class="clear"
|
||||
theme="danger"
|
||||
variant="outline"
|
||||
disabled="{{isSubmitting}}"
|
||||
bind:tap="clearMedia"
|
||||
disabled="{{mediaList.length === 0}}"
|
||||
>清空已选</t-button>
|
||||
</view>
|
||||
<view class="gallery">
|
||||
<block wx:for="{{mediaList}}" wx:key="index">
|
||||
<view class="item">
|
||||
<!-- 图片 -->
|
||||
<image
|
||||
wx:if="{{item.type === mediaItemTypeEnum.IMAGE}}"
|
||||
src="{{item.path}}"
|
||||
class="thumbnail"
|
||||
mode="aspectFill"
|
||||
bindtap="preview"
|
||||
data-index="{{index}}"
|
||||
></image>
|
||||
<!-- 视频 -->
|
||||
<view wx:if="{{item.type === mediaItemTypeEnum.VIDEO}}" class="video-container">
|
||||
<image
|
||||
src="{{item.thumbPath}}"
|
||||
class="thumbnail"
|
||||
mode="aspectFill"
|
||||
bindtap="preview"
|
||||
data-index="{{index}}"
|
||||
></image>
|
||||
<image class="play-icon" src="/assets/icon/play.png"></image>
|
||||
</view>
|
||||
<!-- 删除 -->
|
||||
<image
|
||||
src="/assets/icon/delete.png"
|
||||
class="delete"
|
||||
bindtap="deleteMedia"
|
||||
data-index="{{index}}"
|
||||
></image>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
<progress
|
||||
wx:if="{{isSubmitting}}"
|
||||
class="progress"
|
||||
percent="{{submitProgress.toFixed(2) * 100}}"
|
||||
show-info
|
||||
stroke-width="4"
|
||||
/>
|
||||
<t-button
|
||||
class="submit"
|
||||
theme="primary"
|
||||
bind:tap="submit"
|
||||
disabled="{{(!idea && mediaList.length === 0) || isSubmitting}}"
|
||||
>{{submitText}}</t-button>
|
||||
</view>
|
||||
</scroll-view>
|
||||
Reference in New Issue
Block a user