Commit e932eea1 authored by 王玉鑫's avatar 王玉鑫

feat: 产业分类高亮样式修改

parent 20b9dd93
export const heightLight = (str: string, key: string) => { export const heightLight = (str: string, key: string) => {
const reg = new RegExp(key, 'ig'); const reg = new RegExp(key, 'ig');
return str.replace(reg, (val) => { return str.replace(reg, (val) => {
return `<span style="color: #C0322B;line-height: 25px;background: rgba(192,50,43,0.06);display: inline-block;">${val}</span>`; return `<span style="color: #C0322B;line-height: 25px;background: rgba(255,240,103,0.5);display: inline-block;">${val}</span>`;
}); });
}; };
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
@click="handleDirectionClick(item)" @click="handleDirectionClick(item)"
> >
<span <span
class="text-[#333333]"
:class="{ 'active-direction': currentDirection === item.value }" :class="{ 'active-direction': currentDirection === item.value }"
v-html="heightLight(item.name, keyWords)" v-html="heightLight(item.name, keyWords)"
></span> ></span>
......
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