diff --git a/src/view/components/projectModal.vue b/src/view/components/projectModal.vue
index d91eb6d..c34ad68 100644
--- a/src/view/components/projectModal.vue
+++ b/src/view/components/projectModal.vue
@@ -1,7 +1,7 @@
-
@@ -240,7 +285,7 @@
-
{{ value.name }}
@@ -250,8 +295,11 @@
-
-
![]()
+
+
![]()
+
+
+
{{ value.name }}
@@ -261,17 +309,20 @@
-

-
基础大屏示列
-
包含所有2D基础元素的大屏示列
-
文件信息:大小3MB
+
![]()
+
+
+
+
{{ selectTemplateValue.name }}
+
{{ selectTemplateValue.description }}
+
项目信息:大小{{ selectTemplateValue.size }}MB
项目名称
-
+
@@ -282,50 +333,72 @@
\ No newline at end of file
diff --git a/src/view/components/speechControl.vue b/src/view/components/speechControl.vue
index 01f5b92..8bd853e 100644
--- a/src/view/components/speechControl.vue
+++ b/src/view/components/speechControl.vue
@@ -66,7 +66,7 @@ const config = {
commands: [
{
command: "add_project",
- description: "新建项目",
+ description: "新建",
action: "click",
selector: "#ai-speech-add-project",
params: [],
@@ -84,6 +84,27 @@ const config = {
},
],
},
+ {
+ command: "input_project_name",
+ description: "项目名称",
+ action: "input",
+ selector: "#ai-speech-project-name",
+ params: [
+ {
+ name: "projectname",
+ type: "string",
+ description: "输入项目名称",
+ },
+ ],
+ },
+ {
+ command: "build_project",
+ description: "创建项目",
+ action: "click",
+ selector: "#ai-speech-buildproject",
+ params: [],
+ },
+
],
};
@@ -218,7 +239,7 @@ class VoiceControl {
if (this.isListening) {
// 只有在用户希望继续聆听时才重启
setTimeout(() => {
- this.recognition.start();
+ this.recognition.start();
}, 100); // 短暂延迟后重启
} else {
this.updateUI();
@@ -352,6 +373,10 @@ class VoiceControl {
}
}
+ delay(ms) {
+ return new Promise((resolve) => setTimeout(resolve, ms));
+ }
+
async executeInstruction(instruction) {
const commandConfig = this.config.commands.find(
(c) => c.command === instruction.command
@@ -363,7 +388,7 @@ class VoiceControl {
const element = document.querySelector(commandConfig.selector);
- console.log(element,"-----element");
+ console.log(element, "-----element");
if (!element) {
throw new Error(`找不到元素: ${commandConfig.selector}`);
diff --git a/src/view/index.vue b/src/view/index.vue
index 0702e74..65b4d0a 100644
--- a/src/view/index.vue
+++ b/src/view/index.vue
@@ -6,7 +6,7 @@
-

+
15586961409
@@ -36,7 +36,7 @@
-

+
@@ -135,8 +135,6 @@ import projectModal from '@/view/components/projectModal.vue'
import { ref } from "vue";
const dialogVisible = ref(false)
-const projectsrc = new URL("./../assets/images/sjdp1.png", import.meta.url).href;
-
const menu = ref([
{
name: "我的项目",
@@ -176,7 +174,7 @@ const tabName = ref("local");
const projects = ref([
{
name: '苏州站基础大屏示例',
- img: projectsrc
+ img: '/src/assets/images/sjdp1.png'
}
])