fix: sel-active uses boolean flags (avoid string-compare in moustache) ; switch via pickConv
This commit is contained in:
+22
-12
@@ -9,30 +9,30 @@
|
|||||||
<input class="new-session" type="button" value="+ 新会话" onclick="newSession" />
|
<input class="new-session" type="button" value="+ 新会话" onclick="newSession" />
|
||||||
<text class="page-title small">工作区</text>
|
<text class="page-title small">工作区</text>
|
||||||
<text class="ws-name">📁 DeepSeek_Harness_Watch</text>
|
<text class="ws-name">📁 DeepSeek_Harness_Watch</text>
|
||||||
<div class="sel-conv {{currentConv == '小米手环10 Pro远程控制' ? 'sel-active' : ''}}">
|
<div class="sel-conv {{active0 ? 'sel-active' : ''}}">
|
||||||
<text class="sel-title fl{{fontLevel}}" onclick="pickConv0">小米手环10 Pro远程控制</text>
|
<text class="sel-title fl{{fontLevel}}" onclick="pickConv0">小米手环10 Pro远程控制</text>
|
||||||
<text class="sel-time">刚刚</text>
|
<text class="sel-time">刚刚</text>
|
||||||
</div>
|
</div>
|
||||||
<div class="sel-conv {{currentConv == 'DSHWatch 验收' ? 'sel-active' : ''}}">
|
<div class="sel-conv {{active1 ? 'sel-active' : ''}}">
|
||||||
<text class="sel-title fl{{fontLevel}}" onclick="pickConv1">DSHWatch 验收</text>
|
<text class="sel-title fl{{fontLevel}}" onclick="pickConv1">DSHWatch 验收</text>
|
||||||
<text class="sel-time">1小时</text>
|
<text class="sel-time">1小时</text>
|
||||||
</div>
|
</div>
|
||||||
<text class="ws-name">📁 reactor</text>
|
<text class="ws-name">📁 reactor</text>
|
||||||
<div class="sel-conv {{currentConv == '排查Git文件乱码问题' ? 'sel-active' : ''}}">
|
<div class="sel-conv {{active2 ? 'sel-active' : ''}}">
|
||||||
<text class="sel-title fl{{fontLevel}}" onclick="pickConv2">排查Git文件乱码问题</text>
|
<text class="sel-title fl{{fontLevel}}" onclick="pickConv2">排查Git文件乱码问题</text>
|
||||||
<text class="sel-time">15天</text>
|
<text class="sel-time">15天</text>
|
||||||
</div>
|
</div>
|
||||||
<text class="ws-name">📁 project</text>
|
<text class="ws-name">📁 project</text>
|
||||||
<div class="sel-conv {{currentConv == '修改API配置为固定密钥' ? 'sel-active' : ''}}">
|
<div class="sel-conv {{active3 ? 'sel-active' : ''}}">
|
||||||
<text class="sel-title fl{{fontLevel}}" onclick="pickConv3">修改API配置为固定密钥</text>
|
<text class="sel-title fl{{fontLevel}}" onclick="pickConv3">修改API配置为固定密钥</text>
|
||||||
<text class="sel-time">8天</text>
|
<text class="sel-time">8天</text>
|
||||||
</div>
|
</div>
|
||||||
<div class="sel-conv {{currentConv == '检测DeepSeek API可用性' ? 'sel-active' : ''}}">
|
<div class="sel-conv {{active4 ? 'sel-active' : ''}}">
|
||||||
<text class="sel-title fl{{fontLevel}}" onclick="pickConv4">检测DeepSeek API可用性</text>
|
<text class="sel-title fl{{fontLevel}}" onclick="pickConv4">检测DeepSeek API可用性</text>
|
||||||
<text class="sel-time">9天</text>
|
<text class="sel-time">9天</text>
|
||||||
</div>
|
</div>
|
||||||
<text class="ws-name">📁 truestudio.online</text>
|
<text class="ws-name">📁 truestudio.online</text>
|
||||||
<div class="sel-conv {{currentConv == '评估一下项目状态' ? 'sel-active' : ''}}">
|
<div class="sel-conv {{active5 ? 'sel-active' : ''}}">
|
||||||
<text class="sel-title fl{{fontLevel}}" onclick="pickConv5">评估一下项目状态</text>
|
<text class="sel-title fl{{fontLevel}}" onclick="pickConv5">评估一下项目状态</text>
|
||||||
<text class="sel-time">9天</text>
|
<text class="sel-time">9天</text>
|
||||||
</div>
|
</div>
|
||||||
@@ -265,6 +265,12 @@ export default {
|
|||||||
{ name:'truestudio.online', convs:[ { title:'评估一下项目状态', time:'9天' } ] }
|
{ name:'truestudio.online', convs:[ { title:'评估一下项目状态', time:'9天' } ] }
|
||||||
],
|
],
|
||||||
currentConv: '小米手环10 Pro远程控制',
|
currentConv: '小米手环10 Pro远程控制',
|
||||||
|
active0: true,
|
||||||
|
active1: false,
|
||||||
|
active2: false,
|
||||||
|
active3: false,
|
||||||
|
active4: false,
|
||||||
|
active5: false,
|
||||||
showSelect: false,
|
showSelect: false,
|
||||||
inputText: '',
|
inputText: '',
|
||||||
isPeak: false,
|
isPeak: false,
|
||||||
@@ -383,12 +389,16 @@ export default {
|
|||||||
this.showOptionPicker = true
|
this.showOptionPicker = true
|
||||||
},
|
},
|
||||||
|
|
||||||
pickConv0() { this.currentConv = '小米手环10 Pro远程控制'; this.currentIndex = 1 },
|
setActive(n) {
|
||||||
pickConv1() { this.currentConv = 'DSHWatch 验收'; this.currentIndex = 1 },
|
for (let i = 0; i <= 5; i++) this['active' + i] = (i === n)
|
||||||
pickConv2() { this.currentConv = '排查Git文件乱码问题'; this.currentIndex = 1 },
|
},
|
||||||
pickConv3() { this.currentConv = '修改API配置为固定密钥'; this.currentIndex = 1 },
|
|
||||||
pickConv4() { this.currentConv = '检测DeepSeek API可用性'; this.currentIndex = 1 },
|
pickConv0() { this.currentConv = '小米手环10 Pro远程控制'; this.setActive(0); this.currentIndex = 1 },
|
||||||
pickConv5() { this.currentConv = '评估一下项目状态'; this.currentIndex = 1 },
|
pickConv1() { this.currentConv = 'DSHWatch 验收'; this.setActive(1); this.currentIndex = 1 },
|
||||||
|
pickConv2() { this.currentConv = '排查Git文件乱码问题'; this.setActive(2); this.currentIndex = 1 },
|
||||||
|
pickConv3() { this.currentConv = '修改API配置为固定密钥'; this.setActive(3); this.currentIndex = 1 },
|
||||||
|
pickConv4() { this.currentConv = '检测DeepSeek API可用性'; this.setActive(4); this.currentIndex = 1 },
|
||||||
|
pickConv5() { this.currentConv = '评估一下项目状态'; this.setActive(5); this.currentIndex = 1 },
|
||||||
|
|
||||||
toggleThink(index) {
|
toggleThink(index) {
|
||||||
const m = this.messages[index]
|
const m = this.messages[index]
|
||||||
|
|||||||
Reference in New Issue
Block a user