WordPhrase.vue 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849
  1. <template>
  2. <div class="NPC-zhedie" v-if="curQue">
  3. <div :class="curQue.titleBg == 'white' ? 'topTitleWhite' : 'topTitle'">
  4. <div class="NPC-top-left">
  5. <span class="NPC-topTitle-text">{{ curQue.title }}</span>
  6. <span
  7. :class="['NPC-play-all', playClass]"
  8. @click.stop="playNewwords"
  9. ></span>
  10. </div>
  11. <div class="NPC-top-right" @click="handleChangeTab">
  12. <span class="NPC-top-right-text">{{ wordShow ? "收起" : "展开" }}</span>
  13. <template v-if="curQue.titleBg == 'white'">
  14. <img
  15. v-if="wordShow"
  16. src="../../../assets/NPC/down-black.png"
  17. alt=""
  18. />
  19. <img v-else src="../../../assets/NPC/up-black.png" alt="" />
  20. </template>
  21. <template v-else>
  22. <img v-if="wordShow" src="../../../assets/NPC/down.png" alt="" />
  23. <img v-else src="../../../assets/NPC/up.png" alt="" />
  24. </template>
  25. </div>
  26. </div>
  27. <el-collapse-transition>
  28. <div
  29. class="NPC-word-list"
  30. v-if="curQue.option && curQue.option.length > 0"
  31. v-show="wordShow"
  32. >
  33. <ul class="NPC-word-table" cellspacing="0" border="0" cellpadding="0">
  34. <li
  35. class="NPC-word-tr"
  36. v-for="(item, index) in curQue.option"
  37. :key="'curQue.option' + index"
  38. >
  39. <div
  40. :class="[
  41. 'NPC-word-row',
  42. playClass && mp3_index == sItem.sIndex ? 'active' : '',
  43. ]"
  44. v-for="(sItem, sIndex) in item"
  45. :key="'curQue.option.child' + sIndex"
  46. >
  47. <template
  48. v-if="
  49. sItem.mp3_list &&
  50. sItem.mp3_list.length > 0 &&
  51. sItem.mp3_list[0].id
  52. "
  53. >
  54. <span
  55. :class="[
  56. themeColor == 'green'
  57. ? 'NPC-play-btn-green'
  58. : themeColor == 'red'
  59. ? 'NPC-play-btn-red'
  60. : 'NPC-play-btn-brown',
  61. playClass && mp3_index == sItem.sIndex ? 'active' : '',
  62. ]"
  63. @click="palyAudio(sItem.sIndex)"
  64. ></span>
  65. <audio
  66. :id="'word' + indexs + indexss + sItem.sIndex"
  67. :src="sItem.mp3_list[0].id"
  68. ></audio>
  69. </template>
  70. <template v-else>
  71. <span style="width: 16px; height: 16px"></span>
  72. </template>
  73. <template v-if="sItem.mIndex == 0">
  74. <b class="tabNum">{{ index + 1 }}</b>
  75. </template>
  76. <div
  77. v-else
  78. style="width: 16px; height: 16px; margin-left: 8px"
  79. ></div>
  80. <template
  81. v-if="
  82. sItem.pinyin_site &&
  83. (sItem.pinyin_site == 'top' || sItem.pinyin_site == 'bottom')
  84. "
  85. >
  86. <div class="NPC-word-tab-box">
  87. <span
  88. class="NPC-word-tab-common NPC-word-tab-pinyin"
  89. :class="[
  90. sItem.motif_color
  91. ? 'NPC-word-tab-pinyin-' + themeColor
  92. : '',
  93. ]"
  94. v-if="sItem.pinyin_site == 'top'"
  95. >
  96. {{ sItem.pinyin }}
  97. </span>
  98. <span
  99. class="NPC-word-tab-common NPC-word-tab-word"
  100. :class="[
  101. sItem.motif_color
  102. ? 'NPC-word-tab-word-' + themeColor
  103. : '',
  104. ]"
  105. >
  106. {{ sItem.new_word }}
  107. </span>
  108. <span
  109. class="NPC-word-tab-common NPC-word-tab-pinyin"
  110. :class="[
  111. sItem.motif_color
  112. ? 'NPC-word-tab-pinyin-' + themeColor
  113. : '',
  114. ]"
  115. v-if="sItem.pinyin_site == 'bottom'"
  116. >
  117. {{ sItem.pinyin }}
  118. </span>
  119. </div>
  120. <span
  121. class="NPC-word-tab-common NPC-word-tab-cixing"
  122. v-html="sItem.cixing"
  123. ></span>
  124. <span
  125. class="NPC-word-tab-common NPC-word-tab-def"
  126. v-html="sItem.def_str"
  127. ></span>
  128. </template>
  129. <template v-else>
  130. <span
  131. class="NPC-word-tab-common NPC-word-tab-pinyin"
  132. :class="[
  133. sItem.motif_color
  134. ? 'NPC-word-tab-pinyin-' + themeColor
  135. : '',
  136. ]"
  137. v-if="!sItem.pinyin_site || sItem.pinyin_site == 'first'"
  138. >
  139. {{ sItem.pinyin }}
  140. </span>
  141. <span
  142. class="NPC-word-tab-common NPC-word-tab-word"
  143. :class="[
  144. sItem.motif_color ? 'NPC-word-tab-word-' + themeColor : '',
  145. ]"
  146. >
  147. {{ sItem.new_word }}
  148. </span>
  149. <span
  150. class="NPC-word-tab-common NPC-word-tab-pinyin"
  151. :class="[
  152. sItem.motif_color
  153. ? 'NPC-word-tab-pinyin-' + themeColor
  154. : '',
  155. ]"
  156. v-if="sItem.pinyin_site == 'last'"
  157. >
  158. {{ sItem.pinyin }}
  159. </span>
  160. <span
  161. class="NPC-word-tab-common NPC-word-tab-cixing"
  162. v-html="sItem.cixing"
  163. ></span>
  164. <span
  165. class="NPC-word-tab-common NPC-word-tab-def"
  166. v-html="sItem.def_str"
  167. ></span>
  168. </template>
  169. <span v-if="curQue.isInfor">
  170. <img
  171. src="../../../assets/NPC/detail-icon.png"
  172. class="detail-icon"
  173. @click="showDetail(sItem)"
  174. />
  175. </span>
  176. </div>
  177. </li>
  178. </ul>
  179. </div>
  180. </el-collapse-transition>
  181. <div class="practiceBox" v-if="detailShow">
  182. <WordPhraseDetail
  183. :data="data"
  184. :changeDetailIndex="changeDetailIndex"
  185. :closeWord="closeWordShow"
  186. :detailIndex="detailIndex"
  187. :optionRes="optionRes"
  188. :themeColor="themeColor"
  189. :currentTreeID="currentTreeID"
  190. type="newWordDetail"
  191. />
  192. </div>
  193. <audio ref="newwordAudio" />
  194. </div>
  195. </template>
  196. <script>
  197. //这里可以导入其它文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等)
  198. //例如:import 《组件名称》from ‘《组件路径》';
  199. import WordPhraseDetail from "./components/WordPhraseDetail.vue";
  200. import { getHZChineseInfo } from "@/api/ajax";
  201. export default {
  202. //import引入的组件需要注入到对象中才能使用
  203. components: {
  204. WordPhraseDetail,
  205. },
  206. props: ["curQue", "themeColor", "currentTreeID", "indexs", "indexss"],
  207. data() {
  208. //这里存放数据
  209. return {
  210. wordShow: true,
  211. data: null,
  212. detailShow: false,
  213. detailIndex: 0,
  214. audio: new Audio(),
  215. playClass: "",
  216. mp3_index: -1,
  217. playWord: null,
  218. optionRes: [],
  219. mp3List: [],
  220. isSuccess: false,
  221. loading: false,
  222. mp3: "",
  223. };
  224. },
  225. //计算属性 类似于data概念
  226. computed: {},
  227. //监控data中数据变化
  228. watch: {
  229. currentTreeID: {
  230. handler: function () {
  231. this.mp3_index = -1; // 全文预览
  232. this.optionRes = []; // 显示单词和短语
  233. this.mp3List = []; // 语音练习
  234. this.initData();
  235. },
  236. deep: true,
  237. },
  238. },
  239. //方法集合
  240. methods: {
  241. handleChange(val) {},
  242. palyAudio(sIndex) {
  243. let _this = this;
  244. _this.stopAudio();
  245. let node = document.getElementById(
  246. "word" + _this.indexs + _this.indexss + sIndex
  247. );
  248. let mp3 = node.src;
  249. let audio = document.getElementsByTagName("audio");
  250. audio.forEach((item) => {
  251. if (item.src != mp3) {
  252. item.pause();
  253. }
  254. });
  255. _this.playWord = node;
  256. if (node) {
  257. this.mp3_index = sIndex;
  258. node.play();
  259. }
  260. this.handleListenPlay(sIndex);
  261. },
  262. handleListenPlay(sIndex) {
  263. let _this = this;
  264. if (_this.playWord) {
  265. let _this = this;
  266. _this.playWord.addEventListener("play", function () {
  267. _this.playClass = "nn";
  268. });
  269. _this.playWord.addEventListener("pause", function () {
  270. _this.mp3_index = -1;
  271. _this.playClass = "";
  272. });
  273. _this.playWord.addEventListener("ended", function () {
  274. _this.mp3_index = -1;
  275. _this.playClass = "";
  276. });
  277. }
  278. },
  279. // 打开单词详情
  280. showDetail(item) {
  281. this.data = null;
  282. this.data = item;
  283. this.detailShow = true;
  284. this.detailIndex = item.sIndex;
  285. },
  286. // 关闭单词详情
  287. closeWordShow(val) {
  288. this.detailShow = val;
  289. },
  290. changeDetailIndex(val) {
  291. let _this = this;
  292. if (val == "last") {
  293. _this.detailIndex--;
  294. } else {
  295. _this.detailIndex++;
  296. }
  297. _this.data = null;
  298. _this.data = _this.optionRes[_this.detailIndex];
  299. //_this.getWordLiju(_this.data.new_word);
  300. },
  301. playNewwords() {
  302. let _this = this;
  303. if (_this.playWord) {
  304. _this.playWord.pause();
  305. }
  306. if (_this.playClass) {
  307. _this.$refs.newwordAudio.pause();
  308. // _this.mp3_index = -1;
  309. _this.playClass = "";
  310. } else {
  311. let mp3_index = _this.mp3_index == -1 ? 0 : _this.mp3_index;
  312. let leg = _this.mp3List.length;
  313. let mp3 = _this.mp3List[mp3_index].mp3_list[0].id;
  314. _this.mp3_index = _this.mp3List[mp3_index].sIndex;
  315. _this.handlePlayVoice(mp3);
  316. _this.$refs.newwordAudio.addEventListener("ended", function () {
  317. setTimeout(() => {
  318. if (_this.playClass != "nn") {
  319. if (mp3_index < leg - 1) {
  320. if (_this.playClass) {
  321. mp3_index = mp3_index + 1;
  322. _this.mp3_index = _this.mp3List[mp3_index].sIndex;
  323. mp3 =
  324. _this.mp3List[mp3_index].mp3_list.length > 0 &&
  325. _this.mp3List[mp3_index].mp3_list[0].id;
  326. if (mp3) {
  327. _this.handlePlayVoice(mp3);
  328. }
  329. }
  330. } else {
  331. _this.mp3_index = -1;
  332. _this.playClass = "";
  333. }
  334. }
  335. }, 1000);
  336. });
  337. }
  338. },
  339. handlePlayVoice3(mp3) {
  340. let _this = this;
  341. let audio = document.getElementsByTagName("audio");
  342. audio.forEach((item) => {
  343. if (item.src != mp3) {
  344. item.pause();
  345. }
  346. });
  347. if (!mp3) {
  348. return;
  349. }
  350. if (!_this.audio.paused) {
  351. _this.audio.pause();
  352. } else {
  353. _this.audio.pause();
  354. _this.audio.load();
  355. _this.audio.src = mp3;
  356. _this.audio.loop = false;
  357. _this.audio.play();
  358. }
  359. },
  360. handlePlayVoice(mp3) {
  361. let _this = this;
  362. let audio = document.getElementsByTagName("audio");
  363. audio.forEach((item) => {
  364. if (item.src != mp3) {
  365. item.pause();
  366. }
  367. });
  368. if (!mp3) {
  369. return;
  370. }
  371. // setTimeout(() => {
  372. //_this.$refs.newwordAudio.pause();
  373. _this.$refs.newwordAudio.src = mp3;
  374. //_this.$refs.newwordAudio.load();
  375. _this.$refs.newwordAudio.play();
  376. // }, 1000);
  377. },
  378. stopAudio() {
  379. this.$refs.newwordAudio.pause();
  380. },
  381. initData() {
  382. if (this.curQue.type == "NewWord_chs") {
  383. let resIndex = 0;
  384. let optionRes = [];
  385. let mp3List = [];
  386. this.curQue.option.forEach((item, index) => {
  387. optionRes = optionRes.concat(item);
  388. item.forEach((sItem, sIndex) => {
  389. sItem.mIndex = sIndex;
  390. sItem.sIndex = resIndex;
  391. resIndex++;
  392. sItem.def_str =
  393. sItem.definition_list.length > 0
  394. ? sItem.definition_list.join(" ")
  395. : "";
  396. if (sItem.mp3_list[0]) {
  397. mp3List.push(sItem);
  398. }
  399. });
  400. });
  401. this.optionRes = JSON.parse(JSON.stringify(optionRes));
  402. this.mp3List = mp3List;
  403. }
  404. },
  405. handleChangeTab() {
  406. this.wordShow = !this.wordShow;
  407. },
  408. },
  409. //生命周期 - 创建完成(可以访问当前this实例)
  410. created() {
  411. this.initData();
  412. },
  413. //生命周期 - 挂载完成(可以访问DOM元素)
  414. mounted() {
  415. let _this = this;
  416. _this.$refs.newwordAudio.addEventListener("play", function () {
  417. _this.playClass = "active";
  418. });
  419. _this.$refs.newwordAudio.addEventListener("pause", function () {
  420. //_this.playClass = "";
  421. });
  422. },
  423. //生命周期-创建之前
  424. beforeCreated() {},
  425. //生命周期-挂载之前
  426. beforeMount() {},
  427. //生命周期-更新之前
  428. beforUpdate() {},
  429. //生命周期-更新之后
  430. updated() {},
  431. //生命周期-销毁之前
  432. beforeDestory() {},
  433. //生命周期-销毁完成
  434. destoryed() {},
  435. //如果页面有keep-alive缓存功能,这个函数会触发
  436. activated() {},
  437. };
  438. </script>
  439. <style lang="scss" scoped>
  440. /* @import url(); 引入css类 */
  441. .NPC-zhedie {
  442. width: 780px;
  443. margin-bottom: 24px;
  444. .practiceBox {
  445. position: fixed;
  446. left: 0;
  447. top: 0;
  448. z-index: 999;
  449. width: 100%;
  450. height: 100vh;
  451. background: rgba(0, 0, 0, 0.19);
  452. box-sizing: border-box;
  453. overflow: hidden;
  454. overflow-y: auto;
  455. }
  456. .NPC-word-list {
  457. background: #f7f7f7;
  458. }
  459. .NPC-word-table {
  460. width: 100%;
  461. > .NPC-word-tr {
  462. background: #fff;
  463. border-radius: 8px;
  464. margin-bottom: 8px;
  465. .NPC-word-row {
  466. cursor: pointer;
  467. display: flex;
  468. justify-content: flex-start;
  469. padding: 8px 13px 8px 12px;
  470. border-radius: 8px;
  471. &.active {
  472. background: linear-gradient(
  473. 0deg,
  474. rgba(0, 0, 0, 0.08),
  475. rgba(0, 0, 0, 0.08)
  476. ),
  477. #ffffff;
  478. }
  479. > span {
  480. font-size: 16px;
  481. line-height: 150%;
  482. color: #000000;
  483. }
  484. }
  485. .tabNum {
  486. background: #de4444;
  487. text-align: center;
  488. width: 16px;
  489. height: 16px;
  490. color: #ffffff;
  491. border-radius: 50%;
  492. font-size: 12px;
  493. font-family: "robot";
  494. line-height: 16px;
  495. margin-top: 4px;
  496. margin-left: 8px;
  497. }
  498. .NPC-word-tab-box {
  499. width: 240px;
  500. span {
  501. display: block;
  502. width: 100%;
  503. color: #000000;
  504. margin: 2px 0;
  505. }
  506. }
  507. .NPC-word-tab-common {
  508. padding-left: 8px;
  509. width: 120px;
  510. box-sizing: border-box;
  511. }
  512. .NPC-word-tab-pinyin {
  513. font-family: "GB-PINYINOK-B";
  514. white-space: nowrap;
  515. font-size: 12px;
  516. &.NPC-word-tab-pinyin-red {
  517. color: #e35454;
  518. }
  519. &.NPC-word-tab-pinyin-green {
  520. color: #24b99e;
  521. }
  522. &.NPC-word-tab-pinyin-brown {
  523. color: #bd8865;
  524. }
  525. }
  526. .NPC-word-tab-word {
  527. font-family: "FZJCGFKTK";
  528. white-space: nowrap;
  529. font-size: 16px;
  530. &.NPC-word-tab-word-red {
  531. color: #e35454;
  532. }
  533. &.NPC-word-tab-word-green {
  534. color: #24b99e;
  535. }
  536. &.NPC-word-tab-word-brown {
  537. color: #bd8865;
  538. }
  539. }
  540. .NPC-word-tab-cixing {
  541. font-family: "robot";
  542. width: 48px;
  543. box-sizing: border-box;
  544. text-align: left;
  545. font-style: italic;
  546. }
  547. .NPC-word-tab-def {
  548. flex: 1;
  549. font-family: "robot";
  550. word-break: break-word;
  551. box-sizing: border-box;
  552. white-space: pre-wrap;
  553. }
  554. }
  555. }
  556. .NPC-play-btn-brown {
  557. margin-top: 4px;
  558. width: 16px;
  559. height: 16px;
  560. display: block;
  561. background: url("../../../assets/NPC/play-brown.png") no-repeat left top;
  562. background-size: 100% 100%;
  563. &.active {
  564. background: url("../../../assets/NPC/icon-voice-play-brown.png") no-repeat
  565. left top;
  566. background-size: 100% 100%;
  567. }
  568. }
  569. .NPC-play-btn-green {
  570. margin-top: 4px;
  571. width: 16px;
  572. height: 16px;
  573. display: block;
  574. background: url("../../../assets/NPC/play-green.png") no-repeat left top;
  575. background-size: 100% 100%;
  576. &.active {
  577. background: url("../../../assets/NPC/icon-voice-play-green.png") no-repeat
  578. left top;
  579. background-size: 100% 100%;
  580. }
  581. }
  582. .NPC-play-btn-red {
  583. margin-top: 4px;
  584. width: 16px;
  585. height: 16px;
  586. display: block;
  587. background: url("../../../assets/NPC/play-red.png") no-repeat left top;
  588. background-size: 100% 100%;
  589. &.active {
  590. background: url("../../../assets/NPC/icon-voice-play-red.png") no-repeat
  591. left top;
  592. background-size: 100% 100%;
  593. }
  594. }
  595. .NPC-word-list {
  596. padding: 20px 24px;
  597. border: 1px solid rgba(0, 0, 0, 0.1);
  598. border-top: none;
  599. border-radius: 0 0 8px 8px;
  600. }
  601. .detail-icon {
  602. width: 56px;
  603. height: 24px;
  604. display: block;
  605. cursor: pointer;
  606. }
  607. }
  608. @keyframes firstrotate {
  609. 0% {
  610. transform: rotateZ(0deg);
  611. }
  612. 100% {
  613. transform: rotateZ(180deg);
  614. }
  615. }
  616. @keyframes huifuRotate {
  617. 0% {
  618. transform: rotateZ(180deg);
  619. }
  620. 100% {
  621. transform: rotateZ(0deg);
  622. }
  623. }
  624. </style>
  625. <style lang="scss">
  626. .NPC-zhedie {
  627. .topTitle {
  628. width: 100%;
  629. display: flex;
  630. justify-content: space-between;
  631. padding-left: 24px;
  632. padding-right: 16px;
  633. height: 48px;
  634. background: #e35454;
  635. border: 1px solid rgba(0, 0, 0, 0.1);
  636. overflow: hidden;
  637. border-radius: 8px 8px 0 0;
  638. .NPC-top-left {
  639. display: flex;
  640. justify-content: flex-start;
  641. align-items: center;
  642. .NPC-topTitle-text {
  643. font-family: "sourceR";
  644. font-size: 16px;
  645. color: #fff;
  646. font-weight: bold;
  647. margin-right: 8px;
  648. white-space: pre;
  649. }
  650. .NPC-play-all {
  651. width: 16px;
  652. height: 16px;
  653. background: url("../../../assets/NPC/play-white.png") no-repeat left top;
  654. background-size: 100% 100%;
  655. cursor: pointer;
  656. &.active {
  657. width: 16px;
  658. height: 16px;
  659. background: url("../../../assets/NPC/icon-voice-play-white.png")
  660. no-repeat left top;
  661. background-size: 100% 100%;
  662. }
  663. }
  664. }
  665. .NPC-top-right {
  666. display: flex;
  667. justify-content: flex-start;
  668. align-items: center;
  669. cursor: pointer;
  670. &-text {
  671. font-weight: normal;
  672. font-size: 14px;
  673. line-height: 16px;
  674. color: #ffffff;
  675. }
  676. img {
  677. width: 16px;
  678. height: 16px;
  679. margin-left: 4px;
  680. }
  681. }
  682. img {
  683. width: 24px;
  684. height: 24px;
  685. }
  686. .rotate {
  687. animation-name: firstrotate;
  688. animation-direction: 2s;
  689. animation-fill-mode: both;
  690. animation-timing-function: linear;
  691. }
  692. }
  693. .topTitleWhite {
  694. width: 100%;
  695. display: flex;
  696. justify-content: space-between;
  697. padding-left: 24px;
  698. padding-right: 16px;
  699. height: 48px;
  700. background: #fff;
  701. border: 1px solid rgba(0, 0, 0, 0.1);
  702. overflow: hidden;
  703. border-radius: 8px 8px 0 0;
  704. .NPC-top-left {
  705. display: flex;
  706. justify-content: flex-start;
  707. align-items: center;
  708. .NPC-topTitle-text {
  709. font-family: "sourceR";
  710. font-size: 16px;
  711. color: #000;
  712. font-weight: bold;
  713. margin-right: 8px;
  714. }
  715. .NPC-play-all {
  716. width: 16px;
  717. height: 16px;
  718. background: url("../../../assets/NPC/play-red.png") no-repeat left top;
  719. background-size: 100% 100%;
  720. cursor: pointer;
  721. &.active {
  722. width: 16px;
  723. height: 16px;
  724. background: url("../../../assets/NPC/icon-voice-play-red.png")
  725. no-repeat left top;
  726. background-size: 100% 100%;
  727. }
  728. }
  729. }
  730. .NPC-top-right {
  731. display: flex;
  732. justify-content: flex-start;
  733. align-items: center;
  734. cursor: pointer;
  735. &-text {
  736. font-weight: normal;
  737. font-size: 14px;
  738. line-height: 16px;
  739. color: #000;
  740. }
  741. img {
  742. width: 16px;
  743. height: 16px;
  744. margin-left: 4px;
  745. }
  746. }
  747. img {
  748. width: 24px;
  749. height: 24px;
  750. }
  751. .rotate {
  752. animation-name: firstrotate;
  753. animation-direction: 2s;
  754. animation-fill-mode: both;
  755. animation-timing-function: linear;
  756. }
  757. }
  758. .el-collapse-item__content {
  759. padding-bottom: 0;
  760. }
  761. .el-slider__button {
  762. width: 8px;
  763. height: 8px;
  764. }
  765. .el-slider__runway {
  766. margin: 0;
  767. padding: 0;
  768. }
  769. .el-slider {
  770. position: relative;
  771. top: -3px;
  772. }
  773. .el-collapse {
  774. background: #f7f7f7;
  775. box-sizing: border-box;
  776. border-radius: 8px;
  777. }
  778. .el-collapse-item__wrap {
  779. border: 1px solid rgba(0, 0, 0, 0.1);
  780. border-top: 0;
  781. background: #f7f7f7;
  782. border-radius: 0px 0px 8px 8px;
  783. }
  784. .el-collapse-item__arrow {
  785. display: none;
  786. }
  787. .el-table__row {
  788. padding: 4px 0;
  789. }
  790. }
  791. .NPC-Big-Book-preview-green {
  792. .NPC-zhedie {
  793. .topTitle {
  794. background: #24b99e !important;
  795. }
  796. .tabNum {
  797. background: #24b99e !important;
  798. }
  799. .topTitleWhite {
  800. .NPC-top-left {
  801. .NPC-play-all {
  802. background: url("../../../assets/NPC/play-green.png") no-repeat left
  803. top;
  804. background-size: 100% 100%;
  805. &.active {
  806. background: url("../../../assets/NPC/play-green.png") no-repeat left
  807. top;
  808. background-size: 100% 100%;
  809. }
  810. }
  811. }
  812. }
  813. }
  814. }
  815. .NPC-Big-Book-preview-brown {
  816. .NPC-zhedie {
  817. .topTitle {
  818. background: #bd8865 !important;
  819. }
  820. .tabNum {
  821. background: #bd8865 !important;
  822. }
  823. .topTitleWhite {
  824. .NPC-top-left {
  825. .NPC-play-all {
  826. background: url("../../../assets/NPC/play-brown.png") no-repeat left
  827. top;
  828. background-size: 100% 100%;
  829. &.active {
  830. background: url("../../../assets/NPC/play-brown.png") no-repeat left
  831. top;
  832. background-size: 100% 100%;
  833. }
  834. }
  835. }
  836. }
  837. }
  838. }
  839. </style>