1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
| <template>
|
| <view class="oi-form-text" v-if="model" :class="{ 'align-fixed': data.fontSize < 18 }" :style="{fontSize: `${data.fontSize}px`, color: data.color,fontWeight: data.bold ? 'bold' : '',fontStyle: data.italic ? 'italic' : '',
| }">{{model[data.fieldId]}}</view>
| <view class="oi-form-text" v-else :class="{ 'align-fixed': data.fontSize < 18 }" :style="{fontSize: `${data.fontSize}px`, color: data.color,fontWeight: data.bold ? 'bold' : '',fontStyle: data.italic ? 'italic' : '',
| }">{{data.value}}</view>
| </template>
|
| <script>
| export default {
| name: "OIFormText",
| props: {
| data: {
| type: Object,
| required: true,
| },
| model: Object,
| },
| };
| </script>
|
| <style lang="scss" scoped>
| .oi-form-text {
| word-break: break-all;
|
| .align-fixed {
| line-height: 1;
| padding: 10px 12px 10px 0;
| }
| }
| </style>
|
|