law.vue 517 B

12345678910111213141516171819202122
  1. <!-- -->
  2. <template>
  3. <div v-for="(i, index) in 27" class="item">
  4. <img :src="getImageUrl(index)" alt="" />
  5. <!-- <img :src="`@/assets/images/law/${index}.jpg`" alt="" /> -->
  6. </div>
  7. </template>
  8. <script setup>
  9. import { reactive, ref, toRefs, onBeforeMount, onMounted } from 'vue';
  10. const getImageUrl = (index) => {
  11. return new URL(`/src/assets/images/law/${index + 1}.jpg`, import.meta.url).href;
  12. };
  13. </script>
  14. <style lang="scss" scoped>
  15. .item {
  16. img {
  17. width: 100%;
  18. }
  19. }
  20. </style>