新增: OSS 资产库与桌面本地文件读取,交互与云同步增强
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
import { computed } from 'vue'
|
||||
import type { SlideElement, BgKey } from '../../core/types'
|
||||
import { store, resolveColor, isDarkBg } from '../../core/store'
|
||||
import { resolveRef } from '../../core/assets'
|
||||
import { segmentsToHtml, markdownToSegments, hasFormatting } from '../../core/richtext'
|
||||
import ChartView from './ChartView.vue'
|
||||
|
||||
@@ -85,6 +86,9 @@ const boxStyle = computed(() => {
|
||||
|
||||
const dataList = computed(() => (props.el.content || '').split('\n'))
|
||||
|
||||
/** 媒体源解析:把 "asset:<id>" 引用解析为可渲染 URL(本地 ObjectURL 或云端 URL),其余原样 */
|
||||
const mediaSrc = computed(() => resolveRef(props.el.content))
|
||||
|
||||
/** 表格解析 */
|
||||
const tableRows = computed(() => {
|
||||
const lines = (props.el.content || '').split('\n').map(l => l.trim()).filter(Boolean)
|
||||
@@ -272,7 +276,7 @@ function onBlur(e: Event, field: string) {
|
||||
<span class="el-image-empty-icon">🖼</span>
|
||||
<span class="el-image-empty-text">拖入图片 · 属性面板「本地图片」或 AI 配图</span>
|
||||
</div>
|
||||
<img v-else class="el-image" :src="el.content" draggable="false" />
|
||||
<img v-else class="el-image" :src="mediaSrc" draggable="false" />
|
||||
</template>
|
||||
|
||||
<!-- 视频(缩略图端降级静态;preload=metadata 控制加载开销) -->
|
||||
@@ -290,7 +294,7 @@ function onBlur(e: Event, field: string) {
|
||||
<video
|
||||
v-else
|
||||
class="el-video"
|
||||
:src="el.content"
|
||||
:src="mediaSrc"
|
||||
:poster="s.poster || undefined"
|
||||
controls
|
||||
preload="metadata"
|
||||
|
||||
Reference in New Issue
Block a user