enterpriseAlbum.vue 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. <!-- 企业相册 -->
  2. <template>
  3. <div v-if="!imgList?.length" class="mt-10 text-center">
  4. <Empty></Empty>
  5. <v-btn prepend-icon="mdi mdi-upload" color="warning mt-10" @click="{}">{{ $t('common.uploadPictures') }}</v-btn>
  6. </div>
  7. <div v-else>
  8. <div><v-btn prepend-icon="mdi mdi-upload" color="warning mb-5" @click="{}">{{ $t('common.uploadPictures') }}</v-btn></div>
  9. <div class="imgItem" v-for="(item, index) in imgList" :key="index">
  10. <v-img width="100%" height="100%" :src="item?.url || defaultUrl"></v-img>
  11. <div class="operate">
  12. <span style="font-size: 14px;">设置为封面</span>
  13. <span class="mdi mdi-trash-can-outline"></span>
  14. </div>
  15. </div>
  16. </div>
  17. </template>
  18. <script setup>
  19. import { ref } from 'vue';
  20. defineOptions({name: 'informationSettingsComponents-enterpriseAlbum'})
  21. const imgList = ref([{ url: false }, { url: 1}])
  22. const defaultUrl = 'https://minio.citupro.com/dev/menduner/7.png'
  23. </script>
  24. <style lang="scss" scoped>
  25. .imgItem {
  26. width: 172px; height: 172px;
  27. border: 1px solid rgba(188, 188, 188, 0.5);
  28. border-radius: 5px;
  29. margin-right: 24px;
  30. margin-bottom: 24px;
  31. display: inline-block;
  32. position: relative;
  33. .operate {
  34. display: none;
  35. }
  36. &:hover {
  37. .operate {
  38. position: absolute;
  39. bottom: 0;
  40. line-height: 32px;
  41. background-color: #00000080;
  42. width: 100%;
  43. display: flex;
  44. justify-content: space-between;
  45. padding: 0 4px;
  46. span {
  47. color: #fff;
  48. cursor: pointer;
  49. }
  50. }
  51. }
  52. }
  53. .mdi-image-broken-variant {
  54. font-size: 24px;
  55. color: rgba(188, 188, 188, 0.8);
  56. }
  57. </style>