|
@@ -1,6 +1,6 @@
|
|
|
<template>
|
|
|
<div>
|
|
|
- <div class="address-placeholder" v-show="!onshow && items.length == 0" @click="getfouce">请输入</div>
|
|
|
+ <div class="address-placeholder" v-show="!onshow && items.length == 0" @click="getfouce">请输入要选择的内容</div>
|
|
|
<div class="source" @click="getfouce">
|
|
|
<div class="select">
|
|
|
<transition-group name="flip-list">
|
|
@@ -26,6 +26,7 @@
|
|
|
v-model="value"
|
|
|
@input="handleInput"
|
|
|
/>
|
|
|
+ <i class="el-icon-arrow-down"></i>
|
|
|
</div>
|
|
|
<ul class="list" v-if="conceptList.length>0 && onshow">
|
|
|
<li
|
|
@@ -50,7 +51,7 @@ export default {
|
|
|
props: ['type', 'refbool'],
|
|
|
data() {
|
|
|
return {
|
|
|
- innerText:'',
|
|
|
+ innerText: '',
|
|
|
conceptList: [],
|
|
|
oldNum: 0,
|
|
|
newNum: 0,
|
|
@@ -74,8 +75,8 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
handleInput(event) {
|
|
|
- let text = event.data?event.data:'';
|
|
|
- let len = text.length;
|
|
|
+ let text = event.data ? event.data : '';
|
|
|
+ let len = text.length;
|
|
|
this.onshow = len > 0 ? true : false;
|
|
|
const param = {
|
|
|
excludedConceptIds: [],
|
|
@@ -89,10 +90,11 @@ export default {
|
|
|
const data = res.data.data;
|
|
|
this.conceptList = data;
|
|
|
this.onshow = true;
|
|
|
-
|
|
|
- this.items.forEach(item=>{
|
|
|
- this.conceptList = this.conceptList.filter(it => it.conceptId !== item.conceptId)
|
|
|
- })
|
|
|
+ this.items.forEach(item => {
|
|
|
+ this.conceptList = this.conceptList.filter(
|
|
|
+ it => it.conceptId !== item.conceptId
|
|
|
+ );
|
|
|
+ });
|
|
|
}
|
|
|
})
|
|
|
.catch(error => {
|
|
@@ -102,14 +104,14 @@ export default {
|
|
|
getfouce() {
|
|
|
this.$refs.inputVal.focus();
|
|
|
},
|
|
|
- getTag(item,index) {
|
|
|
+ getTag(item, index) {
|
|
|
var v = this.items.some(el => {
|
|
|
return el.conceptName == item.conceptName;
|
|
|
});
|
|
|
if (v) {
|
|
|
return;
|
|
|
}
|
|
|
- this.conceptList.splice(index,1)
|
|
|
+ this.conceptList.splice(index, 1);
|
|
|
this.items.push(item);
|
|
|
this.onshow = true;
|
|
|
},
|
|
@@ -118,7 +120,7 @@ export default {
|
|
|
},
|
|
|
unblur() {
|
|
|
this.onshow = false;
|
|
|
- this.conceptList = []
|
|
|
+ this.conceptList = [];
|
|
|
this.value = '';
|
|
|
},
|
|
|
shuffle() {
|
|
@@ -191,7 +193,11 @@ export default {
|
|
|
background: #f5f7fa;
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+.el-icon-arrow-down {
|
|
|
+ position: absolute;
|
|
|
+ top: 21px;
|
|
|
+ right: 15px;
|
|
|
+}
|
|
|
.source {
|
|
|
min-height: 40px;
|
|
|
outline: 0;
|