CharacterPreview.vue 28 KB

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