Skip to content

Commit 40263e8

Browse files
committed
兼容空格显示
1 parent 08f8154 commit 40263e8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

www/index.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ <h1 class="title">思源映射查看器</h1>
5050
<div class="item" v-for="codePoint in searchQuery" :key="codePoint" :set="c = String.fromCodePoint(codePoint)">
5151
<div class="title">
5252
<span class="code-point">U+{{ codePoint.toString(16).toUpperCase().padStart(4, '0') }}</span>
53-
<span class="char">{{ c }}</span>
53+
<span class="char">{{ c === ' ' ? '&nbsp;' : c }}</span>
5454
<span class="tag" v-for="tag in mapping[codePoint].tags" :key="tag">{{ tag }}</span>
5555
</div>
5656
<div class="glyphs">
@@ -60,7 +60,7 @@ <h1 class="title">思源映射查看器</h1>
6060
<span class="language-flavor">{{ languageFlavor.toUpperCase() }}</span>
6161
<span class="glyph-name">{{ glyphName }}</span>
6262
</div>
63-
<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>
63+
<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>
6464
</div>
6565
</div>
6666
<div class="line" v-if="displaySerif && 'serif' in mapping[codePoint]">
@@ -69,7 +69,7 @@ <h1 class="title">思源映射查看器</h1>
6969
<span class="language-flavor">{{ languageFlavor.toUpperCase() }}</span>
7070
<span class="glyph-name">{{ glyphName }}</span>
7171
</div>
72-
<span class="char" :style="{ width: fontSize * 1.4 + 'px', color: getGlyphColor(glyphName), fontFamily: 'SourceHanSerif-' + languageFlavor.toUpperCase() + ', serif', fontSize: fontSize + 'px', fontWeight: fontWeight }">{{ c }}</span>
72+
<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>
7373
</div>
7474
</div>
7575
</div>

0 commit comments

Comments
 (0)