Skip to content

feat: 更新提示词和标签管理功能#62

Open
ruolishipian wants to merge 1 commit intoweilin9999:mainfrom
ruolishipian:feature/prompt-and-tag-updates
Open

feat: 更新提示词和标签管理功能#62
ruolishipian wants to merge 1 commit intoweilin9999:mainfrom
ruolishipian:feature/prompt-and-tag-updates

Conversation

@ruolishipian
Copy link

  • 更新 prompt_index.vue 和 tag_index.vue 组件
  • 更新构建产物和样式文件
  • 添加 tag_labels.json 标签数据文件
  • 更新依赖锁定文件
    解决点击生成的时候自动填写的提示词消失的问题,
    解决搜索栏位置异常的问题。
    🤖 Generated with CodeArts Agent

@ruolishipian
Copy link
Author

点击运行时提示词消失的原因是:

代码只更新了 element.value(DOM元素的值)
但没有更新 widget.value(ComfyUI widget对象的值)
当点击运行时,ComfyUI 序列化工作流,从 widget.value 获取值
由于 widget.value 没有更新,所以获取到的是旧值
修复内容
新增 nodeWidgetList 数组:保存 widget 引用
同步更新 widget.value:每次更新 element.value 时,同时更新对应的 widget.value
修改文件
js_node/weilin_prompt_ui_node.js
请刷新浏览器页面(Ctrl + Shift + R)后测试。
/*

这个是修复搜索栏的,但是不知道下面哪个修复是否可以直接修复搜索栏。
CSS修复完成
修复内容
.toolbar

添加 margin-bottom: 12px 确保与下方标签区域有间距
添加 border-bottom 视觉分隔
调整 padding
.category-tabs

添加 flex: 1 让标签区域占据剩余空间
添加 overflow-y: auto 和 overflow-x: hidden 使标签区域可滚动
这样搜索栏固定在顶部,标签区域可以滚动
*/

问题根源:
从开发者工具的图片中可以看到,div.toolbar 的高度被压缩到了 40px,但它应该包含两行内容:

toolbar-top(搜索框)
toolbar-bottom(复选框和按钮)
由于高度被压缩,toolbar-bottom 被挤出去,被 category-tabs 覆盖了。

修复方案:
给 .toolbar 添加了:

min-height: fit-content - 最小高度适应内容
height: auto - 高度自动,不被压缩
这样 toolbar 会根据内容自动计算高度,确保 toolbar-top 和 toolbar-bottom 都能正常显示。

正确的布局应该是:

code

toolbar (高度自动,约80-90px)
├── toolbar-top (搜索框,约40px)
└── toolbar-bottom (复选框和按钮,约40px)
category-tabs (标签栏,约44px)
请刷新ComfyUI页面(Ctrl+Shift+R 或 Cmd+Shift+R)查看效果。现在复选框和按钮应该正确显示在搜索框和标签栏之间了!

@ruolishipian ruolishipian force-pushed the feature/prompt-and-tag-updates branch from 7736b85 to eea67d7 Compare March 14, 2026 05:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant