ai-chat-bot-interface 1.1.6 → 1.1.8
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/ChatUi.less +26 -26
- package/src/ChatUi.vue +29 -27
package/package.json
CHANGED
package/src/ChatUi.less
CHANGED
|
@@ -37,6 +37,32 @@
|
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
39
|
.cui {
|
|
40
|
+
&_btn {
|
|
41
|
+
cursor: pointer;
|
|
42
|
+
width: 100%;
|
|
43
|
+
height: 38px;
|
|
44
|
+
line-height: 38px;
|
|
45
|
+
box-sizing: border-box;
|
|
46
|
+
background-color: #e6f5eb;
|
|
47
|
+
border-radius: 19px;
|
|
48
|
+
text-align: center;
|
|
49
|
+
font-weight: 600;
|
|
50
|
+
font-size: 13px;
|
|
51
|
+
color: #039938;
|
|
52
|
+
margin-top: 15px;
|
|
53
|
+
|
|
54
|
+
&_2 {
|
|
55
|
+
color: #fff;
|
|
56
|
+
background-color: #039938;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
&_group {
|
|
60
|
+
display: grid;
|
|
61
|
+
grid-template-columns: 1fr;
|
|
62
|
+
grid-column-gap: 10px;
|
|
63
|
+
margin-top: 20px;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
40
66
|
&_box {
|
|
41
67
|
width: 100%;
|
|
42
68
|
height: 100%;
|
|
@@ -244,29 +270,3 @@
|
|
|
244
270
|
text-align: center;
|
|
245
271
|
}
|
|
246
272
|
}
|
|
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
|
@@ -63,35 +63,37 @@
|
|
|
63
63
|
<div class="box">
|
|
64
64
|
<template v-if="conv.content">
|
|
65
65
|
<p class="text" v-html="conv.content"></p>
|
|
66
|
-
<
|
|
67
|
-
<
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
66
|
+
<template v-if="!isAnswering">
|
|
67
|
+
<div v-if="conv.extra.length">
|
|
68
|
+
<template v-for="(comp, idx) in conv.extra" :key="idx">
|
|
69
|
+
<!-- <p
|
|
70
|
+
v-if="comp.showType === 'plan' && comp.planParse"
|
|
71
|
+
class="text"
|
|
72
|
+
style="margin-top: 1em"
|
|
73
|
+
>
|
|
74
|
+
{{ comp.planParse }}
|
|
75
|
+
</p>-->
|
|
76
|
+
<dishes-list
|
|
77
|
+
v-if="comp.showType === 'card'"
|
|
78
|
+
:sku-list="comp.skuList"
|
|
79
|
+
@select="(data) => handleCardTap(data, comp)"
|
|
80
|
+
/>
|
|
81
|
+
<plan-card
|
|
82
|
+
v-if="comp.showType === 'plan'"
|
|
83
|
+
:info="comp"
|
|
84
|
+
@select="handleCardTap({ type: 'match' }, comp)"
|
|
85
|
+
/>
|
|
86
|
+
</template>
|
|
87
|
+
</div>
|
|
88
|
+
<div v-else-if="handleTextNeedBtn(conv.content)">
|
|
89
|
+
<div
|
|
90
|
+
class="cui_btn cui_btn_2"
|
|
91
|
+
@click.stop="handleCardTap({ type: 'match' }, {})"
|
|
72
92
|
>
|
|
73
|
-
|
|
74
|
-
</
|
|
75
|
-
<dishes-list
|
|
76
|
-
v-if="comp.showType === 'card'"
|
|
77
|
-
:sku-list="comp.skuList"
|
|
78
|
-
@select="(data) => handleCardTap(data, comp)"
|
|
79
|
-
/>
|
|
80
|
-
<plan-card
|
|
81
|
-
v-if="comp.showType === 'plan'"
|
|
82
|
-
:info="comp"
|
|
83
|
-
@select="handleCardTap({ type: 'match' }, comp)"
|
|
84
|
-
/>
|
|
85
|
-
</template>
|
|
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
|
+
用該方案配餐
|
|
94
|
+
</div>
|
|
93
95
|
</div>
|
|
94
|
-
</
|
|
96
|
+
</template>
|
|
95
97
|
</template>
|
|
96
98
|
<loading-icon2 v-else />
|
|
97
99
|
</div>
|