@hanology/cham-browser 0.4.42 → 0.4.43
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import { computed, ref, watch, onMounted, onBeforeUnmount } from 'vue'
|
|
3
3
|
import { annotationToPronSegment } from '../utils/annotationParser'
|
|
4
|
+
import { toChineseNumber } from '../utils/chineseNumber'
|
|
4
5
|
import PronunciationGroup from './PronunciationGroup.vue'
|
|
5
6
|
import type { Annotation } from '../types'
|
|
6
7
|
|
|
@@ -124,8 +125,8 @@ onBeforeUnmount(() => {
|
|
|
124
125
|
@mouseleave="emit('tooltipLeave')"
|
|
125
126
|
>
|
|
126
127
|
<div v-if="headword" class="ann-card-head" :class="dominantKind()">
|
|
128
|
+
<span class="ann-badge-count" v-if="annotations.length > 1">{{ toChineseNumber(annotations.length) }}</span>
|
|
127
129
|
<span class="ann-headword">{{ headword }}</span>
|
|
128
|
-
<span class="ann-badge-count" v-if="annotations.length > 1">{{ annotations.length }}</span>
|
|
129
130
|
</div>
|
|
130
131
|
<button class="ann-card-close" @click="dismiss" aria-label="關閉">
|
|
131
132
|
<svg width="10" height="10" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3"><path d="M18 6L6 18M6 6l12 12"/></svg>
|
|
@@ -157,8 +158,8 @@ onBeforeUnmount(() => {
|
|
|
157
158
|
</button>
|
|
158
159
|
<div class="ann-sheet-body" :class="{ vertical }">
|
|
159
160
|
<div v-if="headword" class="ann-sheet-head" :class="dominantKind()">
|
|
161
|
+
<span class="ann-badge-count" v-if="annotations.length > 1">{{ toChineseNumber(annotations.length) }}</span>
|
|
160
162
|
<span class="ann-headword">{{ headword }}</span>
|
|
161
|
-
<span class="ann-badge-count" v-if="annotations.length > 1">{{ annotations.length }}</span>
|
|
162
163
|
</div>
|
|
163
164
|
<div class="ann-sheet-scroll">
|
|
164
165
|
<div v-for="ann in annotations" :key="ann.id" class="ann-entry">
|
|
@@ -174,7 +175,7 @@ onBeforeUnmount(() => {
|
|
|
174
175
|
</div>
|
|
175
176
|
<div v-if="headword" class="ann-sheet-v-head" :class="dominantKind()">
|
|
176
177
|
<span class="ann-sheet-v-word">{{ headword }}</span>
|
|
177
|
-
<span v-if="annotations.length > 1" class="ann-badge-count-v">{{ annotations.length }}</span>
|
|
178
|
+
<span v-if="annotations.length > 1" class="ann-badge-count-v">{{ toChineseNumber(annotations.length) }}</span>
|
|
178
179
|
</div>
|
|
179
180
|
</div>
|
|
180
181
|
</div>
|
|
@@ -204,15 +205,16 @@ onBeforeUnmount(() => {
|
|
|
204
205
|
}
|
|
205
206
|
|
|
206
207
|
.ann-badge-count {
|
|
208
|
+
display: inline-block;
|
|
209
|
+
padding: 1px 7px;
|
|
210
|
+
border-radius: 3px;
|
|
211
|
+
font-size: 10px;
|
|
207
212
|
font-family: var(--sans);
|
|
208
|
-
font-size: 11px;
|
|
209
213
|
font-weight: 700;
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
padding: 2px 8px;
|
|
215
|
-
letter-spacing: 0;
|
|
214
|
+
letter-spacing: 1px;
|
|
215
|
+
line-height: 1.5;
|
|
216
|
+
background: var(--vermillion);
|
|
217
|
+
color: #fff;
|
|
216
218
|
}
|
|
217
219
|
|
|
218
220
|
/* ─── Annotation entry ─── */
|