ai-chat-bot-interface 1.6.14 → 1.6.15

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
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ai-chat-bot-interface",
3
3
  "private": false,
4
- "version": "1.6.14",
4
+ "version": "1.6.15",
5
5
  "type": "module",
6
6
  "main": "index.js",
7
7
  "description": "A AI chat bot interface. (private)",
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <div
3
3
  :class="{ dishes_box: true, is_open: isOpen }"
4
- :style="{ height: isOpen ? contentHeight + 92 + 'px' : '92px' }"
4
+ :style="{ height: panelHeight }"
5
5
  >
6
6
  <div class="dishes_wrap" @click.stop="switchOpen">
7
7
  <img
@@ -19,6 +19,9 @@
19
19
  </div>
20
20
  </div>
21
21
  <div v-if="hasDetails" class="dishes_details" ref="contentRef">
22
+ <div v-show="!isOpen" class="switch_open" @click.stop="switchOpen">
23
+ <span>查看菜谱详情</span><arrow-right class="icon" />
24
+ </div>
22
25
  <!-- <div class="title">营养数据</div>
23
26
  <div class="data_row">
24
27
  <div class="data_item">
@@ -99,6 +102,7 @@
99
102
  import { computed, onMounted, ref } from 'vue';
100
103
  import { api as viewerApi } from 'v-viewer';
101
104
  import 'viewerjs/dist/viewer.css';
105
+ import ArrowRight from '@/components/icons/ArrowRight.vue';
102
106
 
103
107
  const props = defineProps({
104
108
  info: {
@@ -147,6 +151,13 @@ const hasDetails = computed(() => {
147
151
  }
148
152
  return sts;
149
153
  });
154
+ const panelHeight = computed(() => {
155
+ let h = '92px';
156
+ if (hasDetails.value) {
157
+ h = isOpen.value ? contentHeight.value + 66 + 'px' : '118px';
158
+ }
159
+ return h;
160
+ });
150
161
 
151
162
  const previewImg = (url) => {
152
163
  viewerApi({
@@ -180,6 +191,17 @@ const getImageList = (str) => {
180
191
  &_details {
181
192
  padding: 1px 10px;
182
193
 
194
+ .switch_open {
195
+ .flexrec();
196
+ cursor: pointer;
197
+ height: 26px;
198
+ line-height: 26px;
199
+ font-size: 10px;
200
+ color: #666;
201
+ .icon {
202
+ font-size: 18px;
203
+ }
204
+ }
183
205
  .title {
184
206
  font-weight: 600;
185
207
  font-size: 15px;
@@ -280,6 +302,8 @@ const getImageList = (str) => {
280
302
  background-color: @bg-color;
281
303
  border-radius: 10px;
282
304
  padding: 10px;
305
+ box-sizing: border-box;
306
+ min-height: 92px;
283
307
 
284
308
  .img {
285
309
  cursor: pointer;