natasha 2 rokov pred
rodič
commit
d4a6a371ac

+ 41 - 1
src/components/Adult/preview/DialogueArticleViewChs/RoleChs.vue

@@ -12,7 +12,7 @@
       :src="curRole.img_list[0] && curRole.img_list[0].id"
       class="adult-book-input-roleImg"
     />
-    <div class="adult-book-input-roleImg" v-else-if="curRole.simpleHead!==''" :style="{backgroundImage:'url('+require('../../../../assets/NPC/simple'+(curRole.simpleHead+1)+'.png')+')',backgroundSize:'cover'}"></div>
+    <div class="adult-book-input-roleImg" :class="['adult-book-input-roleImg'+curRole.simpleHead]" v-else-if="curRole.simpleHead!==''"></div>
     <template v-if="type != 1 && curRole.detail.wordsList.length > 0">
       <span class="pinyin" :style="{ color: wordColor }">{{
         curRole.detail.wordsList | handlePinyin
@@ -104,6 +104,46 @@ export default {
       width: 36px;
       height: 36px;
     }
+    &-roleImg0{
+        background: url("../../../../assets/NPC/simple1.png") center
+        no-repeat;
+        background-size: contain;
+    }
+    &-roleImg1{
+        background: url("../../../../assets/NPC/simple2.png") center
+        no-repeat;
+        background-size: contain;
+    }
+    &-roleImg2{
+        background: url("../../../../assets/NPC/simple3.png") center
+        no-repeat;
+        background-size: contain;
+    }
+    &-roleImg3{
+        background: url("../../../../assets/NPC/simple4.png") center
+        no-repeat;
+        background-size: contain;
+    }
+    &-roleImg4{
+        background: url("../../../../assets/NPC/simple5.png") center
+        no-repeat;
+        background-size: contain;
+    }
+    &-roleImg5{
+        background: url("../../../../assets/NPC/simple6.png") center
+        no-repeat;
+        background-size: contain;
+    }
+    &-roleImg6{
+        background: url("../../../../assets/NPC/simple7.png") center
+        no-repeat;
+        background-size: contain;
+    }
+    &-roleImg7{
+        background: url("../../../../assets/NPC/simple8.png") center
+        no-repeat;
+        background-size: contain;
+    }
   }
   .pinyin {
     font-family: "GB-PINYINOK-B";