From f5a21c9b6fc31304766b00e088f47eb81732f30a Mon Sep 17 00:00:00 2001 From: 疯狂的狮子Li <15040126243@163.com> Date: 星期二, 25 四月 2023 10:49:40 +0800 Subject: [PATCH] !7 修改oss模块路由地址 Merge pull request !7 from Yjoioooo/ts --- src/components/SvgIcon/index.vue | 34 ++++++++++++++-------------------- 1 files changed, 14 insertions(+), 20 deletions(-) diff --git a/src/components/SvgIcon/index.vue b/src/components/SvgIcon/index.vue index 8c101f6..f3562d7 100644 --- a/src/components/SvgIcon/index.vue +++ b/src/components/SvgIcon/index.vue @@ -4,33 +4,27 @@ </svg> </template> -<script> -export default defineComponent({ - props: { +<script setup lang="ts"> +const props = defineProps({ iconClass: { - type: String, - required: true + type: String, + required: true }, className: { - type: String, - default: '' + type: String, + default: '' }, color: { - type: String, - default: '' + type: String, + default: '' }, - }, - setup(props) { - return { - iconName: computed(() => `#icon-${props.iconClass}`), - svgClass: computed(() => { - if (props.className) { - return `svg-icon ${props.className}` - } - return 'svg-icon' - }) +}) +const iconName = computed(() => `#icon-${props.iconClass}`); +const svgClass = computed(() => { + if (props.className) { + return `svg-icon ${props.className}` } - } + return 'svg-icon' }) </script> -- Gitblit v1.9.3