CharacterPreview.vue 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898
  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" @retry="retry" />
  397. <AnswerCorrect
  398. :answer-correct="data?.answer_correct"
  399. :visible.sync="visibleAnswerCorrect"
  400. @closeAnswerCorrect="closeAnswerCorrect"
  401. />
  402. <AnswerAnalysis
  403. :visible.sync="visibleAnswerAnalysis"
  404. :answer-list="data.answer_list"
  405. :analysis-list="data.analysis_list"
  406. @closeAnswerAnalysis="closeAnswerAnalysis"
  407. />
  408. </div>
  409. </div>
  410. </template>
  411. <script>
  412. import { getCharacterData } from '@/views/book/courseware/data/character';
  413. import PreviewMixin from '../common/PreviewMixin';
  414. import AudioPlay from '../character_base/components/AudioPlay.vue';
  415. import Strockplayredline from '../newWord_template/components/Strockplayredline.vue';
  416. import Strockplayredlines from '../character_base/components/Strockplayredline.vue';
  417. import Strockred from '../character_base/components/Strockred.vue';
  418. import FreewriteLettle from '../character_base/components/FreewriteLettle.vue';
  419. export default {
  420. name: 'CharacterPreview',
  421. components: {
  422. AudioPlay,
  423. Strockplayredline,
  424. Strockred,
  425. FreewriteLettle,
  426. Strockplayredlines,
  427. },
  428. mixins: [PreviewMixin],
  429. data() {
  430. return {
  431. data: getCharacterData(),
  432. userAnswer: [],
  433. hanzi_color: '#404040', // 描红汉字底色
  434. writer_number_yuan: 15,
  435. writer_number: null, // 书写个数
  436. miao_number: null, // 描红个数
  437. if_free_show: false,
  438. free_img: [],
  439. active_index: null,
  440. active_col_index: null,
  441. current_hz: '', // 当前汉字
  442. current_hz_data: null, // 当前汉字数据
  443. play_status: false, // 播放状态
  444. active_mark: '',
  445. option_list: [],
  446. show_preview: false,
  447. miao_arr: [],
  448. if_miao_show: false, // 描红模块
  449. randomId: Math.random().toString(36).substring(2, 12),
  450. };
  451. },
  452. computed: {},
  453. watch: {
  454. 'data.option_list': {
  455. handler(val) {
  456. if (val) {
  457. this.handleData();
  458. }
  459. },
  460. deep: true,
  461. immediate: true,
  462. },
  463. },
  464. created() {},
  465. methods: {
  466. handleData() {
  467. let answer_list = [];
  468. this.data.option_list.forEach((item, index) => {
  469. if (this.data.property.model === 'write') {
  470. let arr = [];
  471. item.content_list.forEach((items) => {
  472. let obj = null;
  473. if (items.type === 'write') {
  474. obj = {
  475. imgArr: null,
  476. };
  477. }
  478. arr.push(obj);
  479. });
  480. answer_list.push(arr);
  481. } else {
  482. let miao_arr = [];
  483. let arr = [];
  484. if (item.content.trim()) {
  485. for (let i = 0; i < this.data.property.write_number; i++) {
  486. item.content_list.forEach((items) => {
  487. arr.push({ imgArr: null, flag: null });
  488. });
  489. }
  490. for (let i = 0; i < this.data.property.miao_number; i++) {
  491. item.content_list.forEach((items) => {
  492. miao_arr.push({
  493. strokes: items && items.hz_info && items.hz_info[0] ? items.hz_info[0].hzDetail.hz_json : null,
  494. length: item.content_list.length,
  495. });
  496. });
  497. }
  498. item.imgArr = arr;
  499. item.miao_arr = miao_arr;
  500. // if (this.isJudgingRightWrong) {
  501. // item.imgArr = this.userAnswer.find(
  502. // (items) => items.mark === item.mark,
  503. // )?.strokes_content_list;
  504. // }
  505. }
  506. let obj = {
  507. // mark: item.mark,
  508. strokes_content_list: arr,
  509. miao_arr,
  510. };
  511. // if (!this.isJudgingRightWrong) {
  512. // this.userAnswer.push(obj);
  513. // }
  514. answer_list.push(obj);
  515. }
  516. });
  517. this.userAnswer = answer_list;
  518. },
  519. changePraShow() {
  520. this.if_free_show = false;
  521. },
  522. closeIfFreeShow(data, rowIndex, colIndex, mark) {
  523. // this.option_list[rowIndex].imgArr[colIndex] = JSON.stringify(data);
  524. this.if_free_show = false;
  525. this.freeWrite(data, rowIndex, colIndex);
  526. this.$forceUpdate();
  527. },
  528. freeWrite(imgUrl, index, indexs) {
  529. this.if_free_show = true;
  530. this.active_index = index;
  531. this.active_col_index = indexs;
  532. this.current_hz =
  533. this.data.option_list[index] &&
  534. this.data.option_list[index].content_list[indexs] &&
  535. this.data.option_list[index].content_list[indexs].con
  536. ? this.data.option_list[index].content_list[indexs].con
  537. : '';
  538. this.current_hz_data = imgUrl;
  539. },
  540. // 删除记录
  541. deleteWriteRecord(rowIndex, colIndex) {
  542. this.$set(this.option_list[rowIndex].imgArr, colIndex, JSON.stringify({}));
  543. this.changeCurQue(null, rowIndex, colIndex);
  544. this.current_hz_data = null;
  545. this.active_mark = '';
  546. this.$forceUpdate();
  547. },
  548. changeCurQue(answer, rowIndex, colIndex) {
  549. if (answer) {
  550. if (this.data.property.model === 'write') {
  551. this.userAnswer[rowIndex][colIndex].imgArr = answer;
  552. } else {
  553. this.userAnswer[rowIndex].strokes_content_list[colIndex].imgArr = answer;
  554. }
  555. this.$forceUpdate();
  556. }
  557. },
  558. // 点击描红模块
  559. miaoStorkes(index, indexs, mark, content, storkes) {
  560. this.if_miao_show = true;
  561. this.active_index = index;
  562. this.active_col_index = indexs;
  563. this.current_hz = content;
  564. this.current_hz_data = storkes;
  565. },
  566. // 保存描红
  567. saveComplete(flag) {
  568. this.answer.answer_list[this.active_index].strokes_content_list[this.active_col_index] = flag;
  569. },
  570. resetHanzi() {
  571. this.$refs.strockRed.resetHanzi();
  572. },
  573. updateColor(color) {
  574. this.writer.updateColor('strokeColor', color);
  575. this.writer.updateColor('drawingColor', color);
  576. },
  577. // 重做
  578. retry() {
  579. this.handleData();
  580. },
  581. },
  582. };
  583. </script>
  584. <style lang="scss" scoped>
  585. @use '@/styles/mixin.scss' as *;
  586. .character-preview {
  587. @include preview-base;
  588. display: block;
  589. .main {
  590. display: flex;
  591. flex-wrap: wrap;
  592. column-gap: 16px;
  593. justify-content: start;
  594. }
  595. .content-box {
  596. width: max-content;
  597. }
  598. .audio-wrapper-nobg {
  599. height: 24px;
  600. :deep .audio-play {
  601. width: 24px;
  602. height: 24px;
  603. // color: #000;
  604. background-color: initial;
  605. }
  606. :deep .audio-play.not-url {
  607. color: #a1a1a1;
  608. }
  609. :deep .voice-play {
  610. width: 16px;
  611. height: 16px;
  612. }
  613. }
  614. .main-top {
  615. display: flex;
  616. column-gap: 4px;
  617. align-items: center;
  618. justify-content: center;
  619. }
  620. .pinyin {
  621. font-family: 'League';
  622. font-size: 12px;
  623. font-weight: 500;
  624. color: #000;
  625. }
  626. .strock-chinese-box {
  627. display: flex;
  628. flex-wrap: wrap;
  629. margin: 8px 0;
  630. }
  631. .strockplay-newWord {
  632. position: relative;
  633. box-sizing: border-box;
  634. flex-shrink: 0;
  635. width: 80px;
  636. height: 80px;
  637. border: 2px solid #346cda;
  638. border-radius: 4px;
  639. .character-target-bg,
  640. .hanzi-writer-img {
  641. position: absolute;
  642. top: 0;
  643. left: 0;
  644. width: 100%;
  645. height: 100%;
  646. color: #dedede;
  647. }
  648. .hanzi-writer-img {
  649. z-index: 1;
  650. }
  651. }
  652. .border-right-none {
  653. border-right: none;
  654. }
  655. .item-box {
  656. display: flex;
  657. gap: 5px;
  658. }
  659. .number-box {
  660. display: flex;
  661. align-items: center;
  662. height: 80px;
  663. margin-right: 16px;
  664. .number {
  665. display: block;
  666. width: 24px;
  667. height: 24px;
  668. font-family: 'arial';
  669. font-size: 14px;
  670. font-weight: bold;
  671. line-height: 24px;
  672. color: #fff;
  673. text-align: center;
  674. background: #346cda;
  675. border-radius: 100%;
  676. }
  677. }
  678. .items {
  679. font-size: 0;
  680. }
  681. .pinyin {
  682. height: 30px;
  683. min-height: 16px;
  684. font-family: 'League';
  685. font-size: 20px;
  686. font-weight: 400;
  687. line-height: 30px;
  688. color: rgba(0, 0, 0, 50%);
  689. text-align: center;
  690. }
  691. .items-image,
  692. .hanzi-storck {
  693. width: 80px;
  694. height: 80px;
  695. overflow: hidden;
  696. border: 2px solid #346cda;
  697. border-radius: 4px;
  698. }
  699. .items-lian {
  700. display: block;
  701. height: 80px;
  702. padding: 0 10px;
  703. font-size: 34px;
  704. line-height: 80px;
  705. color: #346cda;
  706. }
  707. .items-flex {
  708. display: flex;
  709. gap: 5px;
  710. }
  711. .item-box-write {
  712. .items-flex {
  713. gap: 0;
  714. }
  715. .NoborderRadius {
  716. border-radius: 0;
  717. }
  718. .rightBorderRadius {
  719. border-radius: 0;
  720. border-top-right-radius: 4px;
  721. border-bottom-right-radius: 4px;
  722. }
  723. .leftBorderRadius {
  724. border-radius: 0;
  725. border-top-left-radius: 4px;
  726. border-bottom-left-radius: 4px;
  727. }
  728. .NoborderRight {
  729. border-right: none;
  730. }
  731. }
  732. .pinyin-common {
  733. margin-bottom: 5px;
  734. :deep .edit-div {
  735. font-family: 'League';
  736. }
  737. }
  738. .en-common {
  739. margin-top: 8px;
  740. // text-align: center;
  741. word-break: break-word;
  742. }
  743. .practiceBox {
  744. position: fixed;
  745. top: 0;
  746. left: 0;
  747. z-index: 101;
  748. box-sizing: border-box;
  749. width: 100%;
  750. height: 100vh;
  751. overflow: hidden;
  752. overflow-y: auto;
  753. background: rgba(0, 0, 0, 19%);
  754. &.practice-box-strock {
  755. display: flex;
  756. align-items: center;
  757. justify-content: center;
  758. padding-top: 0;
  759. }
  760. .miao-box {
  761. position: relative;
  762. width: 332px;
  763. height: 360px;
  764. padding: 30px 16px;
  765. margin: 0 auto;
  766. background: #f3f3f3;
  767. border-radius: 8px;
  768. box-shadow: 0 4px 16px rgba(0, 0, 0, 15%);
  769. .close-icon {
  770. position: absolute;
  771. top: 0;
  772. right: 8px;
  773. z-index: 2;
  774. width: 32px;
  775. height: 32px;
  776. padding: 8px;
  777. cursor: pointer;
  778. }
  779. .strockredBox,
  780. .strockplay-redInner {
  781. width: 300px;
  782. height: 300px;
  783. margin: 0 auto;
  784. }
  785. .strock-red {
  786. position: absolute;
  787. top: 30px;
  788. left: 16px;
  789. &-zindex {
  790. z-index: -1;
  791. }
  792. }
  793. .reset-box {
  794. position: absolute;
  795. right: 22px;
  796. bottom: 22px;
  797. z-index: 100;
  798. display: flex;
  799. align-items: center;
  800. justify-content: center;
  801. width: 11px;
  802. height: 11px;
  803. color: $text-color;
  804. cursor: pointer;
  805. &:hover {
  806. color: #000;
  807. }
  808. }
  809. }
  810. }
  811. .card-box {
  812. display: flex;
  813. flex-flow: wrap;
  814. gap: 5px;
  815. }
  816. .words-left {
  817. display: flex;
  818. gap: 10px;
  819. align-items: center;
  820. margin-bottom: 5px;
  821. }
  822. :deep .strockplay-redInner {
  823. width: 80px;
  824. height: 80px;
  825. border-width: 2px !important;
  826. border-radius: 4px;
  827. }
  828. .words-item {
  829. margin-bottom: 10px;
  830. }
  831. .words-bottom {
  832. margin-top: 3px;
  833. word-break: break-word;
  834. }
  835. .operation {
  836. width: 100%;
  837. }
  838. }
  839. </style>