Files
MaaAssistantArknights/docs/components/Image2.vue
Rbqwow 8a6f121ec3 docs: 重写网页 PR 教程 (#10005)
* docs: 初步重写 PR 网页教程

* chore: Auto update by pre-commit hooks [skip changelog]

* docs: 再加一个按钮

* chore: Auto update by pre-commit hooks [skip changelog]

* fix: 先把图片路径修了

* docs: 不新建分支了

* chore: Auto update by pre-commit hooks [skip changelog]

* docs: 修复坏图片

* docs: 完成英语翻译 | English version completed (translated by gpt)

* chore: Auto update by pre-commit hooks [skip changelog]

* i18n: english tweaks

* i18n: english tweaks

---------

Co-authored-by: 晓丶梦丶仁 <1020623818@qq.com>
Co-authored-by: Constrat <56174894+Constrat@users.noreply.github.com>
2024-08-05 01:01:17 +08:00

47 lines
946 B
Vue

<template>
<div>
<img v-for="src of displayImageList" class="image" :src="src" alt="" />
</div>
</template>
<script lang="ts">
import { PropType, defineComponent } from "vue";
import { withBase } from "vuepress/client";
export default defineComponent({
props: {
imageList: Array as PropType<
Array<{ light: string; dark: string } | string>
>,
},
computed: {
displayImageList() {
return this.imageList.map((item) => {
const src =
typeof item === "string"
? item
: this.$isDarkmode
? item.dark
: item.light;
return withBase(src);
});
},
},
});
</script>
<style scoped>
.image {
box-sizing: border-box;
width: 50%;
padding: 9px;
border-radius: 16px;
}
@media (max-width: 419px) {
.image {
width: auto;
}
}
</style>