Skip to content

Commit

Permalink
兼容空格显示
Browse files Browse the repository at this point in the history
  • Loading branch information
TakWolf committed Oct 13, 2024
1 parent 08f8154 commit 40263e8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions www/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ <h1 class="title">思源映射查看器</h1>
<div class="item" v-for="codePoint in searchQuery" :key="codePoint" :set="c = String.fromCodePoint(codePoint)">
<div class="title">
<span class="code-point">U+{{ codePoint.toString(16).toUpperCase().padStart(4, '0') }}</span>
<span class="char">{{ c }}</span>
<span class="char">{{ c === ' ' ? '&nbsp;' : c }}</span>
<span class="tag" v-for="tag in mapping[codePoint].tags" :key="tag">{{ tag }}</span>
</div>
<div class="glyphs">
Expand All @@ -60,7 +60,7 @@ <h1 class="title">思源映射查看器</h1>
<span class="language-flavor">{{ languageFlavor.toUpperCase() }}</span>
<span class="glyph-name">{{ glyphName }}</span>
</div>
<span class="char" :style="{ width: fontSize * 1.4 + 'px', color: getGlyphColor(glyphName), fontFamily: 'SourceHanSans-' + languageFlavor.toUpperCase() + ', sans-serif', fontSize: fontSize + 'px', fontWeight: fontWeight }">{{ c }}</span>
<span class="char" :style="{ width: fontSize * 1.4 + 'px', color: getGlyphColor(glyphName), fontFamily: 'SourceHanSans-' + languageFlavor.toUpperCase() + ', sans-serif', fontSize: fontSize + 'px', fontWeight: fontWeight }">{{ c === ' ' ? '&nbsp;' : c }}</span>
</div>
</div>
<div class="line" v-if="displaySerif && 'serif' in mapping[codePoint]">
Expand All @@ -69,7 +69,7 @@ <h1 class="title">思源映射查看器</h1>
<span class="language-flavor">{{ languageFlavor.toUpperCase() }}</span>
<span class="glyph-name">{{ glyphName }}</span>
</div>
<span class="char" :style="{ width: fontSize * 1.4 + 'px', color: getGlyphColor(glyphName), fontFamily: 'SourceHanSerif-' + languageFlavor.toUpperCase() + ', serif', fontSize: fontSize + 'px', fontWeight: fontWeight }">{{ c }}</span>
<span class="char" :style="{ width: fontSize * 1.4 + 'px', color: getGlyphColor(glyphName), fontFamily: 'SourceHanSerif-' + languageFlavor.toUpperCase() + ', serif', fontSize: fontSize + 'px', fontWeight: fontWeight }">{{ c === ' ' ? '&nbsp;' : c }}</span>
</div>
</div>
</div>
Expand Down

0 comments on commit 40263e8

Please sign in to comment.