基础 frame 组件
Former-commit-id: f87bcbcd649d8ccb32315a616373da5d3c06c951 [formerly f87bcbcd649d8ccb32315a616373da5d3c06c951 [formerly f87bcbcd649d8ccb32315a616373da5d3c06c951 [formerly f87bcbcd649d8ccb32315a616373da5d3c06c951 [formerly f154a2ad488744fafe95ae76e35ac95630f75b75 [formerly 6f524e41dacef0b063ea0fce43a905c562bc0391]]]]] Former-commit-id: 4abfc995797ecb981d73f3e4bf0852b1967e8276 Former-commit-id: eac9f2e9aaba8b2655f39407781e200d81c39ee9 Former-commit-id: fe393da3d9eaf174d6abae109114ebd8aadb4266 [formerly f43cdcd4e947a8cfb1a94f0f7d824b9644b02bc3] Former-commit-id: 8a71ea98b43c42fa0ba3805f1ebd464ebe8e83ae Former-commit-id: 2b6f970add4b5456b7bc40fcae7ae44e66b49347 Former-commit-id: debe62818c1f6dac78c1aaef67518d994395fd6c Former-commit-id: d0050073d042ca073b8cd4f5f5a7972fbfc46e15 Former-commit-id: ce0fcfba77b7714db0ff25a229ae6f0d3559e050
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 Vue from 'vue'
|
||||||
|
|
||||||
import d2Container from './d2-container'
|
import d2Container from './d2-container'
|
||||||
|
import d2ContainerFrame from './d2-container-frame'
|
||||||
import d2LinkBtn from './d2-link-btn'
|
import d2LinkBtn from './d2-link-btn'
|
||||||
|
|
||||||
// 注意 有些组件使用异步加载会有影响
|
// 注意 有些组件使用异步加载会有影响
|
||||||
Vue.component('d2-container', d2Container)
|
Vue.component('d2-container', d2Container)
|
||||||
|
Vue.component('d2-container-frame', d2ContainerFrame)
|
||||||
Vue.component('d2-link-btn', d2LinkBtn)
|
Vue.component('d2-link-btn', d2LinkBtn)
|
||||||
Vue.component('d2-page-cover', () => import('./d2-page-cover'))
|
Vue.component('d2-page-cover', () => import('./d2-page-cover'))
|
||||||
Vue.component('d2-count-up', () => import('./d2-count-up'))
|
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 demoPlayground from './modules/demo-playground'
|
||||||
// 示例
|
// 示例
|
||||||
import demoBusiness from './modules/demo-business'
|
import demoBusiness from './modules/demo-business'
|
||||||
// 示例
|
// CRUD
|
||||||
import demoD2Crud from './modules/demo-d2-crud'
|
import demoD2Crud from './modules/demo-d2-crud'
|
||||||
|
// 第三方网页
|
||||||
|
import demoFrame from './modules/demo-frame'
|
||||||
|
|
||||||
// 菜单 侧边栏
|
// 菜单 侧边栏
|
||||||
export const menuAside = [
|
export const menuAside = [
|
||||||
@@ -21,7 +23,8 @@ export const menuAside = [
|
|||||||
demoElement,
|
demoElement,
|
||||||
demoPlayground,
|
demoPlayground,
|
||||||
demoBusiness,
|
demoBusiness,
|
||||||
demoD2Crud
|
demoD2Crud,
|
||||||
|
demoFrame
|
||||||
]
|
]
|
||||||
|
|
||||||
// 菜单 顶栏
|
// 菜单 顶栏
|
||||||
@@ -40,6 +43,7 @@ export const menuHeader = [
|
|||||||
demoElement,
|
demoElement,
|
||||||
demoCharts,
|
demoCharts,
|
||||||
demoPlugins,
|
demoPlugins,
|
||||||
|
demoFrame,
|
||||||
{
|
{
|
||||||
title: '跳转外部链接',
|
title: '跳转外部链接',
|
||||||
icon: 'link',
|
icon: 'link',
|
||||||
|
|||||||
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
|
0008f6d41147f385826214dfa9342f1262b056b6
|
||||||
Reference in New Issue
Block a user