fix: RubyText 注音布局重写(外层 text→view+flex,拼音对齐汉字正上方,兼容小程序)
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
<template>
|
||||
<text class="ruby-wrap" :class="{ dark: dark }">
|
||||
<text v-for="(ch, i) in pairs" :key="i" class="ruby-unit">
|
||||
<view class="ruby-wrap" :class="{ dark: dark }">
|
||||
<view v-for="(ch, i) in pairs" :key="i" class="ruby-unit">
|
||||
<text v-if="ch.p && show" class="ruby-py">{{ ch.p }}</text>
|
||||
<text class="ruby-ch">{{ ch.c }}</text>
|
||||
</text>
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
@@ -28,14 +28,14 @@ export default {
|
||||
|
||||
<style scoped>
|
||||
.ruby-wrap {
|
||||
display: inline;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
line-height: 1.9;
|
||||
}
|
||||
.ruby-unit {
|
||||
display: inline-flex;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
vertical-align: top;
|
||||
margin: 0 2rpx;
|
||||
}
|
||||
.ruby-py {
|
||||
|
||||
Reference in New Issue
Block a user