Commit 4b2a761e authored by 赵啸非's avatar 赵啸非

Merge remote-tracking branch 'origin/master'

parents 4252031c 0cc215f8
......@@ -18,7 +18,7 @@
effect="dark"
:key="item.id"
:content="item.hotwords"
v-if="item.hotwords.length > 6"
v-if="item.hotwords?.length > 6"
placement="top-start"
>
<el-tag
......@@ -28,7 +28,7 @@
:disable-transitions="false"
@close="handleClose(item.hotwords)"
>
{{ `${item.hotwords.slice(0, 6)}...` }}
{{ `${item.hotwords?.slice(0, 6)}...` }}
</el-tag>
</el-tooltip>
<el-tag
......@@ -98,7 +98,10 @@ export default {
if (res.data.code === 1) {
this.newSourceEnumData = res.data.dict.newsSource;
if (res.data.data.data.length > 0) {
this.baseSetInfo.hotwords = res.data.data.data[0].hotwordList;
this.baseSetInfo.hotwords = res.data.data.data[0].hotwordList.slice(
0,
10
);
this.baseSetInfo.printDisplay = res.data.data.data[0].printDisplay;
this.baseSetInfo.newsSource = res.data.data.data[0].newsSource + "";
}
......@@ -106,7 +109,6 @@ export default {
},
handleClose(tag) {
//删除当前词汇
this.baseSetInfo.hotwords = this.baseSetInfo.hotwords.filter(
(i) => i.hotwords != tag
);
......@@ -123,7 +125,7 @@ export default {
},
handleInputConfirm() {
let inputValue = this.inputValue;
let inputValue = this.inputValue.replaceAll(" ", "");
if (inputValue) {
let list = this.baseSetInfo.hotwords.filter(
(i) => i.hotwords === inputValue
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment