CharacterPreview.vue 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868
  1. <!-- eslint-disable vue/no-v-html -->
  2. <template>
  3. <div class="character-preview" :style="[getAreaStyle(), getComponentStyle()]">
  4. <SerialNumberPosition v-if="isEnable(data.property.sn_display_mode)" :property="data.property" />
  5. <div class="main">
  6. <template v-if="data.property.model === 'write'">
  7. <div
  8. v-for="(item, index) in data.option_list"
  9. :key="index"
  10. class="item-box"
  11. :class="[!item.is_margin ? 'item-box-write' : '']"
  12. >
  13. <div
  14. class="number-box"
  15. :style="{
  16. marginTop: isEnable(data.property.view_pinyin) ? '30px' : '',
  17. }"
  18. >
  19. <span
  20. class="number"
  21. :style="{
  22. background:
  23. data.unified_attrib && data.unified_attrib.topic_color ? data.unified_attrib.topic_color : '',
  24. }"
  25. >{{ index + 1 }}</span
  26. >
  27. </div>
  28. <div class="pinyin-en" :class="[item.is_example ? 'item-example' : '']">
  29. <div
  30. v-if="isEnable(data.property.view_pinyin) && item.is_common_pinyin"
  31. class="pinyin"
  32. :style="{
  33. fontSize: data.unified_attrib && data.unified_attrib.pinyin_size ? data.unified_attrib.pinyin_size : '',
  34. }"
  35. >
  36. {{ item.pinyin }}
  37. </div>
  38. <div class="items-flex">
  39. <div v-for="(items, indexs) in item.content_list" :key="indexs" class="items">
  40. <div
  41. v-if="isEnable(data.property.view_pinyin) && !item.is_common_pinyin"
  42. class="pinyin"
  43. :style="{
  44. fontSize:
  45. data.unified_attrib && data.unified_attrib.pinyin_size ? data.unified_attrib.pinyin_size : '',
  46. }"
  47. >
  48. {{ items.pinyin }}
  49. </div>
  50. <div class="items-content">
  51. <template v-if="items && items.type === 'img'">
  52. <el-image
  53. v-if="items.file_list[0]"
  54. class="items-image"
  55. :src="items.file_list[0].file_url"
  56. fit="contain"
  57. />
  58. </template>
  59. <template v-else-if="items && items.type === 'lian'">
  60. <span
  61. class="items-lian"
  62. :style="{
  63. color:
  64. data.unified_attrib && data.unified_attrib.topic_color ? data.unified_attrib.topic_color : '',
  65. }"
  66. >{{ items.con }}</span
  67. >
  68. </template>
  69. <Strockplayredline
  70. v-if="items && items.type === 'hanzi'"
  71. :Book_text="items.con"
  72. :play-storkes="isEnable(data.property.is_enable_play_structure)"
  73. :cur-item="
  74. isEnable(data.property.is_enable_high_strokes)
  75. ? data.property.model === 'input'
  76. ? items.high_strokes
  77. : userAnswer[index].item[indexs]
  78. : null
  79. "
  80. :type="data.property.model === 'input' ? 'newWord-template-input' : data.type"
  81. :target-div="'newWordTemplate-character' + items.con + index + indexs + randomId"
  82. :hz_json="items.hz_info[0].hzDetail.hz_json"
  83. :bg-type="data.property.frame_type"
  84. class="hanzi-storck"
  85. :class="[
  86. !item.is_margin && item.content_list.length > 1 && indexs == 0 ? 'leftBorderRadius' : '',
  87. !item.is_margin && item.content_list.length > 1 && indexs == item.content_list.length - 1
  88. ? 'rightBorderRadius'
  89. : '',
  90. !item.is_margin &&
  91. item.content_list.length > 1 &&
  92. indexs != item.content_list.length - 1 &&
  93. indexs != 0
  94. ? 'NoborderRadius'
  95. : '',
  96. !item.is_margin && item.content_list.length > 1 && indexs != item.content_list.length - 1
  97. ? 'NoborderRight'
  98. : '',
  99. ]"
  100. :play-color="
  101. data.unified_attrib && data.unified_attrib.topic_color ? data.unified_attrib.topic_color : ''
  102. "
  103. :style="{
  104. borderColor:
  105. data.unified_attrib && data.unified_attrib.topic_color
  106. ? data.unified_attrib.topic_color
  107. : '#346cda',
  108. }"
  109. />
  110. <div
  111. v-if="items && items.type === 'write'"
  112. :class="[
  113. 'strockplay-newWord',
  114. !item.is_margin && item.content_list.length > 1 && indexs == 0 ? 'leftBorderRadius' : '',
  115. !item.is_margin && item.content_list.length > 1 && indexs == item.content_list.length - 1
  116. ? 'rightBorderRadius'
  117. : '',
  118. !item.is_margin &&
  119. item.content_list.length > 1 &&
  120. indexs != item.content_list.length - 1 &&
  121. indexs != 0
  122. ? 'NoborderRadius'
  123. : '',
  124. !item.is_margin && item.content_list.length > 1 && indexs != item.content_list.length - 1
  125. ? 'NoborderRight'
  126. : '',
  127. ]"
  128. :style="{
  129. borderColor:
  130. data.unified_attrib && data.unified_attrib.topic_color
  131. ? data.unified_attrib.topic_color
  132. : '#346cda',
  133. }"
  134. @click="
  135. freeWrite(
  136. userAnswer[index][indexs].imgArr ? userAnswer[index][indexs].imgArr : null,
  137. index,
  138. indexs,
  139. )
  140. "
  141. >
  142. <SvgIcon
  143. v-if="data.property.frame_type === 'tian'"
  144. icon-class="hanzi-writer-bg"
  145. class="character-target-bg"
  146. />
  147. <SvgIcon
  148. v-else-if="data.property.frame_type === 'mi'"
  149. icon-class="mi"
  150. class="character-target-bg"
  151. />
  152. <img
  153. v-if="
  154. !play_status &&
  155. userAnswer[index][indexs].imgArr &&
  156. userAnswer[index][indexs].imgArr.strokes_image
  157. "
  158. class="hanzi-writer-img"
  159. :src="userAnswer[index][indexs].imgArr.strokes_image"
  160. alt=""
  161. />
  162. </div>
  163. </div>
  164. </div>
  165. </div>
  166. <div class="en-common">{{ item.shiyi }}</div>
  167. </div>
  168. </div>
  169. </template>
  170. <template v-else>
  171. <div :class="['words-box']">
  172. <div v-for="(item, index) in data.option_list" :key="index" :class="['words-item']">
  173. <div class="words-top">
  174. <div class="words-left" :style="{}">
  175. <AudioPlay
  176. v-if="isEnable(data.property.is_enable_voice)"
  177. :file-id="item.audio_file_id ? item.audio_file_id.file_url : ''"
  178. :theme-color="
  179. data.unified_attrib && data.unified_attrib.topic_color ? data.unified_attrib.topic_color : ''
  180. "
  181. />
  182. <span
  183. v-if="isEnable(data.property.view_pinyin) && item.is_common_pinyin"
  184. class="pinyin"
  185. :style="{
  186. fontSize:
  187. data.unified_attrib && data.unified_attrib.pinyin_size ? data.unified_attrib.pinyin_size : '',
  188. }"
  189. >{{ item.pinyin }}</span
  190. >
  191. </div>
  192. </div>
  193. <div class="card-box">
  194. <!-- 描红 -->
  195. <template v-for="(items, indexs) in item.content_list">
  196. <div v-if="item.is_show_ben" :key="'miao' + indexs">
  197. <!-- <div v-if="isEnable(data.property.view_pinyin) && !item.is_common_pinyin" class="pinyin">
  198. {{ items.pinyin }}
  199. </div> -->
  200. <Strockplayredline
  201. :Book_text="items.con"
  202. :play-storkes="isEnable(data.property.is_enable_stroke)"
  203. :cur-item="null"
  204. :target-div="'newWordTemplate-character-answer' + items.con + index + indexs + randomId"
  205. :hz_json="
  206. items.hz_info && items.hz_info[0].hzDetail.hz_json ? items.hz_info[0].hzDetail.hz_json : []
  207. "
  208. class="hanzi-storck"
  209. :class="['strock-chinese', 'border-right-none']"
  210. :bg-type="data.property.frame_type"
  211. :play-color="
  212. data.unified_attrib && data.unified_attrib.topic_color ? data.unified_attrib.topic_color : ''
  213. "
  214. :style="{
  215. borderColor:
  216. data.unified_attrib && data.unified_attrib.topic_color
  217. ? data.unified_attrib.topic_color
  218. : '#346cda',
  219. }"
  220. />
  221. </div>
  222. </template>
  223. <div
  224. v-for="(itemI, indexI) in item.miao_arr"
  225. :key="indexI + index"
  226. style="display: flex"
  227. :style="{
  228. borderColor:
  229. data.unified_attrib && data.unified_attrib.topic_color
  230. ? data.unified_attrib.topic_color
  231. : '#346cda',
  232. }"
  233. @click="miaoStorkes(index, indexI, item.mark, item.content, itemI.strokes)"
  234. >
  235. <Strockplayredlines
  236. v-if="
  237. userAnswer[index].strokes_content_list[indexI] &&
  238. userAnswer[index].strokes_content_list[indexI].flag === 'true'
  239. "
  240. :play-storkes="false"
  241. :book-text="item.content"
  242. :target-div="'write-praT-1' + indexI + index + randomId"
  243. :book-strokes="itemI.strokes"
  244. :class="['strock-chinese']"
  245. :bg-type="data.property.frame_type"
  246. :play-color="
  247. data.unified_attrib && data.unified_attrib.topic_color ? data.unified_attrib.topic_color : ''
  248. "
  249. :style="{
  250. borderColor:
  251. data.unified_attrib && data.unified_attrib.topic_color
  252. ? data.unified_attrib.topic_color
  253. : '#346cda',
  254. }"
  255. />
  256. <Strockplayredlines
  257. v-else
  258. :play-storkes="false"
  259. :book-text="item.content"
  260. :target-div="'write-praT-2' + indexI + index + randomId"
  261. :book-strokes="itemI.strokes"
  262. :stroke-color="'#ddd'"
  263. :class="['strock-chinese']"
  264. :bg-type="data.property.frame_type"
  265. :play-color="
  266. data.unified_attrib && data.unified_attrib.topic_color ? data.unified_attrib.topic_color : ''
  267. "
  268. :style="{
  269. borderColor:
  270. data.unified_attrib && data.unified_attrib.topic_color
  271. ? data.unified_attrib.topic_color
  272. : '#346cda',
  273. }"
  274. />
  275. </div>
  276. <!-- 书写 -->
  277. <div v-for="(items, indexs) in item.imgArr" :key="'write' + indexs" class="con-box">
  278. <div
  279. :class="['strockplay-newWord']"
  280. :style="{
  281. borderColor:
  282. data.unified_attrib && data.unified_attrib.topic_color
  283. ? data.unified_attrib.topic_color
  284. : '#346cda',
  285. }"
  286. @click="
  287. freeWrite(
  288. userAnswer[index].strokes_content_list[indexs].imgArr
  289. ? userAnswer[index].strokes_content_list[indexs].imgArr
  290. : null,
  291. index,
  292. indexs,
  293. )
  294. "
  295. >
  296. <SvgIcon
  297. v-if="data.property.frame_type === 'tian'"
  298. icon-class="hanzi-writer-bg"
  299. class="character-target-bg"
  300. />
  301. <SvgIcon v-else-if="data.property.frame_type === 'mi'" icon-class="mi" class="character-target-bg" />
  302. <img
  303. v-if="
  304. !play_status &&
  305. items &&
  306. userAnswer[index].strokes_content_list[indexs].imgArr &&
  307. userAnswer[index].strokes_content_list[indexs].imgArr.strokes_image
  308. "
  309. class="hanzi-writer-img"
  310. :src="userAnswer[index].strokes_content_list[indexs].imgArr.strokes_image"
  311. alt=""
  312. />
  313. </div>
  314. </div>
  315. </div>
  316. <div v-if="item.shiyi && isEnable(data.property.is_enable_shiyi)" class="words-bottom">
  317. {{ item.shiyi }}
  318. </div>
  319. </div>
  320. </div>
  321. </template>
  322. <div v-if="if_free_show" class="practiceBox practice-box-strock">
  323. <FreewriteLettle
  324. ref="freePaint"
  325. :current-tree-i-d="'1234456'"
  326. :current-hz="current_hz"
  327. :curren-hz-data="current_hz_data"
  328. :row-index="active_index"
  329. :col-index="active_col_index"
  330. :disabled="disabled"
  331. :show-play="isEnable(data.property.is_enable_play_back)"
  332. :bg-type="data.property.frame_type"
  333. :attrib="data.unified_attrib"
  334. @closeIfFreeShow="closeIfFreeShow"
  335. @changePraShow="changePraShow"
  336. @changeCurQue="changeCurQue"
  337. @deleteWriteRecord="deleteWriteRecord"
  338. />
  339. </div>
  340. <div v-if="if_miao_show" class="practiceBox practice-box-strock">
  341. <div class="miao-box">
  342. <i class="el-icon-close close-icon" @click="if_miao_show = false"></i>
  343. <Strockplayredlines
  344. v-if="
  345. (userAnswer[active_index].strokes_content_list[active_col_index].flag &&
  346. userAnswer[active_index].strokes_content_list[active_col_index].flag === 'true') ||
  347. disabled
  348. "
  349. :play-storkes="false"
  350. :book-text="current_hz"
  351. :target-div="'write-praT-3' + current_hz + active_col_index + active_index + randomId"
  352. :book-strokes="current_hz_data"
  353. :stroke-color="
  354. disabled &&
  355. (!userAnswer[active_index].strokes_content_list[active_col_index].flag ||
  356. (userAnswer[active_index].strokes_content_list[active_col_index].flag &&
  357. userAnswer[active_index].strokes_content_list[active_col_index].flag === 'false'))
  358. ? '#ddd'
  359. : ''
  360. "
  361. :bg-type="data.property.frame_type"
  362. :play-color="data.unified_attrib && data.unified_attrib.topic_color ? data.unified_attrib.topic_color : ''"
  363. />
  364. <Strockred
  365. ref="strockRed"
  366. :class="[
  367. 'strock-red',
  368. userAnswer[active_index].strokes_content_list[active_col_index].flag &&
  369. userAnswer[active_index].strokes_content_list[active_col_index].flag === 'true'
  370. ? 'strock-red-zindex'
  371. : '',
  372. ]"
  373. :book-text="current_hz"
  374. :hanzi-color="hanzi_color"
  375. :target-div="'write-praT' + current_hz + active_col_index + active_index + randomId"
  376. :book-strokes="current_hz_data"
  377. :is-answer.sync="userAnswer[active_index].strokes_content_list[active_col_index].flag"
  378. :show-error-tip="isEnable(data.property.is_enable_error)"
  379. :bg-type="data.property.frame_type"
  380. />
  381. <div v-if="!disabled" :class="['reset-box']" @click="resetHanzi">
  382. <SvgIcon icon-class="reset" class="reset-btn" />
  383. </div>
  384. </div>
  385. </div>
  386. </div>
  387. </div>
  388. </template>
  389. <script>
  390. import { getCharacterData } from '@/views/book/courseware/data/character';
  391. import PreviewMixin from '../common/PreviewMixin';
  392. import AudioPlay from '../character_base/components/AudioPlay.vue';
  393. import Strockplayredline from '../newWord_template/components/Strockplayredline.vue';
  394. import Strockplayredlines from '../character_base/components/Strockplayredline.vue';
  395. import Strockred from '../character_base/components/Strockred.vue';
  396. import FreewriteLettle from '../character_base/components/FreewriteLettle.vue';
  397. export default {
  398. name: 'CharacterPreview',
  399. components: {
  400. AudioPlay,
  401. Strockplayredline,
  402. Strockred,
  403. FreewriteLettle,
  404. Strockplayredlines,
  405. },
  406. mixins: [PreviewMixin],
  407. data() {
  408. return {
  409. data: getCharacterData(),
  410. userAnswer: [],
  411. hanzi_color: '#404040', // 描红汉字底色
  412. writer_number_yuan: 15,
  413. writer_number: null, // 书写个数
  414. miao_number: null, // 描红个数
  415. if_free_show: false,
  416. free_img: [],
  417. active_index: null,
  418. active_col_index: null,
  419. current_hz: '', // 当前汉字
  420. current_hz_data: null, // 当前汉字数据
  421. play_status: false, // 播放状态
  422. active_mark: '',
  423. option_list: [],
  424. show_preview: false,
  425. miao_arr: [],
  426. if_miao_show: false, // 描红模块
  427. randomId: Math.random().toString(36).substring(2, 12),
  428. };
  429. },
  430. computed: {},
  431. watch: {
  432. 'data.option_list': {
  433. handler(val) {
  434. if (val) {
  435. this.handleData();
  436. }
  437. },
  438. deep: true,
  439. immediate: true,
  440. },
  441. },
  442. created() {},
  443. methods: {
  444. handleData() {
  445. let answer_list = [];
  446. this.data.option_list.forEach((item, index) => {
  447. if (this.data.property.model === 'write') {
  448. let arr = [];
  449. item.content_list.forEach((items) => {
  450. let obj = null;
  451. if (items.type === 'write') {
  452. obj = {
  453. imgArr: null,
  454. };
  455. }
  456. arr.push(obj);
  457. });
  458. answer_list.push(arr);
  459. } else {
  460. let miao_arr = [];
  461. let arr = [];
  462. if (item.content.trim()) {
  463. for (let i = 0; i < this.data.property.write_number; i++) {
  464. item.content_list.forEach((items) => {
  465. arr.push({ imgArr: null, flag: null });
  466. });
  467. }
  468. for (let i = 0; i < this.data.property.miao_number; i++) {
  469. item.content_list.forEach((items) => {
  470. miao_arr.push({
  471. strokes: items && items.hz_info && items.hz_info[0] ? items.hz_info[0].hzDetail.hz_json : null,
  472. length: item.content_list.length,
  473. });
  474. });
  475. }
  476. item.imgArr = arr;
  477. item.miao_arr = miao_arr;
  478. // if (this.isJudgingRightWrong) {
  479. // item.imgArr = this.userAnswer.find(
  480. // (items) => items.mark === item.mark,
  481. // )?.strokes_content_list;
  482. // }
  483. }
  484. let obj = {
  485. // mark: item.mark,
  486. strokes_content_list: arr,
  487. miao_arr,
  488. };
  489. // if (!this.isJudgingRightWrong) {
  490. // this.userAnswer.push(obj);
  491. // }
  492. answer_list.push(obj);
  493. }
  494. });
  495. this.userAnswer = answer_list;
  496. },
  497. changePraShow() {
  498. this.if_free_show = false;
  499. },
  500. closeIfFreeShow(data, rowIndex, colIndex, mark) {
  501. // this.option_list[rowIndex].imgArr[colIndex] = JSON.stringify(data);
  502. this.if_free_show = false;
  503. this.freeWrite(data, rowIndex, colIndex);
  504. this.$forceUpdate();
  505. },
  506. freeWrite(imgUrl, index, indexs) {
  507. this.if_free_show = true;
  508. this.active_index = index;
  509. this.active_col_index = indexs;
  510. this.current_hz =
  511. this.data.option_list[index] &&
  512. this.data.option_list[index].content_list[indexs] &&
  513. this.data.option_list[index].content_list[indexs].con
  514. ? this.data.option_list[index].content_list[indexs].con
  515. : '';
  516. this.current_hz_data = imgUrl;
  517. },
  518. // 删除记录
  519. deleteWriteRecord(rowIndex, colIndex) {
  520. this.$set(this.option_list[rowIndex].imgArr, colIndex, JSON.stringify({}));
  521. this.changeCurQue(null, rowIndex, colIndex);
  522. this.current_hz_data = null;
  523. this.active_mark = '';
  524. this.$forceUpdate();
  525. },
  526. changeCurQue(answer, rowIndex, colIndex) {
  527. if (answer) {
  528. if (this.data.property.model === 'write') {
  529. this.userAnswer[rowIndex][colIndex].imgArr = answer;
  530. } else {
  531. this.userAnswer[rowIndex].strokes_content_list[colIndex].imgArr = answer;
  532. }
  533. this.$forceUpdate();
  534. }
  535. },
  536. // 点击描红模块
  537. miaoStorkes(index, indexs, mark, content, storkes) {
  538. this.if_miao_show = true;
  539. this.active_index = index;
  540. this.active_col_index = indexs;
  541. this.current_hz = content;
  542. this.current_hz_data = storkes;
  543. },
  544. // 保存描红
  545. saveComplete(flag) {
  546. this.answer.answer_list[this.active_index].strokes_content_list[this.active_col_index] = flag;
  547. },
  548. resetHanzi() {
  549. this.$refs.strockRed.resetHanzi();
  550. },
  551. updateColor(color) {
  552. this.writer.updateColor('strokeColor', color);
  553. this.writer.updateColor('drawingColor', color);
  554. },
  555. },
  556. };
  557. </script>
  558. <style lang="scss" scoped>
  559. @use '@/styles/mixin.scss' as *;
  560. .character-preview {
  561. @include preview-base;
  562. display: block;
  563. .main {
  564. display: flex;
  565. flex-wrap: wrap;
  566. column-gap: 16px;
  567. justify-content: start;
  568. }
  569. .content-box {
  570. width: max-content;
  571. }
  572. .audio-wrapper-nobg {
  573. height: 24px;
  574. :deep .audio-play {
  575. width: 24px;
  576. height: 24px;
  577. // color: #000;
  578. background-color: initial;
  579. }
  580. :deep .audio-play.not-url {
  581. color: #a1a1a1;
  582. }
  583. :deep .voice-play {
  584. width: 16px;
  585. height: 16px;
  586. }
  587. }
  588. .main-top {
  589. display: flex;
  590. column-gap: 4px;
  591. align-items: center;
  592. justify-content: center;
  593. }
  594. .pinyin {
  595. font-family: 'League';
  596. font-size: 12px;
  597. font-weight: 500;
  598. color: #000;
  599. }
  600. .strock-chinese-box {
  601. display: flex;
  602. flex-wrap: wrap;
  603. margin: 8px 0;
  604. }
  605. .strockplay-newWord {
  606. position: relative;
  607. box-sizing: border-box;
  608. flex-shrink: 0;
  609. width: 80px;
  610. height: 80px;
  611. border: 2px solid #346cda;
  612. border-radius: 4px;
  613. .character-target-bg,
  614. .hanzi-writer-img {
  615. position: absolute;
  616. top: 0;
  617. left: 0;
  618. width: 100%;
  619. height: 100%;
  620. color: #dedede;
  621. }
  622. .hanzi-writer-img {
  623. z-index: 1;
  624. }
  625. }
  626. .border-right-none {
  627. border-right: none;
  628. }
  629. .item-box {
  630. display: flex;
  631. gap: 5px;
  632. }
  633. .number-box {
  634. display: flex;
  635. align-items: center;
  636. height: 80px;
  637. margin-right: 16px;
  638. .number {
  639. display: block;
  640. width: 24px;
  641. height: 24px;
  642. font-family: 'arial';
  643. font-size: 14px;
  644. font-weight: bold;
  645. line-height: 24px;
  646. color: #fff;
  647. text-align: center;
  648. background: #346cda;
  649. border-radius: 100%;
  650. }
  651. }
  652. .items {
  653. font-size: 0;
  654. }
  655. .pinyin {
  656. height: 30px;
  657. min-height: 16px;
  658. font-family: 'League';
  659. font-size: 20px;
  660. font-weight: 400;
  661. line-height: 30px;
  662. color: rgba(0, 0, 0, 50%);
  663. text-align: center;
  664. }
  665. .items-image,
  666. .hanzi-storck {
  667. width: 80px;
  668. height: 80px;
  669. overflow: hidden;
  670. border: 2px solid #346cda;
  671. border-radius: 4px;
  672. }
  673. .items-lian {
  674. display: block;
  675. height: 80px;
  676. padding: 0 10px;
  677. font-size: 34px;
  678. line-height: 80px;
  679. color: #346cda;
  680. }
  681. .items-flex {
  682. display: flex;
  683. gap: 5px;
  684. }
  685. .item-box-write {
  686. .items-flex {
  687. gap: 0;
  688. }
  689. .NoborderRadius {
  690. border-radius: 0;
  691. }
  692. .rightBorderRadius {
  693. border-radius: 0;
  694. border-top-right-radius: 4px;
  695. border-bottom-right-radius: 4px;
  696. }
  697. .leftBorderRadius {
  698. border-radius: 0;
  699. border-top-left-radius: 4px;
  700. border-bottom-left-radius: 4px;
  701. }
  702. .NoborderRight {
  703. border-right: none;
  704. }
  705. }
  706. .pinyin-common {
  707. margin-bottom: 5px;
  708. :deep .edit-div {
  709. font-family: 'League';
  710. }
  711. }
  712. .en-common {
  713. margin-top: 8px;
  714. // text-align: center;
  715. word-break: break-word;
  716. }
  717. .practiceBox {
  718. position: fixed;
  719. top: 0;
  720. left: 0;
  721. z-index: 101;
  722. box-sizing: border-box;
  723. width: 100%;
  724. height: 100vh;
  725. overflow: hidden;
  726. overflow-y: auto;
  727. background: rgba(0, 0, 0, 19%);
  728. &.practice-box-strock {
  729. display: flex;
  730. align-items: center;
  731. justify-content: center;
  732. padding-top: 0;
  733. }
  734. .miao-box {
  735. position: relative;
  736. width: 332px;
  737. height: 360px;
  738. padding: 30px 16px;
  739. margin: 0 auto;
  740. background: #f3f3f3;
  741. border-radius: 8px;
  742. box-shadow: 0 4px 16px rgba(0, 0, 0, 15%);
  743. .close-icon {
  744. position: absolute;
  745. top: 0;
  746. right: 8px;
  747. z-index: 2;
  748. width: 32px;
  749. height: 32px;
  750. padding: 8px;
  751. cursor: pointer;
  752. }
  753. .strockredBox,
  754. .strockplay-redInner {
  755. width: 300px;
  756. height: 300px;
  757. margin: 0 auto;
  758. }
  759. .strock-red {
  760. position: absolute;
  761. top: 30px;
  762. left: 16px;
  763. &-zindex {
  764. z-index: -1;
  765. }
  766. }
  767. .reset-box {
  768. position: absolute;
  769. right: 22px;
  770. bottom: 22px;
  771. z-index: 100;
  772. display: flex;
  773. align-items: center;
  774. justify-content: center;
  775. width: 11px;
  776. height: 11px;
  777. color: $text-color;
  778. cursor: pointer;
  779. &:hover {
  780. color: #000;
  781. }
  782. }
  783. }
  784. }
  785. .card-box {
  786. display: flex;
  787. flex-flow: wrap;
  788. gap: 5px;
  789. }
  790. .words-left {
  791. display: flex;
  792. gap: 10px;
  793. align-items: center;
  794. margin-bottom: 5px;
  795. }
  796. :deep .strockplay-redInner {
  797. width: 80px;
  798. height: 80px;
  799. border-width: 2px !important;
  800. border-radius: 4px;
  801. }
  802. .words-item {
  803. margin-bottom: 10px;
  804. }
  805. .words-bottom {
  806. margin-top: 3px;
  807. word-break: break-word;
  808. }
  809. }
  810. </style>