From 61867e4f5962c4b3d46a979a7acaeaaff1724676 Mon Sep 17 00:00:00 2001
From: WangLeo <690854599@qq.com>
Date: Fri, 12 Jun 2026 16:07:36 +0800
Subject: [PATCH] =?UTF-8?q?feat:=20Video=20=E5=B9=B3=E5=8F=B0=E6=96=B0?=
=?UTF-8?q?=E5=A2=9E=E5=9B=BE=E7=94=9F=E8=A7=86=E9=A2=91/=E5=85=A8?=
=?UTF-8?q?=E8=83=BD=E5=8F=82=E8=80=83/=E4=B8=BB=E4=BD=93=E5=8F=82?=
=?UTF-8?q?=E8=80=83=E4=B8=89=E7=A7=8D=E7=94=9F=E6=88=90=E6=A8=A1=E5=BC=8F?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
- pattern 控件改为支持 Element Plus 图标组件,部分选项改用图标替代 SVG
- 新增 isStr 函数区分图标组件与 SVG 图片路径
- 智能多帧选项暂时标记为 disabled
- modelSelector 增加新模式→modelType 映射(imageToVideo/allReference/subjectReference)
- imageUploader 增加新模式标签文本(参考图/主体)
- 平台注册表 key 统一转为小写,支持大小写不敏感查找
- 更新 workflow 上传地址
---
.env.development | 2 +-
bug.txt | 1 +
components.d.ts | 3 +++
config/plugins.js | 6 +++---
src/platforms/registry.js | 10 ++++++----
src/platforms/video/controls/pattern.vue | 19 ++++++++++++-------
src/platforms/video/imageUploader.vue | 12 ++++++++++++
src/platforms/video/modelSelector.vue | 6 ++++++
8 files changed, 44 insertions(+), 15 deletions(-)
diff --git a/.env.development b/.env.development
index c6ad140..bdee987 100644
--- a/.env.development
+++ b/.env.development
@@ -10,7 +10,7 @@ VITE_API_PAY_PREFIX = '/pay'
VITE_API_PAY_TARGET = 'http://test.xueai.art' # http://43.248.133.202 test.xueai.art
# 任务处理模块
-VITE_API_WORKFLOW_UPLOAD = 'http://43.248.97.19:4000/aigc/workflow/file/upload' # https://sxwz.xueai.art/workflow https://designtools.xueai.art/workflow
+VITE_API_WORKFLOW_UPLOAD = 'http://test.xueai.art/AIGC/Temp/uploadImage' # https://sxwz.xueai.art/workflow https://designtools.xueai.art/workflow
VITE_API_TASK_PREFIX = '/suanli'
VITE_API_TASK_TARGET = 'http://test.xueai.art'
diff --git a/bug.txt b/bug.txt
index e69de29..aa38a12 100644
--- a/bug.txt
+++ b/bug.txt
@@ -0,0 +1 @@
+输入框是否可以以当前宽度为最小值,当参数的选择框挤压发送按钮时输入框可以变宽
\ No newline at end of file
diff --git a/components.d.ts b/components.d.ts
index 0ad0509..f1a82e6 100644
--- a/components.d.ts
+++ b/components.d.ts
@@ -16,6 +16,7 @@ declare module 'vue' {
DialogBox: typeof import('./src/components/dialogBox/index.vue')['default']
ElButton: typeof import('element-plus/es')['ElButton']
ElDatePicker: typeof import('element-plus/es')['ElDatePicker']
+ ElSwitch: typeof import('element-plus/es')['ElSwitch']
ElTooltip: typeof import('element-plus/es')['ElTooltip']
ElUpload: typeof import('element-plus/es')['ElUpload']
IEpCalendar: typeof import('~icons/ep/calendar')['default']
@@ -25,10 +26,12 @@ declare module 'vue' {
IEpPlus: typeof import('~icons/ep/plus')['default']
IEpStar: typeof import('~icons/ep/star')['default']
Img: typeof import('./src/components/Img/index.vue')['default']
+ ParamGroup: typeof import('./src/components/ParamGroup/index.vue')['default']
Popover: typeof import('./src/components/Popover/index.vue')['default']
RouterLink: typeof import('vue-router')['RouterLink']
RouterView: typeof import('vue-router')['RouterView']
Select: typeof import('./src/components/Select/index.vue')['default']
+ SwitchControl: typeof import('./src/components/SwitchControl/index.vue')['default']
VirtualScroller: typeof import('./src/components/virtual-scroller/VirtualScroller.vue')['default']
'VirtualScroller copy': typeof import('./src/components/virtual-scroller/VirtualScroller copy.vue')['default']
}
diff --git a/config/plugins.js b/config/plugins.js
index 4229a55..3a4698a 100644
--- a/config/plugins.js
+++ b/config/plugins.js
@@ -1,8 +1,8 @@
import AutoImport from 'unplugin-auto-import/vite'
-import Components from 'unplugin-vue-components/vite'
-import { ElementPlusResolver } from 'unplugin-vue-components/resolvers'
-import Icons from 'unplugin-icons/vite'
import IconsResolver from 'unplugin-icons/resolver'
+import Icons from 'unplugin-icons/vite'
+import { ElementPlusResolver } from 'unplugin-vue-components/resolvers'
+import Components from 'unplugin-vue-components/vite'
export const autoImportConfig = AutoImport({
imports: [
diff --git a/src/platforms/registry.js b/src/platforms/registry.js
index 8fd2e6d..08ff1b4 100644
--- a/src/platforms/registry.js
+++ b/src/platforms/registry.js
@@ -1,17 +1,19 @@
-/** 平台注册表:id → definePlatform 工厂函数 */
+/** 平台注册表:id → definePlatform 工厂函数(key 统一为小写) */
const registry = {}
/** 注册平台 */
export function registerPlatform(id, factory) {
- if (registry[id]) {
+ const key = id.toLowerCase()
+ if (registry[key]) {
console.warn(`平台 "${id}" 已注册,将被覆盖`)
}
- registry[id] = factory
+ registry[key] = factory
}
/** 根据平台类型创建平台实例 */
export function createPlatform(type) {
- const factory = registry[type]
+ const key = type.toLowerCase()
+ const factory = registry[key]
if (!factory) throw new Error(`未注册的平台: ${type}`)
return factory()
}
diff --git a/src/platforms/video/controls/pattern.vue b/src/platforms/video/controls/pattern.vue
index 73919d3..7865561 100644
--- a/src/platforms/video/controls/pattern.vue
+++ b/src/platforms/video/controls/pattern.vue
@@ -6,11 +6,13 @@
position="top"
>
-
+
+
-
![]()
+
+
{{ option.labelText }}
@@ -18,8 +20,8 @@
diff --git a/src/platforms/video/imageUploader.vue b/src/platforms/video/imageUploader.vue
index 5be156d..a29ee71 100644
--- a/src/platforms/video/imageUploader.vue
+++ b/src/platforms/video/imageUploader.vue
@@ -76,6 +76,12 @@ const getFrameLabel = (index) => {
if (props.modelType === 'digitalHuman') {
return ''
}
+ if (props.modelType === 'imageToVideo' || props.modelType === 'allReference') {
+ return '参考图'
+ }
+ if (props.modelType === 'subjectReference') {
+ return '主体'
+ }
return index === 0 ? '首帧' : '尾帧'
}
@@ -83,6 +89,12 @@ const getUploadText = (i) => {
if (props.modelType === 'digitalHuman') {
return '参考内容'
}
+ if (props.modelType === 'imageToVideo' || props.modelType === 'allReference') {
+ return '参考图'
+ }
+ if (props.modelType === 'subjectReference') {
+ return '主体'
+ }
return i === 1 ? '首帧' : '尾帧'
}
diff --git a/src/platforms/video/modelSelector.vue b/src/platforms/video/modelSelector.vue
index a0adfd5..e25ad7f 100644
--- a/src/platforms/video/modelSelector.vue
+++ b/src/platforms/video/modelSelector.vue
@@ -80,10 +80,16 @@ const getModelType = (value) => {
switch (value) {
case '文生视频':
return 'text'
+ case '图生视频':
+ return 'imageToVideo'
case '首尾帧':
return 'image'
case '数字人':
return 'digitalHuman'
+ case '全能参考':
+ return 'allReference'
+ case '主体参考':
+ return 'subjectReference'
default:
return 'text'
}