1 files added
2 files modified
| | |
| | | unique-opened |
| | | mode="vertical" |
| | | > |
| | | <sidebar-item v-for="route in sidebarRouters" :key="route.path" :item="route" :base-path="route.path" /> |
| | | <!-- <sidebar-item v-for="route in sidebarRouters" :key="route.path" :item="route" :base-path="route.path" /> --> |
| | | <sidebar-item |
| | | v-for="route in sidebarRouters" |
| | | :key="route.path" |
| | | :item="route" |
| | | :base-path="route.path" |
| | | @click.native="handleMenuClick(route)" |
| | | /> |
| | | </el-menu> |
| | | </el-scrollbar> |
| | | </div> |
| | |
| | | isCollapse() { |
| | | return !this.sidebar.opened |
| | | } |
| | | }, |
| | | methods: { |
| | | handleMenuClick(menu) { |
| | | if (menu.meta && menu.meta.isNewWindow) { |
| | | window.open(this.$router.resolve({ path: menu.path }).href, '_blank'); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | path: '/yhkj', |
| | | name: 'IframePage', |
| | | meta: { |
| | | title: '以恒官网', |
| | | icon: 'user', |
| | | isNewWindow: true |
| | | }, |
| | | component: () => import('@/views/ifamepage.vue') |
| | | } |
| | | ] |
| | | |
| | | export default new Router({ |
| New file |
| | |
| | | <template> |
| | | <div class="iframe-container"> |
| | | <iframe :src="iframeSrc" class="iframe-content"></iframe> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | data() { |
| | | return { |
| | | // iframeSrc: 'https://www.baidu.com/index.htm' |
| | | iframeSrc: 'http://114.116.101.63:30800/' |
| | | }; |
| | | } |
| | | }; |
| | | </script> |
| | | <style scoped> |
| | | .iframe-container { |
| | | width: 100%; |
| | | height: 100%; |
| | | overflow: hidden; /* 隐藏外部容器的滚动条 */ |
| | | } |
| | | |
| | | .iframe-content { |
| | | width: 100%; |
| | | height: 100%; |
| | | border: none; |
| | | overflow: auto; /* 保留 iframe 的滚动条 */ |
| | | } |
| | | </style> |