Merge branch 'feature/iframe' into develop
Former-commit-id: 4ebac3862f76e8f56d56313048de9105159f5357 [formerly 4ebac3862f76e8f56d56313048de9105159f5357 [formerly 4ebac3862f76e8f56d56313048de9105159f5357 [formerly 4ebac3862f76e8f56d56313048de9105159f5357 [formerly 274aa95fd24ac7a08b8da076646f74b828304ae7 [formerly 38e003f3367f450bb3a038daa9e37199bc8fb6c7]]]]] Former-commit-id: 586956846f33fb9571794a3a8a67cdf1c26b07d2 Former-commit-id: 83c8d5129e5aff7b23fa086fefe2cd660d68fdd8 Former-commit-id: 1e950d89d2c7c15ec82a6cc1ed614d9e2ffac352 [formerly 1bf48f8a709ec39c5b3854d6bdacda03aa825a6b] Former-commit-id: ba7771bfb603c66ab1af72fe5192b78ba8755f96 Former-commit-id: 0399cadd8fa74212089cd53a551604511b75dacc Former-commit-id: d57d31398bdb241716a5bfd7357e90d934306801 Former-commit-id: 854d6018649081855de15855bdf766192f55b099 Former-commit-id: d24e6860c36c7d8836c74583b673e995aea83856
This commit is contained in:
31
src/components/d2-container-frame/index.vue
Normal file
31
src/components/d2-container-frame/index.vue
Normal file
@@ -0,0 +1,31 @@
|
||||
<template>
|
||||
<d2-container>
|
||||
<iframe
|
||||
class="d2-container-frame"
|
||||
:src="src"
|
||||
frameborder="0"/>
|
||||
</d2-container>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'd2-container-frame',
|
||||
props: {
|
||||
src: {
|
||||
type: String,
|
||||
required: false,
|
||||
default: 'http://app.d3collection.cn/d2-admin-doc/lastest/zh/'
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.d2-container-frame {
|
||||
position: absolute;
|
||||
top: 0px;
|
||||
left: 0px;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
}
|
||||
</style>
|
||||
@@ -1,10 +1,12 @@
|
||||
import Vue from 'vue'
|
||||
|
||||
import d2Container from './d2-container'
|
||||
import d2ContainerFrame from './d2-container-frame'
|
||||
import d2LinkBtn from './d2-link-btn'
|
||||
|
||||
// 注意 有些组件使用异步加载会有影响
|
||||
Vue.component('d2-container', d2Container)
|
||||
Vue.component('d2-container-frame', d2ContainerFrame)
|
||||
Vue.component('d2-link-btn', d2LinkBtn)
|
||||
Vue.component('d2-page-cover', () => import('./d2-page-cover'))
|
||||
Vue.component('d2-count-up', () => import('./d2-count-up'))
|
||||
|
||||
@@ -10,8 +10,10 @@ import demoElement from './modules/demo-element'
|
||||
import demoPlayground from './modules/demo-playground'
|
||||
// 示例
|
||||
import demoBusiness from './modules/demo-business'
|
||||
// 示例
|
||||
// CRUD
|
||||
import demoD2Crud from './modules/demo-d2-crud'
|
||||
// 第三方网页
|
||||
import demoFrame from './modules/demo-frame'
|
||||
|
||||
// 菜单 侧边栏
|
||||
export const menuAside = [
|
||||
@@ -21,7 +23,8 @@ export const menuAside = [
|
||||
demoElement,
|
||||
demoPlayground,
|
||||
demoBusiness,
|
||||
demoD2Crud
|
||||
demoD2Crud,
|
||||
demoFrame
|
||||
]
|
||||
|
||||
// 菜单 顶栏
|
||||
@@ -40,8 +43,9 @@ export const menuHeader = [
|
||||
demoElement,
|
||||
demoCharts,
|
||||
demoPlugins,
|
||||
demoFrame,
|
||||
{
|
||||
title: '跳转外部链接',
|
||||
title: '新窗口打开链接',
|
||||
icon: 'link',
|
||||
children: [
|
||||
{ path: 'https://github.com/d2-projects/d2-admin', title: 'D2Admin Github', icon: 'github' },
|
||||
|
||||
8
src/menu/modules/demo-frame.js
Normal file
8
src/menu/modules/demo-frame.js
Normal file
@@ -0,0 +1,8 @@
|
||||
export default {
|
||||
path: '/demo/frame',
|
||||
title: '内嵌网页',
|
||||
icon: 'globe',
|
||||
children: (pre => [
|
||||
{ path: `${pre}d2-doc`, title: 'D2Admin 中文文档', iconSvg: 'd2-admin' }
|
||||
])('/demo/frame/')
|
||||
}
|
||||
3
src/pages/demo/frame/d2-doc/index.vue
Normal file
3
src/pages/demo/frame/d2-doc/index.vue
Normal file
@@ -0,0 +1,3 @@
|
||||
<template>
|
||||
<d2-container-frame src="http://app.d3collection.cn/d2-admin-doc/lastest/zh/"/>
|
||||
</template>
|
||||
@@ -1 +1 @@
|
||||
f5ad92d6dec7e541030e26da35a3cb2dd5cb620f
|
||||
49fda24126560af976b40d0e8a29042af7df7d34
|
||||
Reference in New Issue
Block a user