2af534eea4
Conflicts: pom.xml ruoyi-admin/pom.xml ruoyi-admin/src/main/resources/application.yml ruoyi-common/pom.xml ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysMenu.java ruoyi-framework/pom.xml ruoyi-generator/pom.xml ruoyi-quartz/pom.xml ruoyi-system/pom.xml ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/RouterVo.java ruoyi-system/src/main/resources/mapper/system/SysMenuMapper.xml ruoyi-ui/package.json ruoyi-ui/src/components/ImageUpload/index.vue ruoyi-ui/src/components/ThemePicker/index.vue ruoyi-ui/src/layout/components/Sidebar/Link.vue ruoyi-ui/src/layout/components/Sidebar/SidebarItem.vue ruoyi-ui/src/router/index.js ruoyi-ui/src/views/index.vue ruoyi-ui/src/views/tool/gen/editTable.vue ruoyi-ui/src/views/tool/gen/index.vue sql/ry_20210908.sql
44 lines
667 B
Vue
44 lines
667 B
Vue
<template>
|
|
<component :is="type" v-bind="linkProps(to)">
|
|
<slot />
|
|
</component>
|
|
</template>
|
|
|
|
<script>
|
|
import { isExternal } from '@/utils/validate'
|
|
|
|
export default {
|
|
props: {
|
|
to: {
|
|
type: [String, Object],
|
|
required: true
|
|
}
|
|
},
|
|
computed: {
|
|
isExternal() {
|
|
return isExternal(this.to)
|
|
},
|
|
type() {
|
|
if (this.isExternal) {
|
|
return 'a'
|
|
}
|
|
return 'router-link'
|
|
}
|
|
},
|
|
methods: {
|
|
linkProps(to) {
|
|
if (this.isExternal) {
|
|
return {
|
|
href: to,
|
|
target: '_blank',
|
|
rel: 'noopener'
|
|
}
|
|
}
|
|
return {
|
|
to: to
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</script>
|