长文图片缩放:编辑器拖拽把手的比例在文章页生效(alt 数字还原为宽度并居中)+ 把手默认半透明提高可发现性
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user