| 1234567891011121314151617181920212223242526272829303132333435363738394041 |
- <template>
- <SvgIcon :color="color" :icon="props.name || props.icon" class="icon" :height="size" :width="size" />
- </template>
- <script setup>
- import SvgIcon from "@/uni_modules/cwg-svg-icon/components/cwg-svg-icon/cwg-svg-icon.vue";
- import {
- ref,
- watch
- } from "vue";
- const props = defineProps({
- name: {
- type: String,
- required: ""
- }, // 图标名
- icon: {
- type: String,
- required: ""
- }, // 图标名
- size: {
- type: [Number, String],
- default: 24
- },
- color: {
- type: String,
- default: ""
- },
- });
- </script>
- <style scoped>
- .icon {
- display: inline-flex;
- align-items: center;
- justify-content: center;
- color: inherit;
- }
- </style>
|