Skip to content

Commit f18c558

Browse files
committed
fie: icon 组件 删除 computed
1 parent 800daad commit f18c558

1 file changed

Lines changed: 1 addition & 6 deletions

File tree

‎components/uni-icon/uni-icon.vue‎

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<template>
2-
<view class="uni-icon" :class="['uni-icon-'+type]" :style="{color:color,'font-size':fontSize}" @click="onClick()"></view>
2+
<view class="uni-icon" :class="['uni-icon-'+type]" :style="{color:color,'font-size':size+'px'}" @click="onClick()"></view>
33
</template>
44

55
<script>
@@ -19,11 +19,6 @@
1919
*/
2020
size: [Number, String]
2121
},
22-
computed: {
23-
fontSize() {
24-
return `${this.size}px`
25-
}
26-
},
2722
methods: {
2823
onClick() {
2924
this.$emit('click')

0 commit comments

Comments
 (0)