Skip to content

Commit f4dd3a6

Browse files
committed
update(uni-ui): 调整uni-badge样式
1 parent 76dba4e commit f4dd3a6

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎components/uni-badge/uni-badge.vue‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<template>
2-
<text v-if="text" :class="inverted ? 'uni-badge--' + type + ' uni-badge--' + size + ' uni-badge--' + type + '-inverted' : 'uni-badge--' + type + ' uni-badge--' + size" class="uni-badge" :style="width" @click="onClick()">{{ text }}</text>
2+
<text v-if="text" :class="inverted ? 'uni-badge--' + type + ' uni-badge--' + size + ' uni-badge--' + type + '-inverted' : 'uni-badge--' + type + ' uni-badge--' + size" class="uni-badge" @click="onClick()">{{ text }}</text>
33
</template>
44

55
<script>
@@ -26,7 +26,7 @@
2626
},
2727
data() {
2828
return {
29-
width: `display: inline-block;width: ${String(this.text).length * 15 + 25}rpx`
29+
3030
};
3131
},
3232
methods: {
@@ -52,7 +52,7 @@
5252
text-align: center;
5353
font-family: 'Helvetica Neue', Helvetica, sans-serif;
5454
font-size: 12px;
55-
padding: 0;
55+
padding: 0px 6px;
5656
}
5757
5858
.uni-badge--inverted {

0 commit comments

Comments
 (0)