list.vue
1012 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<template>
<div class="list_container">
<NafmHeader navClass="nafmii-head-bg3" title="资质查询">
<template slot="bottom">
<search :isSearch="true" v-model="searchName"></search>
</template>
</NafmHeader>
<main class="list_content">
<section class="content">
<van-cell-group>
<van-cell v-for="item in searchList" :key="item.id" icon="search">
<template slot="title">
<span v-html="highligntTxt(item.name)"></span>
</template>
</van-cell>
</van-cell-group>
</section>
</main>
</div>
</template>
<script>
export default {
name: 'QulificationList',
components: {
search: ()=>import('./components/search.vue')
},
data() {
return {
searchName: '',
qulificationType: '机构',
searchList: []
}
},
methods: {
highligntTxt(txt) {
return txt.replace(this.searchName, `<font color='#2861AC'>${this.searchName}</font>`)
}
}
}
</script>