CourseStart.vue 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206
  1. <!-- -->
  2. <template>
  3. <div class="Big-Book-sentence" v-if="curQue">
  4. <div
  5. class="Big-Book-Single-content"
  6. style="margin-left: 20px; margin-top: 20px"
  7. >
  8. <div class="adult-book-input-item">
  9. <span class="adult-book-lable">标题字体:</span>
  10. <el-radio-group v-model="curQue.titleType">
  11. <el-radio label="cn">中文</el-radio>
  12. <el-radio label="en">英文</el-radio>
  13. </el-radio-group>
  14. </div>
  15. <div class="adult-book-input-item" v-if="curQue.titleType">
  16. <span class="adult-book-lable">标题:</span>
  17. <el-input
  18. class="adult-book-input"
  19. type="textarea"
  20. :autosize="{ minRows: 2 }"
  21. placeholder="请输入标题"
  22. v-model="curQue.title"
  23. @blur="onBlur(curQue, 'title')"
  24. ></el-input>
  25. </div>
  26. <div>
  27. <SentenceSegwordChs :curQue="curQue.detail" />
  28. </div>
  29. <div class="adult-book-input-item">
  30. <span class="adult-book-lable">英文:</span>
  31. <el-input
  32. class="adult-book-input"
  33. type="textarea"
  34. :autosize="{ minRows: 2 }"
  35. placeholder="请输入英文"
  36. v-model="curQue.en"
  37. @blur="onBlur(curQue, 'en')"
  38. ></el-input>
  39. </div>
  40. <div class="adult-book-input-item">
  41. <span class="adult-book-lable">内容:</span>
  42. <el-input
  43. class="adult-book-input"
  44. type="textarea"
  45. :autosize="{ minRows: 2 }"
  46. placeholder="请输入内容"
  47. v-model="curQue.con"
  48. @blur="onBlur(curQue, 'con')"
  49. ></el-input>
  50. </div>
  51. </div>
  52. </div>
  53. </template>
  54. <script>
  55. import Upload from "../common/Upload";
  56. import SentenceSegwordChs from "../common/SentenceSegwordChs/index.vue";
  57. export default {
  58. name: "Single",
  59. props: ["curQue", "fn_data", "changeCurQue", "type"],
  60. components: {
  61. Upload,
  62. SentenceSegwordChs,
  63. },
  64. data() {
  65. return {
  66. data_structure: {
  67. type: "CourseStart_chs",
  68. name: "封面",
  69. title: "",
  70. titleType: "",
  71. en: "",
  72. con: "",
  73. detail: {
  74. type: "detail",
  75. pyPosition: "top", //top 拼音在上面;bottom 拼音在下面
  76. sentence: "", //句子
  77. segList: [], //分词结果
  78. seg_words: "",
  79. wordsList: [],
  80. },
  81. },
  82. };
  83. },
  84. computed: {},
  85. watch: {},
  86. //方法集合
  87. methods: {},
  88. //生命周期 - 创建完成(可以访问当前this实例)
  89. created() {
  90. if (!this.curQue) {
  91. this.changeCurQue(this.data_structure);
  92. }
  93. },
  94. //生命周期 - 挂载完成(可以访问DOM元素)
  95. mounted() {},
  96. beforeCreate() {}, //生命周期 - 创建之前
  97. beforeMount() {}, //生命周期 - 挂载之前
  98. beforeUpdate() {}, //生命周期 - 更新之前
  99. updated() {}, //生命周期 - 更新之后
  100. beforeDestroy() {}, //生命周期 - 销毁之前
  101. destroyed() {}, //生命周期 - 销毁完成
  102. activated() {}, //如果页面有keep-alive缓存功能,这个函数会触发
  103. };
  104. </script>
  105. <style lang='scss' scope>
  106. //@import url(); 引入公共css类
  107. .Big-Book-sentence {
  108. &-content {
  109. &.m {
  110. display: flex;
  111. justify-content: flex-start;
  112. align-items: flex-start;
  113. }
  114. .Big-Book-title {
  115. font-size: 16px;
  116. line-height: 40px;
  117. color: #000;
  118. margin-right: 15px;
  119. }
  120. .Big-Book-main {
  121. > div {
  122. margin-bottom: 10px;
  123. &.Big-Book-pinyin {
  124. display: flex;
  125. justify-content: flex-start;
  126. align-items: center;
  127. }
  128. }
  129. }
  130. }
  131. .Big-Book-addrole {
  132. > div {
  133. width: 300px;
  134. height: 40px;
  135. background: #f3f3f3;
  136. border: 1px dashed rgba(0, 0, 0, 0.15);
  137. box-sizing: border-box;
  138. border-radius: 4px;
  139. text-align: center;
  140. line-height: 40px;
  141. cursor: pointer;
  142. }
  143. }
  144. .Big-Book-more {
  145. .Big-Book-more-text {
  146. position: relative;
  147. text-align: center;
  148. }
  149. .Big-Book-more-text:before,
  150. .Big-Book-more-text:after {
  151. position: absolute;
  152. background: #ccc;
  153. content: "";
  154. height: 1px;
  155. top: 50%;
  156. width: 45%;
  157. }
  158. .Big-Book-more-text:before {
  159. left: 10px;
  160. }
  161. .Big-Book-more-text:after {
  162. right: 10px;
  163. }
  164. .Big-Book-more-main {
  165. display: flex;
  166. > :not(:nth-child(1)) {
  167. margin-left: 30px;
  168. }
  169. }
  170. }
  171. .Big-Book-con {
  172. display: flex;
  173. align-items: center;
  174. }
  175. }
  176. .lrc-box {
  177. display: flex;
  178. justify-content: flex-start;
  179. align-items: center;
  180. > span {
  181. font-size: 14px;
  182. margin-right: 16px;
  183. }
  184. }
  185. .close {
  186. width: 24px;
  187. cursor: pointer;
  188. }
  189. .addoption {
  190. width: 200px;
  191. height: 40px;
  192. margin-bottom: 15px;
  193. background: #f3f3f3;
  194. border: 1px dashed rgba(0, 0, 0, 0.15);
  195. box-sizing: border-box;
  196. border-radius: 4px;
  197. text-align: center;
  198. line-height: 40px;
  199. cursor: pointer;
  200. }
  201. </style>
  202. <style lang="scss">
  203. </style>