askbot-dragon 1.7.52-beta → 1.7.53-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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "askbot-dragon",
3
- "version": "1.7.52-beta",
3
+ "version": "1.7.53-beta",
4
4
  "scripts": {
5
5
  "serve": "vue-cli-service serve",
6
6
  "build": "vue-cli-service build",
@@ -76,8 +76,8 @@
76
76
  </div>
77
77
  </template>
78
78
  <template v-if="msg.content.type == 0">
79
- <div v-for="(item, itemIndex) in msg.content.list" :key="itemIndex" class="ad-list-cell-recognition" :id="item.knowledgeId">
80
- <div class="alc-source-name" @click="lookAttach(item.url, item, $event)">
79
+ <div v-for="(item, itemIndex) in msg.content.list" :key="itemIndex" class="ad-list-cell-recognition" :id="item.knowledgeId + itemIndex">
80
+ <div class="alc-source-name" @click="lookAttach(item.url, item, $event,itemIndex)">
81
81
  <img class="alc-title-icon" height="18px" width="18px" :src="getIconSrc(item)" alt srcset />
82
82
  <span class="alc-title-from">{{ item.from }}</span>&nbsp;-&nbsp;
83
83
  <div v-show="docSource[item.source]" class="upload-source">
@@ -145,7 +145,7 @@
145
145
  </template>
146
146
  <template v-if="msg.content.type == 0">
147
147
  <div v-for="(item, itemIndex) in msg.content.list" :key="itemIndex"
148
- class="libang_list_cell_recognition" @click="lookAttach(item.url, item, $event)" :id="item.knowledgeId">
148
+ class="libang_list_cell_recognition" @click="lookAttach(item.url, item, $event,itemIndex)" :id="item.knowledgeId + itemIndex">
149
149
  <div class="libang_list_cell_left" >
150
150
  <div class="libang_source_name" >
151
151
  <img class="libang_title_icon" height="18px" width="18px" :src="getIconSrc(item)" alt srcset />
@@ -335,7 +335,7 @@ export default {
335
335
  }
336
336
  },
337
337
  //预览图片
338
- lookAttach (url, item, event) {
338
+ lookAttach (url, item, event,itemIndex) {
339
339
  // console.log(item.knowledgeId);
340
340
  // this.$http.get("/knowledge-api/internal/knowledgeBaseStructure/" + "642ffbccde420e2772f7787b")
341
341
  // debugger
@@ -417,7 +417,8 @@ export default {
417
417
  } else {
418
418
  this.$refs.previewPdf.fileName = '';
419
419
  }
420
- let dom = document.getElementById(item.knowledgeId);
420
+ let domId = item.knowledgeId + itemIndex
421
+ let dom = document.getElementById(domId);
421
422
  console.log('滚动到指定预览知识位置',dom)
422
423
  if (dom){
423
424
  dom.scrollIntoView({ behavior: 'smooth', block: 'start' })
@@ -81,7 +81,9 @@ export default {
81
81
  }
82
82
  }
83
83
  })
84
- this.$parent.scrollToParagraph('first')
84
+ setTimeout(() => {
85
+ this.$parent.scrollToParagraph('first')
86
+ },500)
85
87
  },
86
88
  },
87
89
  watch:{