ソースを参照

Merge branch 'v3-dev' of https://github.com/jdf2e/nutui into v3-dev

zhenyulei 5 年 前
コミット
87d7c5c169
2 ファイル変更7 行追加8 行削除
  1. 5 6
      src/packages/tag/tag.scss
  2. 2 2
      src/packages/tag/tag.vue

+ 5 - 6
src/packages/tag/tag.scss

@@ -4,6 +4,7 @@
     border: $border-width-base solid $color;
     color: $color;
     background-color: transparent;
+    padding: 1px 8px;
   } @else {
     background-color: $color;
     color: #fff;
@@ -15,8 +16,8 @@ $colorlist: $assist-color-orange $assist-color-yellow $assist-color-green $assis
 
 .nut-tag {
   cursor: pointer;
-  height: $tag-height-small;
-  padding: 0 9px;
+  min-height: $tag-height-small;
+  padding: 2px 9px;
   font-size: $font-size-small;
   border: none;
   outline: none;
@@ -25,10 +26,8 @@ $colorlist: $assist-color-orange $assist-color-yellow $assist-color-green $assis
   display: inline-flex;
   align-items: center;
   justify-content: center;
-  // min-width: 42px;
-  width: 42px;
-
-  @include text-ellipsis();
+  min-width: 42px;
+  max-width: 100%;
 
   // 默认 京东红
   @include tagColor($primary-color-jd-red, false);

+ 2 - 2
src/packages/tag/tag.vue

@@ -1,7 +1,7 @@
 <template>
-  <div :class="clsStyle" @click="clickHandler">
+  <span :class="clsStyle" @click="clickHandler">
     <slot></slot>
-  </div>
+  </span>
 </template>
 <script>
 export default {