style: update icon size
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<el-button type="primary" :size="size"><Icon name="plus" class="w-4 mr-1" /> {{ text }}</el-button>
|
||||
<el-button type="primary" :size="size"><Icon name="plus" className="w-4 h-4 mr-1" /> {{ text }}</el-button>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
|
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<el-button type="danger" :size="size"><Icon name="trash" class="w-4 mr-1" /> {{ text }}</el-button>
|
||||
<el-button type="danger" :size="size"><Icon name="trash" className="w-4 h-4 mr-1" /> {{ text }}</el-button>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
|
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<el-button type="primary" :size="size"><Icon name="eye" class="w-4 mr-1" /> {{ text }}</el-button>
|
||||
<el-button type="primary" :size="size"><Icon name="eye" className="w-4 h-4 mr-1" /> {{ text }}</el-button>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
|
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<el-button type="success" :size="size"><Icon name="pencil-square" class="w-4 mr-1" /> {{ text }}</el-button>
|
||||
<el-button type="success" :size="size"><Icon name="pencil-square" className="w-4 h-4 mr-1" /> {{ text }}</el-button>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
|
@@ -4,11 +4,11 @@
|
||||
<slot name="body" />
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="search()">
|
||||
<Icon name="magnifying-glass" class="w-4 mr-1 -ml-1" />
|
||||
<Icon name="magnifying-glass" className="w-4 h-4 mr-1 -ml-1" />
|
||||
搜索
|
||||
</el-button>
|
||||
<el-button @click="reset()">
|
||||
<Icon name="arrow-path" class="w-4 mr-1 -ml-1" />
|
||||
<Icon name="arrow-path" className="w-4 h-4 mr-1 -ml-1" />
|
||||
重置
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
|
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<component :is="icon" class="w-5 h-5" />
|
||||
<component :is="icon" :class="className" />
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
@@ -7,17 +7,22 @@ import { computed } from 'vue'
|
||||
import * as heroIcons from '@heroicons/vue/24/outline'
|
||||
|
||||
const props = defineProps({
|
||||
name: {
|
||||
type: String,
|
||||
required: true,
|
||||
},
|
||||
name: {
|
||||
type: String,
|
||||
required: true,
|
||||
},
|
||||
className: {
|
||||
type: String,
|
||||
required: true,
|
||||
default: "w-5 h-5"
|
||||
}
|
||||
})
|
||||
|
||||
const icon = computed(() => {
|
||||
let name = ''
|
||||
props.name.split('-').forEach(v => {
|
||||
name += v[0].toUpperCase() + v.substr(1)
|
||||
})
|
||||
return heroIcons[name + 'Icon']
|
||||
let name = ''
|
||||
props.name.split('-').forEach(v => {
|
||||
name += v[0].toUpperCase() + v.substr(1)
|
||||
})
|
||||
return heroIcons[name + 'Icon']
|
||||
})
|
||||
</script>
|
||||
|
Reference in New Issue
Block a user