mirror of
https://github.com/pengzhanbo/vuepress-theme-plume.git
synced 2026-04-23 10:58:13 +08:00
perf(theme): improve prepare icons data
This commit is contained in:
parent
4c44462e61
commit
46b382e0b3
@ -61,7 +61,7 @@ const bind = computed<any>(() => ({
|
||||
<span v-if="!loaded" class="vp-icon" :style="{ color, width: size, height: size }" />
|
||||
<OfflineIcon
|
||||
v-else-if="icon"
|
||||
class="vp-iconify"
|
||||
class="vp-icon"
|
||||
v-bind="bind"
|
||||
/>
|
||||
</ClientOnly>
|
||||
|
||||
@ -16,8 +16,8 @@ interface IconData {
|
||||
type CollectMap = Record<string, string[]>
|
||||
type IconDataMap = Record<string, IconData>
|
||||
|
||||
const ICON_REGEXP = /<(?:VP)?Icon(?:ify)?([^>]*)>/g
|
||||
const ICON_NAME_REGEXP = /name="([^"]+)"/
|
||||
const ICON_REGEXP = /<(?:VP)?(Icon|Card|LinkCard)([^>]*)>/g
|
||||
const ICON_NAME_REGEXP = /(?:name|icon)="([^"]+)"/
|
||||
const URL_CONTENT_REGEXP = /(url\([\s\S]+\))/
|
||||
const JS_FILENAME = 'internal/iconify.js'
|
||||
const CSS_FILENAME = 'internal/iconify.css'
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user