feat: v1.0.0 祀梦笔记:从 0 到 1 的数字化花园建设

This commit is contained in:
祀梦
2026-01-09 10:03:40 +08:00
commit a5fd8545f4
75 changed files with 15529 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
<template>
<img :src="imageSrc" :alt="alt" v-bind="$attrs" />
</template>
<script setup>
import { computed } from 'vue'
const props = defineProps({
src: {
type: String,
required: true
},
alt: {
type: String,
default: ''
}
})
// 使用 Vite 的 import.meta.glob 或简单字符串拼接
// 由于别名在运行时不可直接动态拼接,我们这里使用一个更稳妥的方法
// 映射到我们配置好的别名
const imageSrc = computed(() => {
// 处理路径,确保指向别名
const path = props.src.startsWith('/') ? props.src.slice(1) : props.src
return new URL(`../../../resources/${path}`, import.meta.url).href
})
</script>