bunny-admin-element-thin-i18n/other-views/able/pinyin.vue

42 lines
931 B
Vue

<script setup lang="ts">
import { html } from "pinyin-pro";
defineOptions({
name: "Pinyin"
});
</script>
<template>
<el-card shadow="never">
<template #header>
<div class="card-header">
<p class="font-medium">汉语拼音</p>
<el-link
class="mt-2"
href="https://github.com/pure-admin/vue-pure-admin/blob/main/src/views/able/pinyin.vue"
target="_blank"
>
代码位置 src/views/able/pinyin.vue
</el-link>
</div>
</template>
<p v-html="html(' ')" />
<p class="mt-2" v-html="html(' ', { toneType: 'none' })" />
<p class="mt-2 custom" v-html="html(' ')" />
</el-card>
</template>
<style lang="scss" scoped>
.custom {
/* 汉字的样式 */
:deep(.py-chinese-item) {
color: #409eff;
}
/* 拼音的样式 */
:deep(.py-pinyin-item) {
color: #f56c6c;
}
}
</style>