Browse Source

对话课文编辑处头像同步大小

natasha 1 month ago
parent
commit
34209c3a03

+ 21 - 5
src/views/book/courseware/create/components/question/dialogue_article/Article.vue

@@ -115,6 +115,17 @@
                   <span
                     v-else
                     class="avatar"
+                    :class="[
+                      data.property.role_list.find((items) => items.id === item.roleIndex)
+                        ? data.property.role_list.find((items) => items.id === item.roleIndex).fullName &&
+                          data.property.role_list.find((items) => items.id === item.roleIndex).fullName.length === 4
+                          ? 'avatar-padding'
+                          : data.property.role_list.find((items) => items.id === item.roleIndex).fullName &&
+                              data.property.role_list.find((items) => items.id === item.roleIndex).fullName.length === 4
+                            ? 'avatar-padding'
+                            : ''
+                        : '',
+                    ]"
                     :style="{
                       backgroundColor: data.property.role_list.find((items) => items.id === item.roleIndex)
                         ? data.property.role_list.find((items) => items.id === item.roleIndex).color
@@ -2004,18 +2015,23 @@ export default {
   display: flex;
   align-items: center;
   justify-content: center;
-  width: 40px;
-  min-width: 40px;
-  height: 40px;
-  min-height: 40px;
+  width: 44px;
+  min-width: 44px;
+  height: 44px;
+  min-height: 44px;
   margin-right: 8px;
   overflow: hidden;
   font-size: 12px;
   color: #fff;
+  text-align: center;
   border-radius: 50%;
 
+  &-padding {
+    padding: 2px 5px;
+  }
+
   .adult-book-input-roleImg {
-    width: 40px;
+    width: 44px;
   }
 }