CommonMarkBody.vue 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651
  1. <template>
  2. <div
  3. ref="dragContainer"
  4. class="mark-body-container tw-flex-auto tw-p-2 tw-relative"
  5. >
  6. <div
  7. v-if="!store.currentTask"
  8. class="
  9. tw-text-center
  10. empty-task
  11. tw-flex tw-flex-col tw-place-items-center tw-justify-center
  12. "
  13. >
  14. <img src="./images/empty-task.png" />
  15. {{ store.message }}
  16. </div>
  17. <div
  18. v-else-if="store.isScanImage"
  19. :style="{ width: answerPaperScale }"
  20. :class="[`rotate-board-${rotateBoard}`]"
  21. >
  22. <div
  23. v-for="(item, index) in sliceImagesWithTrackList"
  24. :key="index"
  25. class="single-image-container"
  26. >
  27. <img
  28. :src="item.url"
  29. draggable="false"
  30. @click="(event) => innerMakeTrack(event, item)"
  31. @contextmenu="showBigImage"
  32. />
  33. <MarkDrawTrack
  34. :trackList="item.trackList"
  35. :specialTagList="item.tagList"
  36. :sliceImageWidth="item.sliceImageWidth"
  37. :sliceImageHeight="item.sliceImageHeight"
  38. :dx="item.dx"
  39. :dy="item.dy"
  40. />
  41. <hr class="image-seperator" />
  42. </div>
  43. </div>
  44. <div v-else-if="store.isMultiMedia">
  45. <MultiMediaMarkBody />
  46. </div>
  47. <div v-else>impossible</div>
  48. <div v-if="markStatus" class="status-container">
  49. {{ markStatus }}
  50. <div class="double-triangle"></div>
  51. </div>
  52. <ZoomPaper v-if="store.isScanImage && store.currentTask" />
  53. </div>
  54. <slot name="slot-cursor" />
  55. </template>
  56. <script setup lang="ts">
  57. import { onMounted, onUnmounted, reactive, watch, watchEffect } from "vue";
  58. import { store } from "@/store/store";
  59. import MarkDrawTrack from "./MarkDrawTrack.vue";
  60. import type { MarkResult, SliceImage, SpecialTag, Track } from "@/types";
  61. import { useTimers } from "@/setups/useTimers";
  62. import {
  63. getDataUrlForSliceConfig,
  64. getDataUrlForSplitConfig,
  65. loadImage,
  66. } from "@/utils/utils";
  67. import { dragImage } from "./use/draggable";
  68. import MultiMediaMarkBody from "./MultiMediaMarkBody.vue";
  69. import "viewerjs/dist/viewer.css";
  70. import Viewer from "viewerjs";
  71. import ZoomPaper from "@/components/ZoomPaper.vue";
  72. type MakeTrack = (
  73. event: MouseEvent,
  74. item: SliceImage,
  75. maxSliceWidth: number,
  76. theFinalHeight: number
  77. ) => void | (() => void);
  78. const props = withDefaults(
  79. defineProps<{
  80. useMarkResult?: boolean;
  81. makeTrack?: MakeTrack;
  82. }>(),
  83. {
  84. useMarkResult: false,
  85. makeTrack: () => {
  86. console.debug("非评卷界面makeTrack没有意义");
  87. },
  88. }
  89. );
  90. const emit = defineEmits(["error"]);
  91. // start: 图片拖动。在轨迹模式下,仅当没有选择分数时可用。
  92. const { dragContainer } = dragImage();
  93. // end: 图片拖动
  94. const { addTimeout } = useTimers();
  95. let rotateBoard = $ref(0);
  96. // start: 缩略图定位
  97. watch(
  98. () => [store.minimapScrollToX, store.minimapScrollToY],
  99. () => {
  100. const container = document.querySelector(
  101. ".mark-body-container"
  102. ) as HTMLDivElement;
  103. addTimeout(() => {
  104. if (
  105. container &&
  106. typeof store.minimapScrollToX === "number" &&
  107. typeof store.minimapScrollToY === "number"
  108. ) {
  109. const { scrollWidth, scrollHeight } = container;
  110. container.scrollTo({
  111. top: scrollHeight * store.minimapScrollToY,
  112. left: scrollWidth * store.minimapScrollToX,
  113. behavior: "smooth",
  114. });
  115. }
  116. }, 10);
  117. }
  118. );
  119. // end: 缩略图定位
  120. // start: 快捷键定位
  121. const scrollContainerByKey = (e: KeyboardEvent) => {
  122. const container = document.querySelector(
  123. ".mark-body-container"
  124. ) as HTMLDivElement;
  125. if (e.key === "w") {
  126. container.scrollBy({ top: -100, behavior: "smooth" });
  127. } else if (e.key === "s") {
  128. container.scrollBy({ top: 100, behavior: "smooth" });
  129. } else if (e.key === "a") {
  130. container.scrollBy({ left: -100, behavior: "smooth" });
  131. } else if (e.key === "d") {
  132. container.scrollBy({ left: 100, behavior: "smooth" });
  133. }
  134. };
  135. onMounted(() => {
  136. document.addEventListener("keypress", scrollContainerByKey);
  137. });
  138. onUnmounted(() => {
  139. document.removeEventListener("keypress", scrollContainerByKey);
  140. });
  141. // end: 快捷键定位
  142. // start: 计算裁切图和裁切图上的分数轨迹和特殊标记轨迹
  143. let sliceImagesWithTrackList: SliceImage[] = reactive([]);
  144. let maxSliceWidth = 0; // 最大的裁切块宽度,图片容器以此为准
  145. let theFinalHeight = 0; // 最终宽度,用来定位轨迹在第几张图片,不包括image-seperator高度
  146. async function processSliceConfig() {
  147. let markResult = store.currentTask?.markResult as MarkResult;
  148. if (props.useMarkResult) {
  149. // check if have MarkResult for currentTask
  150. if (!markResult) return;
  151. }
  152. if (!store.currentTask) return;
  153. const images = [];
  154. // 必须要先加载一遍,把“选择整图”的宽高重置后,再算总高度
  155. for (const sliceConfig of store.currentTask.sliceConfig) {
  156. const url = store.currentTask.sliceUrls[sliceConfig.i - 1];
  157. const image = await loadImage(url);
  158. images[sliceConfig.i] = image;
  159. if (sliceConfig.w === 0 && sliceConfig.h === 0) {
  160. // 选择整图时,w/h 为0
  161. sliceConfig.w = image.naturalWidth;
  162. sliceConfig.h = image.naturalHeight;
  163. }
  164. }
  165. theFinalHeight = store.currentTask.sliceConfig
  166. .map((v) => v.h)
  167. .reduce((acc, v) => (acc += v));
  168. maxSliceWidth = Math.max(...store.currentTask.sliceConfig.map((v) => v.w));
  169. // 用来保存sliceImage在整个图片容器中(不包括image-seperator)的高度范围
  170. let accumTopHeight = 0;
  171. let accumBottomHeight = 0;
  172. const tempSliceImagesWithTrackList = [] as Array<SliceImage>;
  173. for (const sliceConfig of store.currentTask.sliceConfig) {
  174. accumBottomHeight += sliceConfig.h;
  175. const url = store.currentTask.sliceUrls[sliceConfig.i - 1];
  176. const indexInSliceUrls = sliceConfig.i;
  177. const image = images[sliceConfig.i];
  178. const dataUrl = await getDataUrlForSliceConfig(
  179. image,
  180. sliceConfig,
  181. maxSliceWidth,
  182. url
  183. );
  184. let trackLists = [] as Array<Track>;
  185. if (props.useMarkResult) {
  186. trackLists = markResult.trackList;
  187. } else {
  188. trackLists = store.currentTask.questionList
  189. .map((q) => q.trackList)
  190. .reduce((acc, t) => {
  191. acc = acc.concat(t);
  192. return acc;
  193. }, [] as Array<Track>);
  194. }
  195. const thisImageTrackList = trackLists.filter(
  196. (t) => t.offsetIndex === indexInSliceUrls
  197. );
  198. let tagLists = [] as Array<SpecialTag>;
  199. if (props.useMarkResult) {
  200. tagLists = markResult.specialTagList ?? [];
  201. } else {
  202. tagLists = store.currentTask.specialTagList ?? [];
  203. }
  204. const thisImageTagList = tagLists.filter(
  205. (t) => t.offsetIndex === indexInSliceUrls
  206. );
  207. const sliceImageRendered = await loadImage(dataUrl!);
  208. tempSliceImagesWithTrackList.push({
  209. url: dataUrl!,
  210. indexInSliceUrls: sliceConfig.i,
  211. // 通过positionY来定位是第几张slice的还原,并过滤出相应的track
  212. trackList: thisImageTrackList.filter(
  213. (t) =>
  214. t.positionY >= accumTopHeight / theFinalHeight &&
  215. t.positionY < accumBottomHeight / theFinalHeight
  216. ),
  217. tagList: thisImageTagList.filter(
  218. (t) =>
  219. t.positionY >= accumTopHeight / theFinalHeight &&
  220. t.positionY < accumBottomHeight / theFinalHeight
  221. ),
  222. // originalImageWidth: image.naturalWidth,
  223. // originalImageHeight: image.naturalHeight,
  224. sliceImageWidth: sliceImageRendered.naturalWidth,
  225. sliceImageHeight: sliceImageRendered.naturalHeight,
  226. dx: sliceConfig.x,
  227. dy: sliceConfig.y,
  228. accumTopHeight,
  229. effectiveWidth: sliceConfig.w,
  230. });
  231. accumTopHeight = accumBottomHeight;
  232. }
  233. // console.log("render: ", store.currentTask.secretNumber);
  234. if (sliceImagesWithTrackList.length === 0) {
  235. // 初次渲染,不做动画
  236. sliceImagesWithTrackList.push(...tempSliceImagesWithTrackList);
  237. } else {
  238. rotateBoard = 1;
  239. setTimeout(() => {
  240. sliceImagesWithTrackList.splice(0);
  241. sliceImagesWithTrackList.push(...tempSliceImagesWithTrackList);
  242. setTimeout(() => {
  243. rotateBoard = 0;
  244. }, 300);
  245. }, 300);
  246. }
  247. }
  248. async function processSplitConfig() {
  249. let markResult = store.currentTask?.markResult as MarkResult;
  250. if (props.useMarkResult) {
  251. // check if have MarkResult for currentTask
  252. if (!markResult) return;
  253. }
  254. if (!store.currentTask) return;
  255. const images = [];
  256. for (const url of store.currentTask.sliceUrls) {
  257. const image = await loadImage(url);
  258. images.push(image);
  259. }
  260. // 裁切块,可能是一块,两块,三块... [start, width ...] => [0, 0.3] | [0, 0.55, 0.45, 0.55] | [0, 0.35, 0.33, 0.35, 0.66, 0.35]
  261. const splitConfigPairs = store.setting.splitConfig
  262. .map((v, index, ary) => (index % 2 === 0 ? [v, ary[index + 1]] : false))
  263. .filter((v) => v) as unknown as Array<[number, number]>;
  264. // 最大的 splitConfig 的宽度
  265. const maxSplitConfig = Math.max(
  266. ...store.setting.splitConfig.filter((v, i) => i % 2)
  267. );
  268. maxSliceWidth =
  269. Math.max(...images.map((v) => v.naturalWidth)) * maxSplitConfig;
  270. theFinalHeight =
  271. splitConfigPairs.length *
  272. images.reduce((acc, v) => (acc += v.naturalHeight), 0);
  273. // 高度比宽度大的图片不裁切
  274. const imagesOfBiggerHeight = images.filter(
  275. (v) => v.naturalHeight > v.naturalWidth
  276. );
  277. if (imagesOfBiggerHeight.length > 0) {
  278. maxSliceWidth = Math.max(
  279. maxSliceWidth,
  280. ...imagesOfBiggerHeight.map((v) => v.naturalWidth)
  281. );
  282. // 不裁切的图剪切多加的高度
  283. theFinalHeight -=
  284. imagesOfBiggerHeight.map((v) => v.naturalHeight).reduce((p, c) => p + c) *
  285. (splitConfigPairs.length - 1);
  286. }
  287. let accumTopHeight = 0;
  288. let accumBottomHeight = 0;
  289. const tempSliceImagesWithTrackList = [] as Array<SliceImage>;
  290. for (const url of store.currentTask.sliceUrls) {
  291. for (const config of splitConfigPairs) {
  292. const indexInSliceUrls = store.currentTask.sliceUrls.indexOf(url) + 1;
  293. const image = images[indexInSliceUrls - 1];
  294. let shouldBreak = false;
  295. if (image.naturalHeight > image.naturalWidth) {
  296. config[0] = 0;
  297. config[1] = 1;
  298. shouldBreak = true;
  299. }
  300. accumBottomHeight += image.naturalHeight;
  301. const dataUrl = await getDataUrlForSplitConfig(
  302. image,
  303. config,
  304. maxSliceWidth,
  305. url
  306. );
  307. let trackLists = [] as Array<Track>;
  308. if (props.useMarkResult) {
  309. trackLists = markResult.trackList;
  310. } else {
  311. // 成绩查询 questionList 可能为空
  312. trackLists = (store.currentTask.questionList || [])
  313. .map((q) => q.trackList)
  314. .reduce((acc, t) => {
  315. acc = acc.concat(t);
  316. return acc;
  317. }, [] as Array<Track>);
  318. }
  319. const thisImageTrackList = trackLists.filter(
  320. (t) => t.offsetIndex === indexInSliceUrls
  321. );
  322. let tagLists = [] as Array<SpecialTag>;
  323. if (props.useMarkResult) {
  324. tagLists = markResult.specialTagList ?? [];
  325. } else {
  326. tagLists = store.currentTask.specialTagList ?? [];
  327. }
  328. const thisImageTagList = tagLists.filter(
  329. (t) => t.offsetIndex === indexInSliceUrls
  330. );
  331. const sliceImageRendered = await loadImage(dataUrl!);
  332. tempSliceImagesWithTrackList.push({
  333. url: dataUrl!,
  334. indexInSliceUrls: store.currentTask.sliceUrls.indexOf(url) + 1,
  335. trackList: thisImageTrackList.filter(
  336. (t) =>
  337. t.positionY >= accumTopHeight / theFinalHeight &&
  338. t.positionY < accumBottomHeight / theFinalHeight
  339. ),
  340. tagList: thisImageTagList.filter(
  341. (t) =>
  342. t.positionY >= accumTopHeight / theFinalHeight &&
  343. t.positionY < accumBottomHeight / theFinalHeight
  344. ),
  345. // originalImageWidth: image.naturalWidth,
  346. // originalImageHeight: image.naturalHeight,
  347. sliceImageWidth: sliceImageRendered.naturalWidth,
  348. sliceImageHeight: sliceImageRendered.naturalHeight,
  349. dx: image.naturalWidth * config[0],
  350. dy: 0,
  351. accumTopHeight,
  352. effectiveWidth: image.naturalWidth * config[1],
  353. });
  354. accumTopHeight = accumBottomHeight;
  355. // 如果本图高比宽大,不该裁切,则跳过多次裁切
  356. if (shouldBreak) {
  357. break;
  358. }
  359. }
  360. }
  361. rotateBoard = 1;
  362. addTimeout(() => {
  363. sliceImagesWithTrackList.splice(0);
  364. sliceImagesWithTrackList.push(...tempSliceImagesWithTrackList);
  365. addTimeout(() => {
  366. rotateBoard = 0;
  367. }, 300);
  368. }, 300);
  369. }
  370. // should not render twice at the same time
  371. let renderLock = false;
  372. const renderPaperAndMark = async () => {
  373. if (!store) return;
  374. if (!store.isScanImage) return;
  375. if (renderLock) {
  376. console.log("上个任务还未渲染完毕,稍等一秒再尝试渲染");
  377. await new Promise((res) => setTimeout(res, 1000));
  378. await renderPaperAndMark();
  379. return;
  380. }
  381. renderLock = true;
  382. // check if have MarkResult for currentTask
  383. let markResult = store.currentTask?.markResult;
  384. if ((props.useMarkResult && !markResult) || !store.currentTask) {
  385. renderLock = false;
  386. return;
  387. }
  388. try {
  389. store.globalMask = true;
  390. const hasSliceConfig = store.currentTask?.sliceConfig?.length;
  391. if (hasSliceConfig) {
  392. await processSliceConfig();
  393. } else {
  394. await processSplitConfig();
  395. }
  396. // 研究生考试需要停留在上次阅卷的位置,所以注释掉下面的代码
  397. // await new Promise((res) => setTimeout(res, 700));
  398. // const container = <HTMLDivElement>(
  399. // document.querySelector(".mark-body-container")
  400. // );
  401. // addTimeout(() => {
  402. // container?.scrollTo({
  403. // top: 0,
  404. // left: 0,
  405. // behavior: "smooth",
  406. // });
  407. // }, 10);
  408. } catch (error) {
  409. sliceImagesWithTrackList.splice(0);
  410. console.trace("render error ", error);
  411. // 图片加载出错,自动加载下一个任务
  412. emit("error");
  413. } finally {
  414. renderLock = false;
  415. store.globalMask = false;
  416. }
  417. };
  418. // watchEffect(renderPaperAndMark);
  419. // 在阻止渲染的情况下,watchEffect收集不到 store.currentTask 的依赖,会导致本组件不再更新
  420. watch(
  421. () => store.currentTask,
  422. () => renderPaperAndMark()
  423. );
  424. // end: 计算裁切图和裁切图上的分数轨迹和特殊标记轨迹
  425. // start: 放大缩小和之后的滚动
  426. let answerPaperScale = $computed(() => {
  427. // 放大、缩小不影响页面之前的滚动条定位
  428. let percentWidth = 0;
  429. let percentTop = 0;
  430. const container = document.querySelector(
  431. ".mark-body-container"
  432. ) as HTMLDivElement;
  433. if (container) {
  434. const { scrollLeft, scrollTop, scrollWidth, scrollHeight } = container;
  435. percentWidth = scrollLeft / scrollWidth;
  436. percentTop = scrollTop / scrollHeight;
  437. }
  438. addTimeout(() => {
  439. if (container) {
  440. const { scrollWidth, scrollHeight } = container;
  441. container.scrollTo({
  442. left: scrollWidth * percentWidth,
  443. top: scrollHeight * percentTop,
  444. });
  445. }
  446. }, 10);
  447. const scale = store.setting.uiSetting["answer.paper.scale"];
  448. return scale * 100 + "%";
  449. });
  450. // end: 放大缩小和之后的滚动
  451. // start: 显示评分状态和清除轨迹
  452. let markStatus = $ref("");
  453. if (props.useMarkResult) {
  454. watch(
  455. () => store.currentTask,
  456. () => {
  457. markStatus = store.getMarkStatus;
  458. }
  459. );
  460. // 清除分数轨迹
  461. watchEffect(() => {
  462. for (const track of store.removeScoreTracks) {
  463. for (const sliceImage of sliceImagesWithTrackList) {
  464. sliceImage.trackList = sliceImage.trackList.filter(
  465. (t) =>
  466. !(
  467. t.mainNumber === track.mainNumber &&
  468. t.subNumber === track.subNumber &&
  469. t.number === track.number
  470. )
  471. );
  472. }
  473. }
  474. // 清除后,删除,否则会影响下次切换
  475. store.removeScoreTracks.splice(0);
  476. });
  477. // 清除特殊标记轨迹
  478. watchEffect(() => {
  479. for (const sliceImage of sliceImagesWithTrackList) {
  480. sliceImage.tagList = sliceImage.tagList.filter((t) =>
  481. store.currentTask?.markResult.specialTagList.find(
  482. (st) =>
  483. st.offsetIndex === t.offsetIndex &&
  484. st.offsetX === t.offsetX &&
  485. st.offsetY === t.offsetY
  486. )
  487. );
  488. }
  489. if (store.currentTask?.markResult.specialTagList.length === 0) {
  490. for (const sliceImage of sliceImagesWithTrackList) {
  491. sliceImage.tagList = [];
  492. }
  493. }
  494. });
  495. }
  496. // end: 显示评分状态和清除轨迹
  497. // start: 评分
  498. const innerMakeTrack = (event: MouseEvent, item: SliceImage) => {
  499. props.makeTrack(event, item, maxSliceWidth, theFinalHeight);
  500. };
  501. // end: 评分
  502. // start: 显示大图,供查看和翻转
  503. const showBigImage = (event: MouseEvent) => {
  504. event.preventDefault();
  505. // console.log(event);
  506. let viewer: Viewer = null as unknown as Viewer;
  507. viewer && viewer.destroy();
  508. viewer = new Viewer(event.target as HTMLElement, {
  509. // inline: true,
  510. viewed() {
  511. viewer.zoomTo(1);
  512. },
  513. hidden() {
  514. viewer.destroy();
  515. },
  516. zIndex: 1000000,
  517. });
  518. viewer.show();
  519. };
  520. // end: 显示大图,供查看和翻转
  521. // onRenderTriggered(({ key, target, type }) => {
  522. // console.log({ key, target, type });
  523. // });
  524. </script>
  525. <style scoped>
  526. .mark-body-container {
  527. position: relative;
  528. min-height: calc(100vh - 56px);
  529. height: calc(100vh - 56px);
  530. overflow: auto;
  531. /* background-size: 8px 8px;
  532. background-image: linear-gradient(to right, #e7e7e7 4px, transparent 4px),
  533. linear-gradient(to bottom, transparent 4px, #e7e7e7 4px); */
  534. background-color: var(--app-container-bg-color);
  535. background-image: linear-gradient(45deg, #e0e0e0 25%, transparent 25%),
  536. linear-gradient(-45deg, #e0e0e0 25%, transparent 25%),
  537. linear-gradient(45deg, transparent 75%, #e0e0e0 75%),
  538. linear-gradient(-45deg, transparent 75%, #e0e0e0 75%);
  539. background-size: 20px 20px;
  540. background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
  541. transform: inherit;
  542. }
  543. .mark-body-container img {
  544. width: 100%;
  545. }
  546. .empty-task {
  547. width: calc(100%);
  548. height: calc(100%);
  549. font-size: 20px;
  550. overflow: hidden;
  551. background-color: var(--app-container-bg-color);
  552. }
  553. .empty-task img {
  554. display: block;
  555. width: 288px;
  556. height: 225px;
  557. clip-path: polygon(0 0, 0 80%, 100% 80%, 100% 0);
  558. }
  559. .single-image-container {
  560. position: relative;
  561. }
  562. .image-seperator {
  563. border: 2px solid transparent;
  564. }
  565. .status-container {
  566. position: fixed;
  567. top: 56px;
  568. right: 340px;
  569. color: white;
  570. pointer-events: none;
  571. font-size: var(--app-title-font-size);
  572. background-color: #ef7c78;
  573. width: 30px;
  574. height: 50px;
  575. text-align: center;
  576. z-index: 1000;
  577. }
  578. .double-triangle {
  579. background-color: #ef7c78;
  580. width: 30px;
  581. height: 6px;
  582. clip-path: polygon(0 0, 0 6px, 50% 0, 100% 0, 100% 6px, 50% 0);
  583. position: absolute;
  584. bottom: -5px;
  585. }
  586. @keyframes rotate {
  587. 0% {
  588. transform: rotateY(0deg);
  589. opacity: 1;
  590. }
  591. 50% {
  592. transform: rotateY(90deg);
  593. }
  594. 100% {
  595. transform: rotateY(0deg);
  596. opacity: 0;
  597. }
  598. }
  599. .rotate-board-1 {
  600. animation: rotate 0.6s ease-in-out;
  601. }
  602. </style>