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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
<template>
<div>
<el-row :gutter="40">
<el-col :span="12">
<el-form ref="form" label-width="120px">
<el-form-item label="课程内容">
<el-input v-model="formData.content.tips.content"></el-input>
</el-form-item>
<el-form-item label="title1">
<el-input rows="4" v-model="formData.content.tips.title1"></el-input>
</el-form-item>
<el-form-item label="title1-内容">
<el-input rows="4" type="textarea" v-model="formData.content.tips.title1_content"></el-input>
</el-form-item>
<el-form-item label="title2">
<el-input rows="4" v-model="formData.content.tips.title2"></el-input>
</el-form-item>
<el-form-item label="title2-内容">
<el-input type="textarea" rows="4" v-model="formData.content.tips.title2_content"></el-input>
</el-form-item>
</el-form>
</el-col>
<el-col :span="12">
<div class="view" :style="{backgroundImage:`url(${background})`}">
<div class="title">
{{formData.title}}
</div>
<div class="lessonContent">
{{formData.content.tips.content}}
</div>
<div class="tips title1">
{{formData.content.tips.title1}}
</div>
<div class="title-content">
<ul>
<li v-for="data in splitContent">{{data}}</li>
</ul>
</div>
<div class="tips title2">
{{formData.content.tips.title2}}
</div>
<div class="title-content title2">
{{formData.content.tips.title2_content}}
</div>
</div>
</el-col>
</el-row>
</div>
</template>
<script>
import background from '../../assets/mould/lessonContentBGI.png'
export default {
name: "lessonContent",
props:[
'formData'
],
computed:{
splitContent(){
let arr = [];
if(this.formData.content.tips.title1_content){
arr = this.formData.content.tips.title1_content.split('\n');
}
return arr
},
},
data(){
return{
background:background
}
}
}
</script>
<style scoped lang="less">
@import "../../util/public";
.view{
width: 275px;
height: 447px;
background-size: 100% 100%;
padding: 97px 49px 93px 51px;
margin: auto;
.title{
width:235px;
font-size:24px;
margin: 36px auto 16px;
text-align: center;
font-family:Helvetica-Bold;
font-weight:bold;
color:rgba(255,255,255,1);
line-height:26px;
height: 52px;
overflow: hidden;
}
.lessonContent{
margin:8px auto;
font-size:16px;
font-family:PingFang-SC-Medium;
font-weight:500;
color:rgba(255,255,255,1);
text-align: center;
line-height:22px;
width: 83px;
padding: 7px 5px;
background: rgba(51,51,51,0.2);
border-radius: 4px;
height: 22px;
}
.tips{
height:20px;
width: fit-content;
margin: 12px auto 10px auto;
font-size:16px;
font-family:PingFangSC-Semibold;
font-weight:600;
color:rgba(145,237,250,1);
line-height:22px;
display: block;
border-radius: 1000px;
padding: 3px 18px;
border: 2px solid #91EDFA;
&.title1{
margin-top: 55px;
}
}
.title-content{
word-break:break-all;
padding: 0 18px;
font-size:12px;
font-family:PingFang-SC-Regular;
font-weight:400;
color:rgba(136,136,136,1);
line-height:17px;
&.title2{
font-size:14px;
font-family:PingFang-SC-Medium;
font-weight:500;
color:rgba(102,102,102,1);
line-height:20px;
}
ul{
margin: 0;
padding: 0;
font-size:14px;
height:58px;
overflow: hidden;
margin-bottom: 14px;
font-family:PingFang-SC-Medium;
font-weight:500;
color:rgba(102,102,102,1);
line-height:20px;
list-style-type:none;
&:after{
content: '';
display: block;
clear: both;
}
li{
width: 50%;
float: left;
}
}
}
}
</style>