Compare commits

...

2 Commits

Author SHA1 Message Date
朱浩 b5caa7ba80 Merge remote-tracking branch 'origin/main' 2024-12-25 12:04:41 +08:00
朱浩 53ff508635 宫格插件 2024-12-25 12:04:27 +08:00
3 changed files with 18 additions and 12 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "aix-win-ws", "name": "aix-win-ws",
"version": "2.5.8", "version": "2.5.9",
"description": "", "description": "",
"main": "./out/main/index.js", "main": "./out/main/index.js",
"author": "上海交大重庆人工智能研究院", "author": "上海交大重庆人工智能研究院",

View File

@ -53,7 +53,7 @@
const props = defineProps({ const props = defineProps({
showToolbar: { showToolbar: {
type: Boolean, type: Boolean,
default: true default: false
} }
}) })
// //
@ -149,20 +149,26 @@
addPic(src) addPic(src)
} }
// //
const addPic = (src) => { const addPic = (data) => {
if (gridPicList.value.length >= 9) { let list = Array.isArray(data)?data:[data]
if (gridPicList.value.length + list.length > 9) {
console.log("超出九个图片") console.log("超出九个图片")
emits('outIndex') emits('outIndex')
return return
} }
let listArr = [];
for (let i = 0; i < list.length; i++) {
let src = list[i]
if (!src) { if (!src) {
console.log("图片链接不能为空") console.log("图片链接不能为空")
return; return;
} }
gridPicList.value.push({ listArr.push({
src: src, src: src,
backgroundColor: getRandomColor() backgroundColor: getRandomColor()
}) })
}
gridPicList.value.push(...listArr)
inputValue.value = '' inputValue.value = ''
} }
// //

View File

@ -10,7 +10,7 @@
<el-dropdown-menu> <el-dropdown-menu>
<el-dropdown-item @click="createAIPPT">新建文枢课件</el-dropdown-item> <el-dropdown-item @click="createAIPPT">新建文枢课件</el-dropdown-item>
<el-dropdown-item @click="aiTOPPT">AI一键生成</el-dropdown-item> <el-dropdown-item @click="aiTOPPT">AI一键生成</el-dropdown-item>
<el-dropdown-item @click="openGridPic">打开宫格</el-dropdown-item> <!-- <el-dropdown-item @click="openGridPic">打开宫格</el-dropdown-item>-->
<el-dropdown-item @click="openFilePicker">导入PPT</el-dropdown-item> <el-dropdown-item @click="openFilePicker">导入PPT</el-dropdown-item>
<input type="file" ref="fileInput" style="display: none;" @change="handleFileChange" accept="application/vnd.ms-powerpoint,application/vnd.openxmlformats-officedocument.presentationml.presentation"> <input type="file" ref="fileInput" style="display: none;" @change="handleFileChange" accept="application/vnd.ms-powerpoint,application/vnd.openxmlformats-officedocument.presentationml.presentation">
</el-dropdown-menu> </el-dropdown-menu>