mirror of
				https://gitee.com/dromara/mayfly-go
				synced 2025-11-04 16:30:25 +08:00 
			
		
		
		
	refactor: review
This commit is contained in:
		
							
								
								
									
										29
									
								
								mayfly_go_web/src/layout/routerView/link.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										29
									
								
								mayfly_go_web/src/layout/routerView/link.vue
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,29 @@
 | 
			
		||||
<template>
 | 
			
		||||
    <div class="layout-scrollbar">
 | 
			
		||||
        <div class="layout-view-bg-white flex layout-view-link">
 | 
			
		||||
            <a :href="currentRouteMeta.link" target="_blank" class="flex-margin">{{ currentRouteMeta.title }}:{{ currentRouteMeta.link }}</a>
 | 
			
		||||
        </div>
 | 
			
		||||
    </div>
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
<script lang="ts">
 | 
			
		||||
import { defineComponent, computed } from 'vue';
 | 
			
		||||
export default defineComponent({
 | 
			
		||||
    name: 'layoutLinkView',
 | 
			
		||||
    props: {
 | 
			
		||||
        meta: {
 | 
			
		||||
            type: Object,
 | 
			
		||||
            default: () => {},
 | 
			
		||||
        },
 | 
			
		||||
    },
 | 
			
		||||
    setup(props) {
 | 
			
		||||
        // 获取父级菜单数据
 | 
			
		||||
        const currentRouteMeta = computed(() => {
 | 
			
		||||
            return props.meta;
 | 
			
		||||
        });
 | 
			
		||||
        return {
 | 
			
		||||
            currentRouteMeta,
 | 
			
		||||
        };
 | 
			
		||||
    },
 | 
			
		||||
});
 | 
			
		||||
</script>
 | 
			
		||||
		Reference in New Issue
	
	Block a user