jvs-ppt-ui 0.0.6 → 0.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/jvs-ppt-ui.es.js +135084 -112697
- package/dist/lib/jvs-ppt-ui.umd.js +101 -101
- package/dist/lib/style.css +1 -1
- package/package.json +1 -1
- package/src/App.vue +36 -14
- package/src/components/CanvasArea.vue +51 -13
- package/src/components/Header.vue +38 -21
- package/src/components/PptEditor.vue +1040 -1005
- package/src/components/PresentationGroupChild.vue +1 -1
- package/src/components/PresentationMode.vue +4 -2
- package/src/components/SidebarLeft.vue +15 -8
- package/src/components/Toolbar.vue +6 -4
- package/src/components/sidebar/panels/SidebarDesignPanel.vue +1341 -1336
- package/src/composables/canvas/useCanvasTable.ts +183 -146
- package/src/composables/sidebar/useSidebarTextFormat.ts +1 -1
- package/src/composables/useSlides.ts +239 -38
- package/src/index.ts +2 -1
- package/src/utils/canvas/elementStyles.ts +1 -1
- package/dist/lib/__vite-browser-external-CbV4tiB6.js +0 -7
- package/dist/lib/dist-DkuYVyNR.js +0 -16010
- package/dist/lib/es-CfdgxdYp.js +0 -477
- package/dist/lib/jszip.min-Kba9Mb0l.js +0 -3034
- package/dist/lib/pptxgen.es-D0HrgUe_.js +0 -2352
|
@@ -165,7 +165,7 @@ function getElementPattern(el: any): string | undefined {
|
|
|
165
165
|
if (typeof val === 'string') {
|
|
166
166
|
pattern = val
|
|
167
167
|
} else if (val && typeof val === 'object') {
|
|
168
|
-
pattern = val.
|
|
168
|
+
pattern = val.blob || val.base64 || val.src || val.url || ''
|
|
169
169
|
}
|
|
170
170
|
}
|
|
171
171
|
}
|
|
@@ -378,7 +378,9 @@ onMounted(() => {
|
|
|
378
378
|
updateScale()
|
|
379
379
|
window.addEventListener('resize', updateScale)
|
|
380
380
|
}
|
|
381
|
-
updateFullscreenState
|
|
381
|
+
// 注意:不能在挂载时同步跑 updateFullscreenState——进入放映时 requestFullscreen 是异步授权,
|
|
382
|
+
// 挂载瞬间 fullscreenElement 尚为 null,会被误判为"已退出全屏"而立即 stopPresentation;
|
|
383
|
+
// 全屏状态同步只交给 fullscreenchange 事件
|
|
382
384
|
document.addEventListener('fullscreenchange', updateFullscreenState)
|
|
383
385
|
})
|
|
384
386
|
|
|
@@ -553,7 +555,7 @@ function getElementPattern(el: any): string | undefined {
|
|
|
553
555
|
if (typeof val === 'string') {
|
|
554
556
|
pattern = val
|
|
555
557
|
} else if (val && typeof val === 'object') {
|
|
556
|
-
pattern = val.
|
|
558
|
+
pattern = val.blob || val.base64 || val.src || val.url || ''
|
|
557
559
|
}
|
|
558
560
|
}
|
|
559
561
|
}
|
|
@@ -850,12 +850,9 @@ const measure = () => {
|
|
|
850
850
|
const el = getSlideListEl()
|
|
851
851
|
if (!el) return
|
|
852
852
|
const thumbEl = el.querySelector('.slide-thumb')
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
const listWidth = el.clientWidth
|
|
857
|
-
thumbWidth.value = Math.max(100, listWidth - 24 - 8 - 24)
|
|
858
|
-
}
|
|
853
|
+
const next = thumbEl ? thumbEl.clientWidth : Math.max(100, el.clientWidth - 24 - 8 - 24)
|
|
854
|
+
// 同值守卫:thumbWidth 变化会触发全列表缩略图重算,RO 回调里值未变时不要写
|
|
855
|
+
if (next > 0 && next !== thumbWidth.value) thumbWidth.value = next
|
|
859
856
|
}
|
|
860
857
|
|
|
861
858
|
function isPerspectivePreset(presetName?: string): boolean {
|
|
@@ -1499,7 +1496,7 @@ function getElementPattern(el: any): string | undefined {
|
|
|
1499
1496
|
if (el.pattern || el.style?.pattern) return el.pattern || el.style?.pattern
|
|
1500
1497
|
const rawFill = (el.style && el.style.fill !== undefined) ? el.style.fill : el.fill
|
|
1501
1498
|
if (rawFill && typeof rawFill === 'object' && (rawFill.type === 'image' || rawFill.type === 'pattern')) {
|
|
1502
|
-
return rawFill.value?.src || rawFill.value?.url || rawFill.value
|
|
1499
|
+
return rawFill.value?.blob || rawFill.value?.src || rawFill.value?.base64 || rawFill.value?.url || (typeof rawFill.value === 'string' ? rawFill.value : undefined)
|
|
1503
1500
|
}
|
|
1504
1501
|
return undefined
|
|
1505
1502
|
}
|
|
@@ -2095,7 +2092,7 @@ const masterGroupedLayouts = computed(() => {
|
|
|
2095
2092
|
|
|
2096
2093
|
<!-- Regular Sidebar Layouts -->
|
|
2097
2094
|
<template v-else>
|
|
2098
|
-
<div class="sidebar-add-slide-container" style="padding: 12px 16px; display: flex;">
|
|
2095
|
+
<div class="sidebar-add-slide-container" style="padding: 12px 16px; display: flex; flex-shrink: 0;">
|
|
2099
2096
|
<div class="custom-split-button">
|
|
2100
2097
|
<!-- Main Add Slide Button -->
|
|
2101
2098
|
<button @click="addSlide" class="split-btn-left">
|
|
@@ -2832,6 +2829,9 @@ const masterGroupedLayouts = computed(() => {
|
|
|
2832
2829
|
border-radius: 6px;
|
|
2833
2830
|
height: 36px;
|
|
2834
2831
|
width: 100%;
|
|
2832
|
+
box-sizing: border-box;
|
|
2833
|
+
white-space: nowrap;
|
|
2834
|
+
flex-shrink: 0;
|
|
2835
2835
|
transition: background-color 0.2s;
|
|
2836
2836
|
}
|
|
2837
2837
|
|
|
@@ -2855,6 +2855,10 @@ const masterGroupedLayouts = computed(() => {
|
|
|
2855
2855
|
cursor: pointer;
|
|
2856
2856
|
padding-left: 12px;
|
|
2857
2857
|
padding-right: 8px;
|
|
2858
|
+
box-sizing: border-box;
|
|
2859
|
+
white-space: nowrap;
|
|
2860
|
+
flex-shrink: 0;
|
|
2861
|
+
line-height: 1;
|
|
2858
2862
|
transition: background-color 0.2s;
|
|
2859
2863
|
}
|
|
2860
2864
|
|
|
@@ -2873,6 +2877,9 @@ const masterGroupedLayouts = computed(() => {
|
|
|
2873
2877
|
align-items: center;
|
|
2874
2878
|
justify-content: center;
|
|
2875
2879
|
cursor: pointer;
|
|
2880
|
+
box-sizing: border-box;
|
|
2881
|
+
flex-shrink: 0;
|
|
2882
|
+
line-height: 1;
|
|
2876
2883
|
transition: background-color 0.2s;
|
|
2877
2884
|
}
|
|
2878
2885
|
|
|
@@ -346,8 +346,9 @@ async function handleVideoFileChange(e: Event) {
|
|
|
346
346
|
})
|
|
347
347
|
})
|
|
348
348
|
if (url) {
|
|
349
|
-
|
|
350
|
-
|
|
349
|
+
addElement('video', url)
|
|
350
|
+
mediaPopoverVisible.value = false
|
|
351
|
+
notify('已成功添加视频')
|
|
351
352
|
}
|
|
352
353
|
} catch (err: any) {
|
|
353
354
|
console.error(err)
|
|
@@ -370,8 +371,9 @@ async function handleAudioFileChange(e: Event) {
|
|
|
370
371
|
})
|
|
371
372
|
})
|
|
372
373
|
if (url) {
|
|
373
|
-
|
|
374
|
-
|
|
374
|
+
addElement('audio', url)
|
|
375
|
+
mediaPopoverVisible.value = false
|
|
376
|
+
notify('已成功添加音频')
|
|
375
377
|
}
|
|
376
378
|
} catch (err: any) {
|
|
377
379
|
console.error(err)
|