ai-chat-bot-interface 1.1.5 → 1.1.6
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 +1 -1
- package/src/App.vue +1 -1
- package/src/ChatUi.less +26 -0
- package/src/ChatUi.vue +13 -0
package/package.json
CHANGED
package/src/App.vue
CHANGED
package/src/ChatUi.less
CHANGED
|
@@ -244,3 +244,29 @@
|
|
|
244
244
|
text-align: center;
|
|
245
245
|
}
|
|
246
246
|
}
|
|
247
|
+
|
|
248
|
+
.btn {
|
|
249
|
+
cursor: pointer;
|
|
250
|
+
width: 100%;
|
|
251
|
+
line-height: 22px;
|
|
252
|
+
box-sizing: border-box;
|
|
253
|
+
background-color: #e6f5eb;
|
|
254
|
+
border-radius: 19px;
|
|
255
|
+
text-align: center;
|
|
256
|
+
font-weight: 600;
|
|
257
|
+
font-size: 13px;
|
|
258
|
+
color: #039938;
|
|
259
|
+
margin-top: 15px;
|
|
260
|
+
|
|
261
|
+
&_2 {
|
|
262
|
+
color: #fff;
|
|
263
|
+
background-color: #039938;
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
&_group {
|
|
267
|
+
display: grid;
|
|
268
|
+
grid-template-columns: 1fr;
|
|
269
|
+
grid-column-gap: 10px;
|
|
270
|
+
margin-top: 20px;
|
|
271
|
+
}
|
|
272
|
+
}
|
package/src/ChatUi.vue
CHANGED
|
@@ -84,6 +84,14 @@
|
|
|
84
84
|
/>
|
|
85
85
|
</template>
|
|
86
86
|
</div>
|
|
87
|
+
<div v-else-if="handleTextNeedBtn(conv.content)">
|
|
88
|
+
<div
|
|
89
|
+
class="btn btn_2"
|
|
90
|
+
@click.stop="handleCardTap({ type: 'match' }, {})"
|
|
91
|
+
>
|
|
92
|
+
用該方案配餐
|
|
93
|
+
</div>
|
|
94
|
+
</div>
|
|
87
95
|
</template>
|
|
88
96
|
<loading-icon2 v-else />
|
|
89
97
|
</div>
|
|
@@ -571,6 +579,11 @@ const scrollToEnd = () => {
|
|
|
571
579
|
endTarget.value.scrollIntoView();
|
|
572
580
|
});
|
|
573
581
|
};
|
|
582
|
+
|
|
583
|
+
const handleTextNeedBtn = (str) => {
|
|
584
|
+
const regExp = /#全日總熱量:(\d*?)kcal/g;
|
|
585
|
+
return regExp.test(str);
|
|
586
|
+
};
|
|
574
587
|
</script>
|
|
575
588
|
|
|
576
589
|
<style scoped lang="less">
|