From 20f64b54d55603a63bbae959dbf3112de8a96c5f Mon Sep 17 00:00:00 2001 From: LiuHao <liuhaoai545@gmail> Date: 星期三, 19 四月 2023 11:05:30 +0800 Subject: [PATCH] fix 修改国际化文件名称不规范问题,增加reqeust 国际化配置 --- 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