长文图片缩放:编辑器拖拽把手的比例在文章页生效(alt 数字还原为宽度并居中)+ 把手默认半透明提高可发现性

This commit is contained in:
Sakurasan
2026-09-28 23:05:08 +08:00
parent a74299d716
commit b93fe9847c
4 changed files with 25 additions and 5 deletions
+2 -2
View File
@@ -9,7 +9,7 @@ import LinkCard from '../components/LinkCard.vue'
import { openLightbox } from '../lightbox'
import { publicApi } from '../api'
import { site, applyDocTitle } from '../site'
import { formatDate, minutesLabel, sanitizeHtml } from '../utils'
import { applyImageRatio, formatDate, minutesLabel, sanitizeHtml } from '../utils'
const route = useRoute()
const post = ref(null)
@@ -42,7 +42,7 @@ async function load() {
try {
post.value = await publicApi.post(route.params.slug)
const prepared = withHeadingIds(post.value.content_html)
contentHtml.value = prepared.html
contentHtml.value = applyImageRatio(prepared.html)
headings.value = prepared.headings
applyDocTitle(post.value.kind === 'short' ? '短文' : post.value.title)
} catch (e) {