12345678910111213141516171819202122232425262728293031323334353637 |
- <template>
- <div class="elem-text">
- <div class="text-body" :style="styles">
- <span
- v-for="(cont, index) in data.content"
- :key="index"
- :class="`cont-${cont.type}`"
- >{{ cont.content }}</span
- >
- </div>
- </div>
- </template>
- <script>
- export default {
- name: "elem-text",
- props: {
- data: {
- type: Object
- }
- },
- computed: {
- styles() {
- return {
- fontWeight: this.data.fontWeight,
- fontFamily: this.data.fontFamily,
- fontSize: this.data.fontSize,
- color: this.data.color
- };
- }
- },
- data() {
- return {};
- },
- methods: {}
- };
- </script>
|