natasha 2 년 전
부모
커밋
a84ecf2afe
1개의 변경된 파일1개의 추가작업 그리고 5개의 파일을 삭제
  1. 1 5
      src/components/Adult/preview/DialogueArticleViewChs/RoleChs.vue

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

@@ -12,11 +12,7 @@
       :src="curRole.img_list[0] && curRole.img_list[0].id"
       class="adult-book-input-roleImg"
     />
-    <img
-      v-else-if="curRole.simpleHead!==''"
-      :src="require('../../../../assets/NPC/simple'+(curRole.simpleHead+1)+'.png')"
-      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>
     <template v-if="type != 1 && curRole.detail.wordsList.length > 0">
       <span class="pinyin" :style="{ color: wordColor }">{{
         curRole.detail.wordsList | handlePinyin