perf(icon): 新增 prefix 前缀, 支持自定义图标
This commit is contained in:
@@ -1,11 +1,17 @@
|
||||
<template>
|
||||
<i class="layui-icon" :class="[type]" />
|
||||
<i :class="[prefix, type]" />
|
||||
</template>
|
||||
|
||||
<script setup name="LayIcon" lang="ts">
|
||||
import { defineProps } from 'vue'
|
||||
|
||||
const props = defineProps<{
|
||||
type?: string
|
||||
}>()
|
||||
const props = withDefaults(
|
||||
defineProps<{
|
||||
type?: string
|
||||
prefix?: string
|
||||
}>(),
|
||||
{
|
||||
prefix: 'layui-icon',
|
||||
}
|
||||
)
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user