layui/.svn/pristine/5e/5e5aea4a2a25e281cf838256cdae0f9d78ed6bdf.svn-base
2022-12-09 16:41:41 +08:00

39 lines
606 B
Plaintext

<script lang="ts">
export default {
name: "LayIcon",
};
</script>
<script setup lang="ts">
import { computed } from "vue";
export interface LayIconProps {
size?: string;
type?: string;
color?: string;
prefix?: string;
}
const props = withDefaults(defineProps<LayIconProps>(), {
prefix: "layui-icon",
});
const styles = computed(() => {
return {
color: props.color,
fontSize: props.size,
};
});
const classes = computed(() => {
return {
type: props.type,
prefix: props.prefix,
};
});
</script>
<template>
<i :class="[prefix, type]" :style="styles" />
</template>