ImagPreview.vue 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. <template>
  2. <a-card :bordered="false">
  3. <a-col :span="18">
  4. <a-spin tip="Loading..." :spinning="spinning">
  5. <div>
  6. <a-row>
  7. <a-col :span="18">
  8. <p>
  9. <a-divider orientation="left">组一</a-divider>
  10. </p>
  11. </a-col>
  12. <a-col :span="6"></a-col>
  13. <!-- 预览区域 -->
  14. <a-col :span="12">
  15. <template>
  16. <div v-for="(fileDetail,index) in dataSource[0].fileDetails" :key="index">
  17. <div style="float: left;width:104px;height:104px;margin-right: 10px;margin: 0 8px 8px 0;">
  18. <div
  19. style="width: 100%;height: 100%;position: relative;padding: 8px;border: 1px solid #d9d9d9;border-radius: 4px;">
  20. <img style="width: 100%;" :src="fileDetail.imgUrl" :preview="dataSource[0].key">
  21. </div>
  22. </div>
  23. </div>
  24. </template>
  25. </a-col>
  26. </a-row>
  27. </div>
  28. <div>
  29. <a-row>
  30. <a-col :span="18">
  31. <p>
  32. <a-divider orientation="left">组二</a-divider>
  33. </p>
  34. </a-col>
  35. <a-col :span="6"></a-col>
  36. <!-- 预览区域 -->
  37. <a-col :span="12">
  38. <template>
  39. <div v-for="(fileDetail,index) in dataSource[1].fileDetails" :key="index">
  40. <div style="float: left;width:104px;height:104px;margin-right: 10px;margin: 0 8px 8px 0;">
  41. <div
  42. style="width: 100%;height: 100%;position: relative;padding: 8px;border: 1px solid #d9d9d9;border-radius: 4px;">
  43. <img style="width: 100%;" :src="fileDetail.imgUrl" :preview="dataSource[1].key">
  44. </div>
  45. </div>
  46. </div>
  47. </template>
  48. </a-col>
  49. </a-row>
  50. </div>
  51. </a-spin>
  52. <p></p>
  53. </a-col>
  54. </a-card>
  55. </template>
  56. <script>
  57. import ARow from 'ant-design-vue/es/grid/Row'
  58. export default {
  59. name: 'ImagPreview',
  60. components: {
  61. ARow
  62. },
  63. data() {
  64. return {
  65. description: '电子档补扫页面',
  66. spinning:false,
  67. //数据集
  68. dataSource: [{
  69. key:0,
  70. fileDetails:[
  71. {
  72. imgUrl:"https://ss1.bdstatic.com/70cFvXSh_Q1YnxGkpoWK1HF6hhy/it/u=2735633715,2749454924&fm=27&gp=0.jpg"
  73. },
  74. {
  75. imgUrl:"https://ss0.bdstatic.com/70cFvHSh_Q1YnxGkpoWK1HF6hhy/it/u=3967239004,1951414302&fm=27&gp=0.jpg"
  76. },
  77. {
  78. imgUrl:"https://ss0.bdstatic.com/6Ox1bjeh1BF3odCf/it/u=3660968530,985748925&fm=191&app=48&size=h300&n=0&g=4n&f=JPEG?sec=1853310920&t=5e64af964be378c6c2a3b0acc65dfe24"
  79. }
  80. ]
  81. },{
  82. key:1,
  83. fileDetails:[
  84. {
  85. imgUrl:"https://ss0.bdstatic.com/70cFvHSh_Q1YnxGkpoWK1HF6hhy/it/u=889120611,3801177793&fm=27&gp=0.jpg"
  86. },
  87. {
  88. imgUrl:"https://ss0.bdstatic.com/70cFvHSh_Q1YnxGkpoWK1HF6hhy/it/u=2445468140,2491956848&fm=27&gp=0.jpg"
  89. }
  90. ]
  91. },
  92. ],
  93. url: {
  94. },
  95. }
  96. },
  97. created() {
  98. },
  99. methods: {
  100. }
  101. }
  102. </script>
  103. <style scoped>
  104. .table-operator {
  105. margin-bottom: 10px
  106. }
  107. .clName .ant-tree li span.ant-tree-switcher, .ant-tree li span.ant-tree-iconEle {
  108. width: 10px !important;
  109. }
  110. .clName .ant-tree li .ant-tree-node-content-wrapper.ant-tree-node-selected {
  111. background-color: #1890FF !important;
  112. }
  113. </style>