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