123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277 |
- <template>
- <div class="NPC-zhedie">
- <el-collapse v-model="wordShow" @change="handleChange">
- <el-collapse-item name="1">
- <template #title>
- <div class="topTitle">
- <div class="NPC-top-left">
- <span class="NPC-topTitle-text">{{ curQue.title }}</span>
- </div>
- <div class="NPC-top-right">
- <span class="NPC-top-right-text">{{
- wordShow.indexOf("1") != -1 ? "收起" : "展开"
- }}</span>
- <img
- v-if="wordShow.indexOf('1') != -1"
- src="../../../assets/NPC/down.png"
- alt=""
- />
- <img
- v-else
- class="rotate"
- src="../../../assets/NPC/down.png"
- alt=""
- />
- </div>
- </div>
- </template>
- <div class="NPC-notes-list">
- <div
- class="NPC-notes"
- v-for="(item, index) in curQue.option"
- :key="'NPC-notes' + index"
- >
- <div class="NPC-notes-con">
- <span class="NPC-notes-con-number">{{ item.number }}</span>
- <span class="NPC-notes-con-text">{{ item.con }}</span>
- </div>
- <div class="NPC-notes-trans">
- {{ item.interpret }}
- </div>
- <div
- class="NPC-notes-note"
- v-if="item.note"
- v-html="item.note"
- ></div>
- <div
- class="NPC-notes-note-img"
- v-if="item.img_list && item.img_list.length > 0"
- >
- <div
- v-for="(imgItem, imgIndex) in item.img_list"
- :key="'imgList' + imgIndex"
- >
- <img :src="imgItem.id" class="NPC-notes-img" />
- </div>
- </div>
- </div>
- </div>
- </el-collapse-item>
- </el-collapse>
- </div>
- </template>
- <script>
- //这里可以导入其它文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等)
- //例如:import 《组件名称》from ‘《组件路径》';
- import WordPhraseDetail from "./components/WordPhraseDetail.vue";
- export default {
- //import引入的组件需要注入到对象中才能使用
- components: {
- WordPhraseDetail,
- },
- props: ["curQue"],
- data() {
- //这里存放数据
- return {
- wordShow: ["1"],
- };
- },
- //计算属性 类似于data概念
- computed: {},
- //监控data中数据变化
- watch: {},
- //方法集合
- methods: {
- handleChange() {},
- },
- //生命周期 - 创建完成(可以访问当前this实例)
- created() {},
- //生命周期 - 挂载完成(可以访问DOM元素)
- mounted() {},
- //生命周期-创建之前
- beforeCreated() {},
- //生命周期-挂载之前
- beforeMount() {},
- //生命周期-更新之前
- beforUpdate() {},
- //生命周期-更新之后
- updated() {},
- //生命周期-销毁之前
- beforeDestory() {},
- //生命周期-销毁完成
- destoryed() {},
- //如果页面有keep-alive缓存功能,这个函数会触发
- activated() {},
- };
- </script>
- <style lang="scss" scoped>
- /* @import url(); 引入css类 */
- .NPC-zhedie {
- width: 780px;
- margin-bottom: 16px;
- .topTitle {
- width: 100%;
- display: flex;
- justify-content: space-between;
- padding-left: 24px;
- padding-right: 16px;
- .NPC-top-left {
- display: flex;
- justify-content: flex-start;
- align-items: center;
- .NPC-topTitle-text {
- font-family: "sourceR";
- font-size: 16px;
- color: #fff;
- font-weight: bold;
- margin-right: 8px;
- }
- .NPC-play-all {
- width: 24px;
- height: 24px;
- background: url("../../../assets/NPC/play-white.png") no-repeat left top;
- background-size: 100% 100%;
- cursor: pointer;
- }
- }
- .NPC-top-right {
- display: flex;
- justify-content: flex-start;
- align-items: center;
- &-text {
- font-weight: normal;
- font-size: 14px;
- line-height: 16px;
- color: #ffffff;
- }
- }
- img {
- width: 24px;
- height: 24px;
- }
- .rotate {
- animation-name: firstrotate;
- animation-direction: 2s;
- animation-fill-mode: both;
- animation-timing-function: linear;
- }
- }
- .NPC-notes-list {
- padding: 24px 24px 5px 24px;
- .NPC-notes {
- width: 100%;
- margin-bottom: 24px;
- .NPC-notes-con {
- display: flex;
- justify-content: flex-start;
- align-items: center;
- margin-bottom: 8px;
- > span {
- font-style: normal;
- font-weight: normal;
- font-size: 14px;
- line-height: 150%;
- color: #e35454;
- &.NPC-notes-con-number {
- font-family: "robot";
- }
- &.NPC-notes-con-text {
- flex: 1;
- margin-left: 5px;
- font-family: "GB-PINYINOK-B";
- }
- }
- }
- .NPC-notes-trans {
- font-family: "robot";
- font-style: normal;
- font-weight: bold;
- font-size: 14px;
- line-height: 150%;
- color: #000000;
- margin-bottom: 8px;
- padding-left: 27px;
- }
- .NPC-notes-note {
- font-family: "robot";
- font-style: normal;
- font-weight: normal;
- font-size: 14px;
- line-height: 150%;
- color: #000000;
- text-indent: 27px;
- }
- }
- }
- .NPC-notes-note-img {
- width: 100%;
- > div {
- width: 100%;
- > img {
- max-width: 100%;
- }
- }
- }
- }
- @keyframes firstrotate {
- 0% {
- transform: rotateZ(0deg);
- }
- 100% {
- transform: rotateZ(180deg);
- }
- }
- @keyframes huifuRotate {
- 0% {
- transform: rotateZ(180deg);
- }
- 100% {
- transform: rotateZ(0deg);
- }
- }
- </style>
- <style lang="scss">
- .NPC-zhedie {
- .el-collapse-item__content {
- padding-bottom: 0;
- }
- .el-slider__button {
- width: 8px;
- height: 8px;
- }
- .el-slider__runway {
- margin: 0;
- padding: 0;
- }
- .el-slider {
- position: relative;
- top: -3px;
- }
- .el-collapse {
- background: #f7f7f7;
- box-sizing: border-box;
- border-radius: 8px;
- }
- .el-collapse-item__header {
- height: 48px;
- background: #e35454;
- border: 1px solid rgba(0, 0, 0, 0.1);
- box-sizing: border-box;
- border-radius: 8px 8px 0px 0px;
- }
- .el-collapse-item__wrap {
- border: 1px solid rgba(0, 0, 0, 0.1);
- border-top: 0;
- background: #f7f7f7;
- border-radius: 0px 0px 8px 8px;
- }
- .el-collapse-item__arrow {
- display: none;
- }
- .el-table__row {
- padding: 4px 0;
- }
- }
- </style>
|