CourseStart.vue 5.0 KB

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