| | |
| | | |
| | | <!-- 附件列表 --> |
| | | <view class="attachment-list"> |
| | | <wd-status-tip v-if="attachmentList.length === 0" image="content" tip="暂无附件" /> |
| | | <wd-status-tip |
| | | v-if="attachmentList.length === 0" |
| | | image="content" |
| | | tip="暂无附件" |
| | | custom-class="status-tip-full" |
| | | /> |
| | | |
| | | <view v-for="(item, index) in attachmentList" :key="item.id || index" class="attachment-card"> |
| | | <view class="media-wrapper" @click="previewAttachment(item)"> |
| | |
| | | const addAttachment = () => { |
| | | // 显示选择文件类型的弹窗 |
| | | uni.showActionSheet({ |
| | | itemList: ["选择图片", "选择视频", "拍照", "录像"], |
| | | itemList: ["选择图片", /* "选择视频", */ "拍照" /* , "录像" */], |
| | | success: (res) => { |
| | | switch (res.tapIndex) { |
| | | case 0: // 选择图片 |
| | | chooseImages(); |
| | | break; |
| | | case 1: // 选择视频 |
| | | chooseVideos(); |
| | | break; |
| | | case 2: // 拍照 |
| | | // case 1: // 选择视频 |
| | | // chooseVideos(); |
| | | // break; |
| | | case 1: // 拍照 |
| | | takePhoto(); |
| | | break; |
| | | case 3: // 录像 |
| | | recordVideo(); |
| | | break; |
| | | // case 3: // 录像 |
| | | // recordVideo(); |
| | | // break; |
| | | } |
| | | }, |
| | | fail: (error) => { |
| | |
| | | grid-template-columns: repeat(3, 1fr); |
| | | gap: 8px; |
| | | |
| | | :deep(.status-tip-full) { |
| | | grid-column: 1 / -1; |
| | | width: 100%; |
| | | } |
| | | |
| | | .attachment-card { |
| | | width: 100%; |
| | | position: relative; |