From 2ae368128606f8bf3aa290c029bdc71296ad152e Mon Sep 17 00:00:00 2001 From: zlyx <1242874891@qq.com> Date: 星期三, 18 一月 2023 20:23:11 +0800 Subject: [PATCH] add common 依赖 spring-boot-properties-migrator ; add 新增 modules 模块, 包含 demo, generator, job, system 模块 ; update 更新模块包名 rateLimiter => ratelimiter ; refactor 重构 ratelimiter 模块, 参考幂等模块加入自动装配相关配置 ; fix 修正 AsyncConfig 实现接口 ; fix 修正 SwaggerConfig 注解写法 ; fix 修正 ruoyi-common-doc pom 描述 ; delete LogAspect 去掉无用注解 ; --- ruoyi-ui/src/layout/components/Sidebar/Link.vue | 27 +++++++++++++++++---------- 1 files changed, 17 insertions(+), 10 deletions(-) diff --git a/ruoyi-ui/src/layout/components/Sidebar/Link.vue b/ruoyi-ui/src/layout/components/Sidebar/Link.vue index eb4dd10..8b0bc93 100644 --- a/ruoyi-ui/src/layout/components/Sidebar/Link.vue +++ b/ruoyi-ui/src/layout/components/Sidebar/Link.vue @@ -1,7 +1,5 @@ - <template> - <!-- eslint-disable vue/require-component-is --> - <component v-bind="linkProps(to)"> + <component :is="type" v-bind="linkProps(to)"> <slot /> </component> </template> @@ -12,23 +10,32 @@ export default { props: { to: { - type: String, + type: [String, Object], required: true } }, + computed: { + isExternal() { + return isExternal(this.to) + }, + type() { + if (this.isExternal) { + return 'a' + } + return 'router-link' + } + }, methods: { - linkProps(url) { - if (isExternal(url)) { + linkProps(to) { + if (this.isExternal) { return { - is: 'a', - href: url, + href: to, target: '_blank', rel: 'noopener' } } return { - is: 'router-link', - to: url + to: to } } } -- Gitblit v1.9.3