From e0ec22c3ac6654f600c3db57a01918554f5f0d55 Mon Sep 17 00:00:00 2001 From: zhangxuelin <959231531@qq.com> Date: Tue, 24 Dec 2024 11:23:52 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E6=9B=BF=E6=8D=A2=E7=85=A7=E7=89=87?= =?UTF-8?q?=E6=94=B9=E4=B8=BA=E7=BA=BF=E4=B8=8Aurl?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/Editor/EditorHeader/index.vue | 2 +- .../Toolbar/ElementStylePanel/ImageStylePanel.vue | 14 ++++++++++---- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/src/renderer/src/AixPPTist/src/views/Editor/EditorHeader/index.vue b/src/renderer/src/AixPPTist/src/views/Editor/EditorHeader/index.vue index 71bce12..72eb83f 100644 --- a/src/renderer/src/AixPPTist/src/views/Editor/EditorHeader/index.vue +++ b/src/renderer/src/AixPPTist/src/views/Editor/EditorHeader/index.vue @@ -16,7 +16,7 @@ 导入 pptx 文件 --> 导出文件 - 重置幻灯片 + 快捷操作 diff --git a/src/renderer/src/AixPPTist/src/views/Editor/Toolbar/ElementStylePanel/ImageStylePanel.vue b/src/renderer/src/AixPPTist/src/views/Editor/Toolbar/ElementStylePanel/ImageStylePanel.vue index 7445f45..02a794f 100644 --- a/src/renderer/src/AixPPTist/src/views/Editor/Toolbar/ElementStylePanel/ImageStylePanel.vue +++ b/src/renderer/src/AixPPTist/src/views/Editor/Toolbar/ElementStylePanel/ImageStylePanel.vue @@ -88,7 +88,9 @@ import Button from '../../../../components/Button.vue' import ButtonGroup from '../../../../components/ButtonGroup.vue' import Popover from '../../../../components/Popover.vue' import NumberInput from '../../../../components/NumberInput.vue' - +import { PPTApi } from '../../../../api' +import { Console } from 'node:console' +import { x64 } from 'crypto-js' const shapeClipPathOptions = CLIPPATHS const ratioClipOptions = [ { @@ -221,10 +223,14 @@ const presetImageClip = (shape: string, ratio = 0) => { const replaceImage = (files: FileList) => { const imageFile = files[0] if (!imageFile) return - getImageDataURL(imageFile).then(dataURL => { - const props = { src: dataURL } - updateImage(props) + PPTApi.toRousrceUrl(imageFile).then(data=>{ + const props = { src: data } + updateImage(props) }) + // getImageDataURL(imageFile).then(dataURL => { + // const props = { src: dataURL } + // updateImage(props) + // }) } // 重置图片:清除全部样式 From 5550ca570c3a5c497c25b0c90a94b2309bc67078 Mon Sep 17 00:00:00 2001 From: zhangxuelin <959231531@qq.com> Date: Wed, 25 Dec 2024 10:25:07 +0800 Subject: [PATCH 2/4] no message --- .../src/AixPPTist/src/views/Editor/EditorHeader/index.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/renderer/src/AixPPTist/src/views/Editor/EditorHeader/index.vue b/src/renderer/src/AixPPTist/src/views/Editor/EditorHeader/index.vue index 8b5365a..83000c8 100644 --- a/src/renderer/src/AixPPTist/src/views/Editor/EditorHeader/index.vue +++ b/src/renderer/src/AixPPTist/src/views/Editor/EditorHeader/index.vue @@ -16,7 +16,7 @@ 导入 pptx 文件 导出文件 --> - 重置幻灯片 + 快捷操作 From 53ff508635b97cab961b03f427e9ad7caba50149 Mon Sep 17 00:00:00 2001 From: zhuhao <979263092@qq.com> Date: Wed, 25 Dec 2024 12:04:27 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E5=AE=AB=E6=A0=BC=E6=8F=92=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 2 +- .../src/components/grid-pic/index.vue | 26 ++++++++++++------- src/renderer/src/views/prepare/index.vue | 2 +- 3 files changed, 18 insertions(+), 12 deletions(-) diff --git a/package.json b/package.json index 9c9774e..f27fc00 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "aix-win-ws", - "version": "2.5.8", + "version": "2.5.9", "description": "", "main": "./out/main/index.js", "author": "上海交大重庆人工智能研究院", diff --git a/src/renderer/src/components/grid-pic/index.vue b/src/renderer/src/components/grid-pic/index.vue index 9725af6..40fdd26 100644 --- a/src/renderer/src/components/grid-pic/index.vue +++ b/src/renderer/src/components/grid-pic/index.vue @@ -53,7 +53,7 @@ const props = defineProps({ showToolbar: { type: Boolean, - default: true + default: false } }) // 获取图片样式 @@ -149,20 +149,26 @@ addPic(src) } // 添加图片 - const addPic = (src) => { - if (gridPicList.value.length >= 9) { + const addPic = (data) => { + let list = Array.isArray(data)?data:[data] + if (gridPicList.value.length + list.length > 9) { console.log("超出九个图片") emits('outIndex') return } - if (!src) { - console.log("图片链接不能为空") - return; + let listArr = []; + for (let i = 0; i < list.length; i++) { + let src = list[i] + if (!src) { + console.log("图片链接不能为空") + return; + } + listArr.push({ + src: src, + backgroundColor: getRandomColor() + }) } - gridPicList.value.push({ - src: src, - backgroundColor: getRandomColor() - }) + gridPicList.value.push(...listArr) inputValue.value = '' } // 清空图片 diff --git a/src/renderer/src/views/prepare/index.vue b/src/renderer/src/views/prepare/index.vue index 7ee3ab0..38a6e34 100644 --- a/src/renderer/src/views/prepare/index.vue +++ b/src/renderer/src/views/prepare/index.vue @@ -10,7 +10,7 @@ 新建文枢课件 AI一键生成 - 打开宫格 + 导入PPT From c81f3937159fe148d3c30faf55615817cfb2f4a1 Mon Sep 17 00:00:00 2001 From: zhuhao <979263092@qq.com> Date: Wed, 25 Dec 2024 14:38:29 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E5=AE=AB=E6=A0=BC=E6=8F=92=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/renderer/src/components/grid-pic/index.vue | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/renderer/src/components/grid-pic/index.vue b/src/renderer/src/components/grid-pic/index.vue index 40fdd26..b838bae 100644 --- a/src/renderer/src/components/grid-pic/index.vue +++ b/src/renderer/src/components/grid-pic/index.vue @@ -22,9 +22,9 @@ -
- - +
+ + 添加