#574 fix issue #489

Merged
openihu merged 1 commits from fix-472 into V20211101 2 years ago
  1. +8
    -8
      web_src/js/components/EditTopics.vue

+ 8
- 8
web_src/js/components/EditTopics.vue View File

@@ -11,16 +11,16 @@
<div class="icon-wrapper">
<i style="line-height: 1.5;color: #303643;font-weight: 900;" v-if="showInitTopic[i]" class="el-icon-check" ></i>
</div>
<div class="text">{{arr.topic_name}} </div>
<div class="text">{{arr.topic_name.toLowerCase()}} </div>
</div>
<div v-if="showInputValue" class="addition item-text" @click="postTopic">
点击或回车添加<b class="user-add-label-text">{{input}}</b>标签
点击或回车添加<b class="user-add-label-text">{{input.toLowerCase()}}</b>标签
</div>
<div v-if="showAddTopic" class="item-text" @click="addPostTopic">
<div class="icon-wrapper">
<i style="line-height: 1.5;color: #303643;font-weight: 900;" v-if="showAddFlage" class="el-icon-check" ></i>
</div>
<div class="text">{{input}}</div>
<div class="text">{{input.toLowerCase()}}</div>
</div>

</div>
@@ -134,7 +134,7 @@ export default {
this.showSearchTopic = true
}
else if(this.arrayTopics.indexOf(this.input)>-1){
else if(this.arrayTopics.indexOf(this.input.toLowerCase())>-1){
this.showInputValue = false
this.showSearchTopic = false
@@ -142,7 +142,7 @@ export default {
this.showInitTopic = []
let timestamp=new Date().getTime()
this.params.q = this.input
this.params.q = this.input.toLowerCase()
this.params._ = timestamp
this.$axios.get('/api/v1/topics/search',{
params:this.params
@@ -224,11 +224,11 @@ export default {
return
}else{
let topic = this.input
if(this.arrayTopics.includes(topic)){
if(this.arrayTopics.includes(topic.toLowerCase())){
return
}
else{
this.arrayTopics.push(topic)
this.arrayTopics.push(topic.toLowerCase())
let topics = this.arrayTopics
let strTopics = topics.join(',')
@@ -268,7 +268,7 @@ export default {
}
else if(!this.showAddFlage){
let topic = this.input
this.arrayTopics.push(topic)
this.arrayTopics.push(topic.toLowerCase())
let topics = this.arrayTopics
let strTopics = topics.join(',')


Loading…
Cancel
Save