Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
liyeyun
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
cfld-frontend
liyeyun
Commits
e932eea1
Commit
e932eea1
authored
Dec 16, 2023
by
王玉鑫
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 产业分类高亮样式修改
parent
20b9dd93
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
1 deletion
+2
-1
tools.ts
src/utils/tools.ts
+1
-1
IndustryCategory.vue
src/views/industry/IndustryCategory.vue
+1
-0
No files found.
src/utils/tools.ts
View file @
e932eea1
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>`
;
});
});
};
};
src/views/industry/IndustryCategory.vue
View file @
e932eea1
...
@@ -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>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment