mirror of
https://github.com/nagisa77/OpenIsle.git
synced 2026-07-22 20:46:09 +00:00
feat: update debug
This commit is contained in:
@@ -26,6 +26,7 @@
|
|||||||
import { ref } from 'vue'
|
import { ref } from 'vue'
|
||||||
import Dropdown from './Dropdown.vue'
|
import Dropdown from './Dropdown.vue'
|
||||||
import { API_BASE_URL } from '../main'
|
import { API_BASE_URL } from '../main'
|
||||||
|
import { stripMarkdown } from '../utils/markdown'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'SearchDropdown',
|
name: 'SearchDropdown',
|
||||||
@@ -49,9 +50,11 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const highlight = (text) => {
|
const highlight = (text) => {
|
||||||
|
text = stripMarkdown(text)
|
||||||
if (!keyword.value) return text
|
if (!keyword.value) return text
|
||||||
const reg = new RegExp(keyword.value, 'gi')
|
const reg = new RegExp(keyword.value, 'gi')
|
||||||
return text.replace(reg, m => `<span class="highlight">${m}</span>`)
|
const res = text.replace(reg, m => `<span class="highlight">${m}</span>`)
|
||||||
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
const iconMap = {
|
const iconMap = {
|
||||||
|
|||||||
Reference in New Issue
Block a user