chore: 规范 module 名称
This commit is contained in:
0
package/icons/src/component/.keep
Normal file
0
package/icons/src/component/.keep
Normal file
3
package/icons/src/component/icon/index.ts
Normal file
3
package/icons/src/component/icon/index.ts
Normal file
@@ -0,0 +1,3 @@
|
||||
import Component from "./index.vue";
|
||||
|
||||
export default Component;
|
||||
38
package/icons/src/component/icon/index.vue
Normal file
38
package/icons/src/component/icon/index.vue
Normal file
@@ -0,0 +1,38 @@
|
||||
<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>
|
||||
Reference in New Issue
Block a user