askbot-dragon 1.6.42-beta → 1.6.43-beta
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -24,15 +24,17 @@
|
|
|
24
24
|
</div>
|
|
25
25
|
</div>
|
|
26
26
|
<div class="summaryContent">
|
|
27
|
-
<span>{{
|
|
27
|
+
<span>{{ typedContent }}</span>
|
|
28
28
|
</div>
|
|
29
29
|
<div class="intelligentBottom" v-if="recommendQuestions.length > 0">
|
|
30
|
-
<div class="
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
30
|
+
<div class="intelligentList">
|
|
31
|
+
<div class="intelligentQues"
|
|
32
|
+
v-for="(item,index) in recommendQuestions"
|
|
33
|
+
:key="index"
|
|
34
|
+
@click="recommendQues(item)"
|
|
35
|
+
>
|
|
36
|
+
{{ item }}
|
|
37
|
+
</div>
|
|
36
38
|
</div>
|
|
37
39
|
</div>
|
|
38
40
|
</div>
|
|
@@ -45,7 +47,9 @@ export default {
|
|
|
45
47
|
return{
|
|
46
48
|
summary:"",
|
|
47
49
|
recommendQuestions:[],
|
|
48
|
-
isLoading:false
|
|
50
|
+
isLoading:false,
|
|
51
|
+
typedContent:"",
|
|
52
|
+
typingSpeed:20
|
|
49
53
|
}
|
|
50
54
|
},
|
|
51
55
|
props:{
|
|
@@ -63,6 +67,9 @@ export default {
|
|
|
63
67
|
this.recommendQuestions = res.data.data.recommendQuestions ? res.data.data.recommendQuestions : [];
|
|
64
68
|
if (!this.summary){
|
|
65
69
|
this.regeneration();
|
|
70
|
+
} else {
|
|
71
|
+
this.$emit('getSummarySuccess')
|
|
72
|
+
this.startTypingEffect();
|
|
66
73
|
}
|
|
67
74
|
}
|
|
68
75
|
})
|
|
@@ -82,6 +89,7 @@ export default {
|
|
|
82
89
|
this.summary = res.data.data.summary;
|
|
83
90
|
this.recommendQuestions = res.data.data.recommendQuestions ? res.data.data.recommendQuestions : [];
|
|
84
91
|
this.$emit('getSummarySuccess')
|
|
92
|
+
this.startTypingEffect();
|
|
85
93
|
}
|
|
86
94
|
this.isLoading = false;
|
|
87
95
|
})
|
|
@@ -91,7 +99,18 @@ export default {
|
|
|
91
99
|
},
|
|
92
100
|
recommendQues(item){
|
|
93
101
|
this.$emit('recommendQues',item,this.knowledgeId)
|
|
94
|
-
}
|
|
102
|
+
},
|
|
103
|
+
startTypingEffect() {
|
|
104
|
+
let i = 0;
|
|
105
|
+
const interval = setInterval(() => {
|
|
106
|
+
if (i < this.summary.length) {
|
|
107
|
+
this.typedContent += this.summary.charAt(i);
|
|
108
|
+
i++;
|
|
109
|
+
} else {
|
|
110
|
+
clearInterval(interval);
|
|
111
|
+
}
|
|
112
|
+
}, this.typingSpeed);
|
|
113
|
+
},
|
|
95
114
|
},
|
|
96
115
|
mounted() {
|
|
97
116
|
this.getKnowledgeSummary();
|
|
@@ -150,14 +169,17 @@ export default {
|
|
|
150
169
|
}
|
|
151
170
|
.intelligentBottom{
|
|
152
171
|
background: #F9FAFD;
|
|
172
|
+
padding: 0 10px;
|
|
153
173
|
height: 50px;
|
|
154
|
-
display: flex;
|
|
155
|
-
align-items: center;
|
|
156
|
-
padding: 0 20px;
|
|
157
174
|
border-bottom-left-radius: 20px;
|
|
158
175
|
border-bottom-right-radius: 20px;
|
|
159
|
-
|
|
160
|
-
|
|
176
|
+
.intelligentList{
|
|
177
|
+
overflow-x: scroll;
|
|
178
|
+
overflow-y: hidden;
|
|
179
|
+
display: flex;
|
|
180
|
+
align-items: center;
|
|
181
|
+
height: 50px;
|
|
182
|
+
}
|
|
161
183
|
.intelligentQues{
|
|
162
184
|
height: 26px;
|
|
163
185
|
display: flex;
|