Skip to content

Commit 7aaae83

Browse files
committed
fix: 修复新建对话按钮是禁用状态的问题
1 parent 47bf8f4 commit 7aaae83

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

web/src/components/AgentChatComponent.vue

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,13 @@
3030
<div type="button" class="agent-nav-btn" v-if="!chatUIStore.isSidebarOpen" @click="toggleSidebar">
3131
<PanelLeftOpen class="nav-btn-icon" size="18"/>
3232
</div>
33-
<div type="button" class="agent-nav-btn" v-if="!chatUIStore.isSidebarOpen" @click="createNewChat" :disabled="chatUIStore.creatingNewChat">
33+
<div
34+
type="button"
35+
class="agent-nav-btn"
36+
v-if="!chatUIStore.isSidebarOpen"
37+
:class="{ 'is-disabled': chatUIStore.creatingNewChat }"
38+
@click="createNewChat"
39+
>
3440
<LoaderCircle v-if="chatUIStore.creatingNewChat" class="nav-btn-icon loading-icon" size="18"/>
3541
<MessageCirclePlus v-else class="nav-btn-icon" size="18"/>
3642
<span class="text" :class="{'hide-text': isMediumContainer}">新对话</span>
@@ -1657,7 +1663,7 @@ watch(conversations, () => {
16571663
</style>
16581664
16591665
<style lang="less">
1660-
div.agent-nav-btn {
1666+
.agent-nav-btn {
16611667
display: flex;
16621668
gap: 10px;
16631669
padding: 6px 14px;
@@ -1669,14 +1675,17 @@ div.agent-nav-btn {
16691675
width: auto;
16701676
font-size: 15px;
16711677
transition: background-color 0.3s;
1678+
border: none;
1679+
background: transparent;
16721680
1673-
&:hover:not([disabled]) {
1681+
&:hover:not(.is-disabled) {
16741682
background-color: var(--gray-50);
16751683
}
16761684
1677-
&[disabled] {
1685+
&.is-disabled {
16781686
cursor: not-allowed;
16791687
opacity: 0.7;
1688+
pointer-events: none;
16801689
}
16811690
16821691
.nav-btn-icon {

0 commit comments

Comments
 (0)