| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- <template>
- <view class="imageBoxWrapper">
- <view class="imageBox" v-for="item in file" :key="item.F_UserCode">
- <view v-if="item.F_FileType === '.jpg' || item.F_FileType === '.png'">
- <view class="imageContent">
- <image style="width: 80px; height: 80px;" mode="aspectFit" :src="item.F_FileUrl.replace(/\s+/g, '')"></image>
- </view>
- </view>
- <view v-else class="other">
- <text class="otherContent">{{ item.F_FileName.substring(19) }}</text>
- </view>
- </view>
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- }
- },
- props: {
- file: {
- type: Array,
- default: []
- }
- },
- methods: {
- }
- }
- </script>
- <style lang="scss">
- .imageBoxWrapper {
- display: flex;
- width: 100%;
- flex-wrap: wrap;
- .imageBox {
- width: 25%;
- margin: 0 0 3px 0;
- .other{
- padding: 10px 5px 0 5px;
- text-align: center;
- .otherContent {
- word-wrap: break-word;
- }
- }
- }
- }
- </style>
|