mirror of
https://gitee.com/dromara/go-view.git
synced 2026-04-23 00:00:12 +08:00
feat: 新增文字边框
This commit is contained in:
@@ -1,13 +1,38 @@
|
||||
<template>
|
||||
<div>
|
||||
信息
|
||||
<div class="go-text-box">
|
||||
<div
|
||||
:style="`
|
||||
color: ${fontColor};
|
||||
padding: ${padding}px;
|
||||
font-size: ${fontSize}px;
|
||||
letter-spacing: ${letterSpacing}px;
|
||||
border-radius: ${borderRadius}px;
|
||||
writing-mode: ${writingMode};
|
||||
background-color:${backgroundColor}`"
|
||||
>{{ dataset }}</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { PropType, toRefs } from 'vue'
|
||||
import { CreateComponentType } from '@/packages/index.d'
|
||||
|
||||
const props = defineProps({
|
||||
chartConfig: {
|
||||
type: Object as PropType<CreateComponentType>,
|
||||
required: true,
|
||||
},
|
||||
})
|
||||
|
||||
const { w, h } = toRefs(props.chartConfig.attr)
|
||||
const { dataset, fontColor, fontSize, letterSpacing, padding, borderRadius, writingMode, backgroundColor } = toRefs(
|
||||
props.chartConfig.option
|
||||
)
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
</style>
|
||||
@include go("text-box") {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user